Sayyiduna Abu Ayyub (may Allah be pleased with him) says: I caught a female jinn, and she said to me: Let me go, and I undertake to teach you something which, when you recite it, none of us will be able to harm you. I asked: What is it? She said: Ayat al-Kursi: "Allah, there is no god but Him, the Ever-Living, the Sustainer of all existence" [Surah al-Baqarah: 255]. I mentioned this to the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) said: "She spoke the truth, though she is a liar."
Hadith Referenceالمعجم الكبير للطبراني / باب الخاء / 3998