Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ibnmajah:296Muḥammad b. Bashhār > Muḥammad b. Jaʿfar And ʿAbd al-Raḥman b. Mahdī > Shuʿbah > Qatādah > al-Naḍr b. Anas > Zayd b. Arqam

"The Messenger of Allah said: 'These Hushush (waste areas) are visited (by devils), so when anyone of you enters, let him say: 'Allahumma inni aʿudhu bika minal-khubthi wal-khaba'ith (O Allah, I seek refuge with You from male and female devils).'" (Sahih) Other chains with similar wording.  

ابن ماجة:٢٩٦حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ وَعَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ قَالاَ حَدَّثَنَا شُعْبَةُ عَنْ قَتَادَةَ عَنِ النَّضْرِ بْنِ أَنَسٍ عَنْ زَيْدِ بْنِ أَرْقَمَ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ إِنَّ هَذِهِ الْحُشُوشَ مُحْتَضَرَةٌ فَإِذَا دَخَلَ أَحَدُكُمْ فَلْيَقُلِ اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ الْخُبُثِ وَالْخَبَائِثِ حَدَّثَنَا جَمِيلُ بْنُ الْحَسَنِ الْعَتَكِيُّ حَدَّثَنَا عَبْدُ الأَعْلَى بْنُ عَبْدِ الأَعْلَى حَدَّثَنَا سَعِيدُ بْنُ أَبِي عَرُوبَةَ عَنْ قَتَادَةَ ح وَحَدَّثَنَا هَارُونُ بْنُ إِسْحَاقَ حَدَّثَنَا عَبْدَةُ قَالَ حَدَّثَنَا سَعِيدٌ عَنْ قَتَادَةَ عَنِ الْقَاسِمِ بْنِ عَوْفٍ الشَّيْبَانِيِّ عَنْ زَيْدِ بْنِ أَرْقَمَ أَنَّ رَسُولَ اللَّهِ قَالَ فَذَكَرَ الْحَدِيثَ