The Prophet ﷺ said, "Whoever memorizes ten verses from the beginning of Surah al-Kahf will be protected from the Dajjal."In another wording, "from the end of al-Kahf."
أن النبي ﷺ قال: من حفظ عشر آيات من أول سورة الكهف عصم من الدجال. وفي لفظ: من آخر الكهف.
Muslim narrated it in "The Prayer of Travelers" (809) from Muhammad bin Muthanna, who said, Muaz bin Hisham told us, my father told me, from Qatada, from Salim bin Abu Jaad Ghatafani, from Madan bin Abu Talha Yamuri, from Abu Darda, and he related it.He also narrated it through the route of Shuba and Hammam, from Qatada, with the same wording. Shuba said, "From the end of the Kahf," while Hammam said, "From the beginning of the Kahf."