An excellent answer:
Question: I was discussing with a the issue of karamat and black magic. He was saying that its hard to distinguish the two and that there are many instances where people are cured from diseases (like kidney failure etc) through black magic.
My question is two fold:
1) can black magic cure illnesses
2) how can one differentiate between black magic and karamat.
Answer: The efficiency of black magic is part of Divine beguilement/entrapment (istidraj), as black magic can effect a temporary benefit but its consequences are worse and cancel it sooner or later, since its being “black” entails kufr, which will manifest its evil here and hereafter. Istidraj is the diametrical opposite of tawfiq and ta’yid which are the qualities of mu`jiza and karama.
Shaykh Yusuf al-Nabhani (Allah have mercy on him) said at the conclusion of his section on karamat and mu`jizat in the introduction of his 900-page book Hujjat Allah `ala Alamin bi-Mu`jizat Sayyid al-Mursalin (p. 12-14):
<<The erudite Emir mentioned supernatural acts in his notes on `Abd al-Salam [al-Laqani] saying:
“Know that supernatural acts are of seven types:
(i) the stunning miracle accompanied by a challenge;
(ii) the ‘groundwork’ (irhas) before Prophethood which is its foundation as we say ‘to do the groundwork for a wall’;
(iii) the miraculous gift for a Saint;
(iv) spontaneous aid (al-ma`una) befalling a common person and saving him from catastrophe;
(v) beguilement/entrapment (istidraj) for a brazen transgressor in proportion to his claim. …;
(vi) humiliation for the brazen transgressor in flat contradiction of his claim; and
(vii) witchraft and quackery, although it was said that those are not among the supernatural acts as they are quite customary with respect to their practice.”[1]
The teacher of our teachers, the erudite Shaykh Ibrahim al-Bajuri (d. 1276) said in his marginalia on Jawharat al-Tawhid in commentary of the author’s [al-Laqani's] statement, [verse 68]
“With stunning miracles they were granted support out of Divine munificence (bil-mu`jizati uyyidu takarruman)”:
“Know that the [Arabic] word for the stunning miracle (mu`jiza) is derived lexically from the word ‘inability’ (`ajz) – the opposite of power – and denotes, by convention, a supernatural act accompanied by a challenge consisting in the claim of Messengership or Prophethood together with the lack of effective opposition. Al-Sa`d [al-Taftazani] (712-792) said: ‘It is something extraordinary that appears at the hands of the claimant to Prophethood at a time of challenge to the naysayers, which the latter can produce nothing that compares to it.”[2]
The verifying authorities consider it has eight integral aspects:
(i) It must consist in a discourse or deed or something that fails to take place; for example, respectively: the Qur’an, the gushing of water from between his fingers, and the failure of the fire to burn our Master Ibrahim. The attributes of the non-created are excluded from this aspect as in the case he might say, “The sign that I am truthful is that the Deity is described as the Creator.”
(ii) That it be truly supernatural, i.e. a breach of what people are naturally accustomed to over a period of time. Ordinary events are therefore excluded, for example the statement, “The sign that I am truthful is that the sun shall rise where it usually rises and set where it usually sets.”
(iii) It must take place at the hands of the claimant to Prophethood. This excludes the miraculous gift (karama) which takes place at the hands of an evidently righteous and pious servant. This aspect also excludes spontaneous aid which takes place at the hands of common people, saving them from catastrophe; it excludes beguilement/entrapment, which is whatever occurrence takes place at the hands of a corrupt person as [repayment for his] deceit and scheming; and it excludes debasement, which is what takes place at his hands to belie him, as happened with Musaylima the arch-liar when he spat into the blind eye of a one-eyed man to heal it but the good eye went out instead.
(iv) It must be paired with the assertion of Prophethood or Messengership literally haqiqatan) or else in effect (hukman), if it comes a little later. This excludes the groundwork, namely, whatever miracles take place before Prophethood or Messengership as a preliminary or foundation, such as the shading of the cloud for him  before his mission <or the light that shone in the forehead of his father `Abd Allah>.[3]
(v) The miracle must take place in accordance with the claim being made as opposed to any discordant phenomenon, for example if one were to say: “The sign that I am truthful is that the sea shall part in two” then the mountain parts in two.
(vi) The miracle must not be tantamount to a disavowal of what is being claimed. For example, if one were to say: “The sign that I am truthful is that this object shall speak,” then the object speaks and declares that he is a liar. This is other than if he were to revive a dead person who then declared him a liar, because the object has no will and its disavowal is therefore considered a Divine order, while a human being has free choice and his disavowal is not conclusive since he might choose to disbelieve in a true claim.
(vii) It must be impossible to counter it. This condition excludes witchcraft and charlatanry (sha`badha), which is a sleight of hand suggesting that something is taking place in reality when in fact it is not, as in the case of the snakes [of the magicians]. Some of the Ulema added that
(viii) it must not take place at a time when natural customs are abolished, for example when the sun rises from the place where it usually sets. This excludes the phenomena that take place at the hands of the Anti-Christ as when he orders the sky to rain then it rains, and he orders the earth to sprout and it sprouts.
Then he [al-Bajuri] said, concerning the author’s [al-Laqani] statement, [verse 73]
“And his stunning miracles are many and resplendent”
(wa mu`jizatuhu kathiratun ghurar):
“Know that whatever miracles of his are definitely known and mass-transmitted such as the Qur’an, there is no doubt that whoever denies them commits disbelief. As for evidence below that level, if it is well-known – such as the gushing of water from his fingers  – then the one who denies it commits a grave sin (fisq). If the evidence is not well-known or is not firmly established through a sound or fair chain of transmission then the one who denies it is reprimanded only.”[4]
Taken from: