The Prophet ﷺ used to supplicate, "O Allah, I seek refuge in You from the punishment of the grave, from the punishment of the Fire, from the trials of life and death, and from the trial of the false messiah, the Dajjal."
كان النبي ﷺ يدعو: اللهم إني أعوذ بك من عذاب القبر، ومن عذاب النار، ومن فتنة المحيا والممات، ومن فتنة المسيح الدجال.
Bukhari narrated it in the Book of Funerals (1377), and Muslim in the Book of Mosques (131/588), both from the hadith of Hisham, from Yahya, from Abu Salama, who heard Abu Hurairah, and he mentioned the hadith. Muslim added, "When any of you finishes the tashahhud, let him seek refuge with Allah from four things. He should say, O Allah, I seek refuge with You from the punishment of Hell, from the punishment of the grave, from the trial of life and death, and from the evil of the trial of the Messiah Dajjal."In another narration, "When any of you finishes the final tashahhud, let him seek refuge with Allah from four things," and he mentioned the same. In another narration, "Seek refuge with Allah from the punishment of Allah, seek refuge with Allah from the punishment of the grave, seek refuge with Allah from the trial of the Messiah Dajjal, seek refuge with Allah from the trial of life and death."All these narrations are in Sahih Muslim, coming through various routes from Abu Hurairah.