Praise be to Allah.
Witchcraft or magic is knowledge that comes from the shayateen and is something that they do. Allaah says (interpretation of the meaning):
“They followed what the Shayaateen (devils) gave out (falsely of the magic) in the lifetime of Sulaymaan. Sulaymaan did not disbelieve, but the Shayaateen (devils) disbelieved, teaching men magic [al-Baqarah 2:102]
“And they learn that which harms them and profits them not. And indeed they knew that the buyers of it (magic) would have no share in the Hereafter” [al-Baqarah 2:102]
“and the magician will never be successful, to whatever amount (of skill) he may attain” [Ta-Ha 20:69]
The Prophet (peace and blessings of Allaah be upon him) said: “Avoid the seven sins which doom a person to Hell.” They asked, “What are they?” He said, “Associating anything in worship with Allaah (shirk); witchcraft;…”
And the Prophet (peace and blessings of Allaah be upon him) said: “He is not one of us who practices witchcraft or has it done for him.”
On this basis, it is not permissible to use witchcraft for any purpose whatsoever. Witchcraft or magic is falsehood, and all kinds of falsehood are kufr and evildoing. Sin cannot be a means of achieving something good. Beneficial things have to be sought through the prescribed means which involve no sin and whose consequences are safe. Allaah has given His slaves sufficient means in the things that He has permitted them, so they have no need for the things that He has forbidden. To Him be praise and thanks for His blessings.