Someone who heard the Prophet ﷺ reported that he said, "If you are attacked at night, let your watchword be, 'Ha Mim, they shall not be helped.'"In another wording, "If the enemy attacks you by night."
أخبرني من سمع النبي ﷺ يقول: إن بيتم فليكن شعاركم: حم لا ينصرون. وفي لفظ: إن بيتكم العدو.
Reported by Abu Dawud (2597), Tirmidhi (1682), Hakim (2/107), and Bayhaqi (6/361–362) through various routes from Sufyan (who is Thawri), from Abu Ishaq, from Muhallab bin Abu Sufrah, and he related it. This is a sahih chain of transmission. Thawri heard from Abu Ishaq Sabi before the latter's memory became confused, and Abu Ishaq explicitly stated that he heard from Muhallab, as found in Abdul-Razzaq (9467).There is disagreement over its chain of transmission. Tirmidhi said, following Thawri's narration, "This is how some of them narrated from Abu Ishaq, similar to Thawri's narration, but it has also been narrated from him, from Muhallab bin Abu Sufrah, from the Prophet ﷺ," as a mursal report. The preserved version is Thawri's narration, as Ibn Hajar affirmed in Ithaf Mahra (2/16/667). It does not matter that the companion remains unnamed.Hakim, after relating it through the route of Thawri and Zuhayr from Abu Ishaq, said, "This is a hadith sahih in its chain of transmission according to the standard of the two Shaykhs, except that it contains a mursal element. If so, the unnamed man is Bara bin Azib, whom Muhallab bin Abu Sufrah did not name." He then cited some other chains of transmission.I say, this is what he said, but neither of the two Shaykhs, nor either one of them individually, included Muhallab bin Abu Sufrah in their collections.