'Attacked' in the Bible
Later on, during the reign of King Hezekiah of Judah, these people, enumerated by name, came and attacked both their homes and the Meunim who had settled there and who remain exterminated to this day. They settled down there, taking their place, because there was pasture there for their flocks.
He also killed a soldier from Egypt of enormous height five cubits tall. The Egyptian carried a spear comparable in size to a weaver's beam, but Benaiah attacked him with a staff, snatched the spear out of the Egyptian's hand and killed him with his own spear.
Because you didn't carry it from the very first, the LORD our God attacked us, since we didn't care for it appropriately."
So Joab and the soldiers who were with him attacked the Arameans in battle formation, and the Arameans retreated in front of him.
When David learned this, he mustered all of Israel, crossed the Jordan, approached the Arameans, and drew up his forces against them. After David had assembled in battle array against the Arameans, the Arameans attacked him.
Later the next spring, at the time that kings go out to fight, Joab led out the army, ravaged the territory of the Ammonites, and then went out and attacked Rabbah, while David remained behind in Jerusalem. Joab besieged Rabbah and conquered it.
Then Satan attacked Israel by inciting David to enumerate a census of Israel.
God considered this behavior to be evil, so he attacked Israel.