Witches, Ghosts and Necromancers

Divining is contrary to Halacha on the basis of the concept of Chukat HaGoy:

Chukat HaGoy:

Vayikra, Chapter 18

1. And the Lord spoke to Moses, saying,

2. Speak to the people of Israel, and say to them, I am the Lord your God.

3. After the doings of the land of Egypt, where you dwelt, shall you not do; and after the doings of the land of Canaan, where I bring you, shall you not do; nor shall you walk in their ordinances.

The Rambam expands this injunction beyond just Egyptian and Canaanite customs:

"We do not walk after the ways of the idolaters. We do not assimilate ourselves to them; not in our clothing and not in other things like this, as it says, 'do not walk after the ways of the gentiles' (Leviticus 20:23)…Rather, a Jew should be distinct from them and recognizable through one's clothing and one's other actions, just as one is distinct from them in one's thoughts and characteristics" (Laws concerning Idolatry, 11:1).

Magic:

Shemot, Chapter 22

17. You shall not suffer a witch to live.

18. Whoever lies with a beast shall surely be put to death.

19. He who sacrifices to any god, except only to the Lord, he shall be completely destroyed.

Devarim, Chapter 18

9. When you come into the land which the Lord your God gives you, you shall not learn to do after the abominations of those nations.

10. There shall not be found among you any one who makes his son or his daughter pass through the fire, or who uses divination, or a soothsayer, or an enchanter, or a witch,

11. Or a charmer, or a medium, or a wizard, or a necromancer.

12. For all that do these things are an abomination to the Lord; and because of these abominations the Lord your God drives them out from before you.

13. You shall be perfect with the Lord your God.

14. For these nations, which you shall possess, listened to soothsayers, and to diviners; but as for you, the Lord your God has not allowed you so to do.

15. The Lord your God will raise to you a Prophet from your midst, from your brothers, like me; to him you shall listen;

But did the Rabbis actually believe in witches, ghosts and necromancers?

Talmud - Mas. Sanhedrin 67a

MISHNAH. …A SORCERER, IF HE ACTUALLY PERFORMS MAGIC, IS LIABLE [TO DEATH]. BUT NOT IF HE MERELY CREATES ILLUSIONS.

Commentary from Mikraot Gedolot (Samuel I, 28:19):

While it it is apparent from the Scriptures that the necromanceress actually brought up Samuel’s body and soul, and the Talmud and Midrash support this supposition, many commentators deny this. The first was Rav Samuel ben Hophni Gaon, who branded this woman as a total fraud. She possessed no power whatever to bring up the dead. She would conceal a man in a hiding place, whence he would speak in a low, deep voice, to impersonate the dead. Although the woman pretended not to recognize Saul, she was fully aware of his identity, and instructed her assistant accordingly. It was already well-known that David was to succeed Saul to the throne, and it was also probable that Saul would fall in battle. Therefore, the assistant impersonated Samuel in predicting these events.

Rav Hai Gaon and Rav Saadiah Gaon, while also denying the validity of necromancy, adopt a more plausible explanation in light of the Scriptures. They claim that the Almighty resurrected Samuel to convey to Saul notice of his impending doom. When the woman saw Samuel rising from the grave, she was actually startled, for she had not expected this to occur.

Rambam and Ralbag explain that Saul was a victim of hallucinations. His constant thoughts concerning his future caused him to imagine that Samuel was speaking to him and prophesying his fate.

Redak and Abravanel reject these explanations on the following grounds. In order to execute justice upon witches and sorcerers, the king and the Sanhedrin were necessarily familiar with all sorts of sorcery and necromancy… It is, therefore, highly unlikely that Saul could be duped into accepting the validity of necromancy if it were actually a fraud…. Abravanel adopts a strange system, that Samuel’s body was occupied by a demon, who spoke for him. His soul, however, could not be conjured to earth by witchcraft.

The Talmud (Sab 152b) states very clearly that within twelve months following death, the soul does not yet come to its final resting place, but ascends and descends between heaven and earth. It is during this transition period that evil forces of necromancy have the power to return the soul to the body, and bring the body up from the grave, to reveal secrets from the other world. After twelve months, however, when the souls of the righteous are hidden under the Throne of Glory, no power can rend them from their state of ecstasy, in which they cleave to their Creator.