All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The confirmed narration of the Hadeeth is the recitation of the first ten verses of Surah al-Kahf [Quran 18] or the opening verses of this Surah. As regards the narration about the last ten verses of Surah al-Kahf, then a group of scholars determined that this narration is not confirmed (from the Prophet ), among whom is Ibn al-Qayyim and Al-Albaani .
Indeed, Ibn al-Qayyim, may Allaah have mercy upon, said in his book Jalaa’ al-Afhaam that the authentic narration is the one about reciting the opening verses of Surat al-Kahf because in Saheeh Muslim from the Hadeeth of an-Nawaas Ibn Sam’aan about the story of the Dajjaal, it reads “If you see him [i.e. the Dajjaal] recite on him the opening verses of Surah al-Kahf.”
For more benefit, please refer to Fatwa 327484.
Allah knows best.