Before you start to take control measures make sure that you know exactly where the ants come from then fill all the cracks and remove all the debris that could be used by ants to take shelter.
Large ants in attic.
Dry wood termites on the other hand look a lot like ants and would have more reason to be in your attic.
Either way i strongly suggest calling out an extermination service.
The good news here is that the ants are visible to you and they are still going outdoors to forage which means they will walk through areas that that you treat outdoors.
An insecticide that contains bifenthrin permethrin or deltamethrin is one way how to get rid of ants.
Technically we are not supposed to spray it indoors.
Once dry the spray leaves an invisible film that repels ants so they won t enter the house.
They will cross the residual and eventually get it back to the nest where it will slowly transfer to the colony.
I would defiantly take a closer look at these ants.
Ants will build nests where ever they can find a suitable area to do so.
Spray a 4 in wide band along entry points just enough to wet the surface.
The ants that are nesting in the attic have to leave periodically probably at night.
While it would be unusual to have an entire colony in your attic it is not unheard of.
A natural and very cheap way to get rid of black ants can be the use of bay leaves.