In Acts 16:17 the possessed slave girl is yelling, “These men are the servants of the most high God, which shew unto us the way of salvation.” That doesn’t sound like something an enemy would say. Why do you think she said that?
This happened more than once. For example, in Mark 1:21-24 the evil spirit in a possessed man testified that Jesus was the Holy One of God. And when Jesus came upon a demon possessed man in Mark 5:1-13 the demon said, “What do you want from me Jesus, Son of the Most High God?” and he begged the Lord not to send him away.
Demonic spirits are subject to the Lord’s authority and are always truthful in His presence. The Spirit of the Lord was so powerful in Paul they were forced to testify on His behalf, too. Two of these examples took place in public and in both cases the demon was ordered to be quiet because the Lord does not accept the testimony of demons.