Kabbalah
Apart from their opposition to Moses there are other legends about these two Egyptian sorcerers; it was said that during the end of their days they had necessary occult knowledge to embark on a journey to the Judeo-Christian heavens. They were not welcomed and the angels of the first few heavens fought them vigorously but they could not evict them due to the potent talismans that were worn by the wizards. As they entered the fourth heaven they were met by Michael and Gabriel; legends say that the battle was very evenly balanced, but in the end it was the angels who had to fall back. Upon entering the fifth heaven they were met by none other than Metatron, who did not come at them with defiance or anger, but appeared accommodating, considering the circumstances; after conversing for a short time the angel was successful in convincing Jannes and Jambres to remove their talismans, leaving them thus vulnerable. Metatron was quick to act and threw them out of heaven with a wave of his hand. It is said that they lost all memory of the event after that.
Read more about this topic: Jannes And Jambres