كتاب الطهارة وسننها
Read the English translation first, with the original Arabic directly underneath.
It was narrated that Zaid bin Arqam said:
"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.
إِنَّ هَذِهِ الْحُشُوشَ مُحْتَضَرَةٌ فَإِذَا دَخَلَ أَحَدُكُمْ فَلْيَقُلِ اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ الْخُبُثِ وَالْخَبَائِثِ