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.
bayhaqi:448Abū al-Ḥasan ʿAlī b. Muḥammad al-Mihrajānī > al-Ḥasan b. Muḥammad b. Isḥāq > Yūsuf b. Yaʿqūb > Muḥammad b. Abū Bakr > ʿĪsá b. Yūnus And ʿAmrū b. al-Walīd > Thawr b. Yazīd > Ḥuṣayn al-Ḥubrānī > Abū Saʿd al-Khayr > Abū Hurayrah

[Machine] On the authority of the Prophet ﷺ who said, "Whoever enters the lavatory should cover himself, and if he cannot find anything except a handful of sand, let him use it and then cleanse himself with water. Verily, the devils play with the utensils of the children of Adam. Whoever acts accordingly has done well, and whoever does not, there is no blame upon him."  

البيهقي:٤٤٨أَخْبَرَنَا أَبُو الْحَسَنِ عَلِيُّ بْنُ مُحَمَّدٍ الْمِهْرَجَانِيُّ نا الْحَسَنُ بْنُ مُحَمَّدِ بْنِ إِسْحَاقَ نا يُوسُفُ بْنُ يَعْقُوبَ ثنا مُحَمَّدُ بْنُ أَبِي بَكْرٍ ثنا عِيسَى بْنُ يُونُسَ وَعَمْرُو بْنُ الْوَلِيدِ قَالَا نا ثَوْرُ بْنُ يَزِيدَ عَنْ حُصَيْنٍ الْحُبْرَانِيِّ عَنْ أَبِي سَعْدِ الْخَيْرِ عَنْ أَبِي هُرَيْرَةَ

عَنِ النَّبِيِّ ﷺ قَالَ مَنْ أَتَى الْغَائِطَ فَلْيَسْتَتِرْ فَإِنْ لَمْ يَجِدْ إِلَّا كَثِيبًا مِنْ رَمْلٍ يَجْمَعُهُ ثُمَّ يَسْتَدْبِرُهُ فَإِنَّ الشَّيَاطِينَ يَلْعَبُونَ بِمَقَاعِدِ بَنِي آدَمَ مَنْ فَعَلَ فَقَدْ أَحْسَنَ وَمَنْ لَا فَلَا حَرَجَ  


See similar narrations below:

Collected by Ibn Ḥibbān

ذِكْرُ الْأَمْرِ بِالِاسْتِتَارِ لِمَنْ أَرَادَ الْبَرَازَ عِنْدَهُ

ibnhibban:1410Muḥammad b. ʿAbdullāh b. ʿAbd al-Salām Makḥūl Bibayrūt > Sulaymān b. Sayf > Abū ʿĀṣim > Thawr b. Yazīd > Ḥuṣayn al-Ḥimyarī > Abū Saʿd al-Khayr > Abū Hurayrah

[Machine] The Messenger of Allah ﷺ said, "Whoever performs Istijmar (cleansing oneself with stones after using the toilet), let him perform Wudu (ablution). Whoever goes to defecate, let him cover himself (with a barrier). Even if he finds nothing but a handful of sand, for verily, the Shaytan plays with the private parts of the children of Adam."  

ابن حبّان:١٤١٠أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ عَبْدِ السَّلَامِ مَكْحُولٌ بِبَيْرُوتَ قَالَ حَدَّثَنَا سُلَيْمَانُ بْنُ سَيْفٍ قَالَ حَدَّثَنَا أَبُو عَاصِمٍ قَالَ حَدَّثَنَا ثَوْرُ بْنُ يَزِيدَ عَنْ حُصَيْنٍ الْحِمْيَرِيِّ عَنْ أَبِي سَعْدِ الْخَيْرِ عَنْ أَبِي هُرَيْرَةَ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ «مَنِ اسْتَجْمَرَ فَلْيُوتِرْ مَنْ فَعَلَ فَقَدْ أَحْسَنَ وَمَنْ أَتَى الْغَائِطَ فَلْيَسْتَتِرْ وَإِنْ لَمْ يَجِدْ إِلَّا كَثِيبًا مِنْ رَمْلٍ فَإِنَّ الشَّيْطَانَ يَلْعَبُ بِمَقَاعِدِ بَنِي آدَمَ»