Sunan Abi Dawud, Hadith 1092

Narrated Abdullah ibn Mas'ud: When the Messenger of Allah addressed, he would say: Praise be to Allah, from Whom we seek help and pardon,and we seek refuge in Allah from the evils of our souls. He whom Allah guide has no one who can lead him astray, and he whom He leads astray has no one to guide him. And I bear witness that there is no god but Allah, and I bear witness that Muhammad is His servant and apostle. He sent him before the coming of the last hour with truth giving good tidings and warning. He who obeys Allah and His Apostle follows the right path; and he who disobeys them shall harm none except himself, and he will not harm Allah in the least.

حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا أَبُو عَاصِمٍ، حَدَّثَنَا عِمْرَانُ، عَنْ قَتَادَةَ، عَنْ عَبْدِ رَبِّهِ، عَنْ أَبِي عِيَاضٍ، عَنِ ابْنِ مَسْعُودٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ إِذَا تَشَهَّدَ قَالَ ‏ "‏ الْحَمْدُ لِلَّهِ نَسْتَعِينُهُ وَنَسْتَغْفِرُهُ وَنَعُوذُ بِاللَّهِ مِنْ شُرُورِ أَنْفُسِنَا مَنْ يَهْدِهِ اللَّهُ فَلاَ مُضِلَّ لَهُ وَمَنْ يُضْلِلْ فَلاَ هَادِيَ لَهُ وَأَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَأَشْهَدُ أَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ أَرْسَلَهُ بِالْحَقِّ بَشِيرًا وَنَذِيرًا بَيْنَ يَدَىِ السَّاعَةِ مَنْ يُطِعِ اللَّهَ وَرَسُولَهُ فَقَدْ رَشَدَ وَمَنْ يَعْصِهِمَا فَإِنَّهُ لاَ يَضُرُّ إِلاَّ نَفْسَهُ وَلاَ يَضُرُّ اللَّهَ شَيْئًا ‏" ‏ ‏.‏

sunnah.com