Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
(1)
Among the things that were taken out from the well named Dharwan were a comb and a string with eleven knots tied in it, as well as a wax effigy into which needles had been stuck.
Jibril (alayhis salam) came and informed that you should recite the Mu'awwidhatayn (the last two surahs of the Qur'an). Accordingly, the Prophet (sallallahu alayhi wa sallam) would recite each verse, and with each verse, one knot would be untied and one needle would be removed from the effigy.
When a needle was removed, you would feel pain.
Eventually, all the knots were untied and the needles were removed, and you were freed from the effect of magic as if a bound person had been released.
(Fath al-Bari: 10/283) (2)
The act of undoing magic is called nushrah.
If it is done with polytheistic words or by means of magic, it is forbidden, as when the Messenger of Allah (sallallahu alayhi wa sallam) was asked about it, he said:
"This is a satanic act."
(Sunan Abi Dawud, Book of Medicine, Hadith: 3868)
But if the treatment of magic is done with Qur'anic verses and prescribed supplications, then it is permissible, as when a woman brought her child to the Messenger of Allah (sallallahu alayhi wa sallam) who was afflicted by a jinn and could not speak.
She said:
"O Messenger of Allah! This is my son, and he is the only child in my house, and he is afflicted by a jinn. He does not speak."
He said:
"Bring me a little water."
When the water was brought, he washed his hands and rinsed his mouth, then gave the used water to her and said:
"Give him some of this water to drink, and pour some over him, and also supplicate to Allah the Exalted for his healing."
Umm Jundub says that after a year I met that woman and asked her about the child.
She said:
"He has recovered and has become so intelligent that he is not like ordinary people."
(Sunan Ibn Majah, Book of Medicine, Hadith: 3532)
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 5765