According to Leviticus 20:27, "Any man or woman who has a ghost ('wb) or who has a familiar spirit (yd'ny) will be put to death". The law in Deuteronomy 18:11 also commands the Israelites to not "consult ghosts (ws'l 'wb) nor familiar spirits (wyd'ny), nor attempt to communicate with the dead (wdrs 'l-hmtym)". In 1 Samuel 28:7-13, the spirit medium of En-dor "consulted ghosts ('wb)". This condemnation of necromancy and divination attests to the popularity of ancestor worship in ancient Israel, as well as the general belief in the afterlife. The derivation of "Sheol" (s'wl) from a root meaning "ask" (s'l) also possibly relates to necromancy, particularly to the s'l 'wb "consulting the ghosts" practice of Deuteronomy 18:11. But what is the history of the critical words 'wb and yd'ny?
In Mishnaic Hebrew, they have already become terms for practices, thus one performs 'wb "communicating with the dead" or yd'ny "acting as a medium", and by extension can simply refer to the persons who perform these forbidden rituals. According to the Talmud, a human skull was used in the 'wb ritual (Sanhedrin 65b). The slippage between reference to the spirit and reference to the medium may have been enabled by the nature of the ritual itself, which involves possession by the ancestral spirit, so in a sense the medium becomes the spirit, or the spirit becomes the medium. Hebrew philologist S. R. Driver comments:
"From Lev. 20:27 ("a man or a woman, when there is in them an ob or a yidde'oni") it appears that an ob was considered to declare itself in the body of the person who had to do with it. Is. 29:4 shows further that the oracles of an ob were uttered in a twittering voice, which seemed to rise from the ground. The narrative of the witch of 'Endor shows (1 S. 28:8b, 11) that those who followed the art professed the power of calling up from the underworld the ghosts of the dead. The Syriac Peshitta renders by zakkuro, i.e. a ghost, speaking ostensibly either from the underworld, or from the stomach of the soothsayer. The LXX nearly always represents 'wb by hingastrimuthoi "ventriloquists". This rendering no doubt contains the true explanation of the operation of the 'wb: the b'lt 'wb "pretends to see a ghost which she describes, but her dupes only hear a voice which by ventriloquism seems to come from the ground". The 'wb may be fairly represented by the English ghost. In what respect the yidde'oni differed from the ob is uncertain. The word is usually understood to signify knower (i.e. wise spirit; Heb. yada' "to know"), but the yidde'oni may be not unreasonably understood of a "familiar" spirit, i.e. a spirit which is at the beck and call of a particular person (cf. Acts 16:14), and imparts to him its superior knowledge". (A Critical and Exegetical Commentary of Deuteronomy, p. 226)
The derivation of 'wb is uncertain but it is most likely cognate with Arabic awaba = aaba "a soul which returns (from the underworld)". As for yd'ny, a link with yd' "know" seems obvious; hence Driver's speculation above. But the discovery of the third-millenium B.C. Ebla archive has opened up a whole new possibility. West Semitic mythology of the Early and Middle Bronze Age had far more diverse pantheons than that of the Late Bronze Canaanite mythology from Ugarit, and the Iron Age mythology of Phoenicia and Israel. Some of these earlier gods merged together, disappeared entirely, or survived as the names of demons, angels, and spirits. Or epithets of certain deities may be hypostasized into new deities. Among the divine pairs in the Ebla pantheon, we find listed d Wa-da-'a-an wa d Si-la-shu lu Ga-ra-mu KI, or rather, "Wada'anu and Silashu of Garamu" (cf. ARET 3.540; TM.75.G.1764). Wada'anu is essentially the exact equivalent of Hebrew yd'ny, and he is paired with the goddess Silashu, who is spelled Sa-a-sa in another text, suggesting an underlying "Salasha" (the sign for Eblaite /a/ is often interchangeable with /la/, thus d A-a is spelled d A-la in ARET 3.464; ARET 3.232). Both names indicate an identification with the Akkadian goddess Shalash, the consort of Enlil/Ellil, Dagan, and Adad in Mesopotamia and Syria (e.g. the consort of Adad-Ramman was "Shala"). What makes this link especially interesting is that Adad/Addu (Syrian Hadad, the proper name for Baal) and Shamash, the sun-god, were very frequently involved in divination rites in Assyrian and Mari texts (they were called beli biri "lords of divination"). Shamash has chthonic aspects since his daily course takes him through the underworld, and being an astral deity his all-seeing gaze suits him well as a revealer of secrets. Baal/Hadad has a cyclic death into the underworld and rebirth, making him a revealer of death, and in Assyrian and Mari texts Adad/Addu was primary involved in omens of death as revealed through extispicy. If Salasha/Silashu is indeed the same goddess of Shalash, then a probable argument could be made that one of Hadad/Addu's epithets in the area of divination was the word for "knower" (wada'anu), and after Baal ceased to function as a god of divination, the epithet lived on to refer to other "revealers" involved in necromancy (the lesser spirits of the dead summoned by the medium). It is also curious that Sanhedrin 65b makes reference to b'l-'wb "Baal-Ob" as the form of divination involving the 'wb, and it has been noticed that every occurence of yd'ny in the OT pairs yd'ny with 'wb. Might this very late name of a necromancy practice preserve some memory of Baal being central to divination and necromancy? Of course, this does not touch at all on the problem of Resheph and Malik/Moloch/Rapiu/Rapha as the chief chthonic deities.