In 2 Timothy 3:8, we encounter an enigmatic verse: "Men like this defy the truth just as Jannes and Jambres defied Moses." These names do not occur in the OT but they are widely attested in post-exilic Jewish tradition as the magicians who competed against Moses in performing miraculous signs and wonders. According to the Book of Jannes and Jambres, the two magicians were summoned by Pharaoh separately:
"Emissaries from the king arrived and said, 'Come quickly and withstand Moses the Hebrew who is doing signs so that all are amazed.' And Jannes came to the king and withstood Moses and his brother by doing whatever they had done." (Book of Jannes and Jambres; cf. Pap. Chester Beatty XVI 26a)
In the Testament of Solomon, the demon Abezethibou declares: "I am the one whom Jannes and Jambres, those who opposed Moses in Egypt, called to their aid" (25:3-4). We also read in Quaest. Barth. (L) ii 4.50: "Satan says, 'Jannes and Mambres are my brothers.' " Origen and Pope Gelasius mention a book called Poenitentia Jannis et Mambre. Numenius the Pythagorean stated that "Jannes and Jambres, the most powerful Egyptian magicians, dispersed the plagues which Moses had brought upon Egypt" (cf. Eusebius, Praeparatio Evangelica 9.8), while Apuleius named Moses and Jannes as among the world's greatest magicians (Apologia, 90). Pliny names Jannes, Jotape, and Moses as Jewish magicians (Historia Naturalis, 31.11), and the names of Jannes and Jambres (or Mambres) appear throughout rabbinical literature as the magicians in Pharaoh's court (Sotah 11a; Sanh. 106a; Men. 85a; Midr. Yel. Ki Tissa, Ex. 12.28; Targ. Num. 22.22).
The tradition is certainly late, but where did the names come from and how did they become associated with Moses and the Exodus? My suspicion is that these are names of Hyksos pharaohs. The Egyptian historian Manetho identified the Israelites with the Hyksos (who were of West Semitic heritage) of the fifteenth and sixteenth dynasties and construed the Jewish tradition of the Exodus as a distorted memory of the expulsion of the Hyksos from Egypt:
The kings of Thebes and the other parts of Egypt rose against the shepherds, and a long and terrible war was fought between them. By a king, named Alisphragmuthosis (i.e. Kamose), the shepherds were subdued, and were driven out of the most parts of Egypt and shut up in a place named Avaris, measuring ten thousand acres....After the conclusion of the treaty they left with their families and chattels, not fewer than two hundred and forty thousand people, and crossed the desert into Syria. Fearing the Assyrians, who dominated over Asia at that time, they built a city in the country which we now call Judea. It was large enough to contain this great number of men and was called Jerusalem. (Manetho, Aegyptiaca; cf. Josephus, Adv. Apion 1.73)
According to Manetho (as quoted by Josephus), the fifth king of the Hyksos dynasty was named Iannas. This name is obviously a very close match with Greek Iannes (cf. 2 Timothy 3:8). Iannas is the Hellenized form of Khyan, the name of a prominent Fifteenth Dynasty pharaoh and the father of Apophis. The loss of the initial fricative results in Yan-, the root of Manetho's Iannas. The name itself derives from West Semitic 'chy "brother" and Khyan is a shortening of a compound like 'Achyinadab "my brother is noble" (cf. 1 Kings 4:14) or 'Achyino'am "my brother is delightful" (cf. 1 Samuel 14:50). Another possible etymology is 'yr "the month Iyar," but the main difficulty is the initial 'aleph which usually corresponds to soft [h] or zero in Egyptian (Egyptian [kh] instead corresponds to either Hebrew 'heth or ayin, though 'ayin was usually represented by the Egyptian 'ayin). Suserenre Khyan was the most successful Hyksos pharaoh, his name and the title HqA-xAsw "ruler of foreign lands" (from which the name Hyksos is derived) occurs on at least 38 seals and scarabs discovered in as far-flung places as Knossus in Crete, the Hittite capital of Bogazkoy in Anatolia, and in Mesopotamia. His influence was international and his realm reached at least into the Levant. Now according to Manetho as Josephus represents him, Iannas was succeeded by Assis. This name corresponds to Sheshi and this pharaoh's full royal name was Maaybre Sheshi. The name Assis however does not appear in Africanus' and Eusebius' version of Manetho; neither was Sheshi the last pharaoh of the dynasty. According to epigraphic evidence, Sheshi instead ruled early in the dynasty and most Egyptologists identify him with another name in Manetho's list: Bnon (also spelled Baeon). Since Manetho's [n] can correspond to original Egyptian [r], there is some resemblance between Maaybre (i.e. -bre) and Bnon, but more likely the name derives from Bebnem, the name of a Fourteenth Dynasty ruler who reigned at the same time as the Fifteenth Dynasty. The resemblance between Maaybre and Mambres (the variant of Jambres) is very close, and one could argue that Membres is the original version of Jambres because the latter could have arisen via an alliterative assimilation to "Jannes" (as the two names were very commonly paired together). It is also interesting that in Josephus' list, Assis (=Maaybre Sheshi) follows Iannas, just as Membres follows Jannes when paired. Sheshi was also a well-attested pharaoh, with almost 400 seals and scarabs discovered throughout the Middle East.
There was one other intriguing link between Sheshi and Khyan. They are connected in descent by one Meriweserre Yakub-har. Yakub-har, or Yaqub-'el (Jacob-el), is generally thought to be the son of Sheshi and the father of Khyan. The soft [h] corresponds to 'aleph and the [r] corresponds to [l]. The "Jacob" of Genesis is probably a shortened form of Jacob-el (with the theophoric element omitted), attested separately as Ya'kub-ilu in an Akkadian contract tablet from the time of Hammurabi and Y'kb'r as a toponym in central Palestine on a list of Thutmose III. In some places, the pharaoh's name was spelled Yakub-nar. This suggests that Manetho knew Yakub-har under the name of Apachnan or Pachnan. The order of the first two consonants were reversed via metathesis (Achapnan -> Apachnan), and considering that [r] and [n] were often interchangeable in Manetho, we would then be left with Achapnar as an intermediate form of Yakubnar.
Manetho definitely identified the Israelites with the Hyksos and he probably was not alone in his opinion. Manetho thus regarded Hyksos kings as Israelite rulers, and the existence of "Jacob" as the name of one of the kings (if it wasn't entirely distorted in the years before Manetho) was also a likely contributing factor in the identification. The last two named kings in Manetho's list (as cited by Josephus) were Iannas and Assis; if these were thought to be the last Hyksos kings, and if the expulsion of the Hyksos was construed as equivalent to the Exodus, then Iannas and Assis would have been contemporaries of Moses in Egyptian-Jewish tradition. I suspect that the Jews who moved to Egypt after the exile would have been very interested to learn from Egyptian sources about what they knew about Moses and the sojourn of Israel in Egypt. They might have been the ones who initiated the identification of the Hyksos with the Israelites, especially if they encountered Jacob's name among the names of the Hyksos rulers. If they also encountered the name Iannas and Mambres as a Hellenized form of "Maaybre," and if their access to Egyptian sources was indirect and oral, then it would not be difficult to imagine how these names of Hyksos kings later became names of those associated with the pharaoh at the time of the Exodus.