And the sorcerers of Egypt did the same by means of their magic. (Shemos 6:3)
In the first two makos, we see that also the Egyptian sorcerers possessed great capabilities. They did the same as Moshe and Aharon. They turned water to blood, and they brought out frogs.
However, we need to know that the forces of tumah are totally different from the forces of kedushah, as I will explain.
There was a story in the time of R. Chayim Vital about a dybbuk, an evil spirit that possessed a person, and it was exorcised by witches. People asked R. Chayim about this, saying that it seems to show that witches indeed have special powers. He answered that they put so much tumah into the person that the dybbuk needed to escape.
I was always puzzled by this explanation. What kind of an answer is this? After all, they succeeded in exorcising the spirit, which shows that they can indeed do things. What do we care how they did it?
The explanation is like this. It may be compared to a person who has a stain on his garment, and he wants to scrub it and cleanse it with special stain removers. Someone comes along and says, “Why knock yourself out trying to clean the garment? Just cut out the stained spot!”
To which the first person replies, “Are you crazy? True, it won’t have a stain anymore, but the whole garment will be ruined!”
That’s the story with the dybbuk. R. Chayim Vital explained: True, they exorcised the spirit, but how did they do it? They put so much tumah into the poor person that his soul was completely ruined and destroyed. And then the dybbuk left him. At the end of the day, they didn’t help at all.