The Prophet ﷺ said, "Whoever fights to defend his property and is killed is a martyr. Whoever fights to defend his life is a martyr. Whoever fights to defend his family is a martyr."
أخبرنا عمرو بن علي قال حدثنا عبد الرحمن بن مهدي قال حدثنا إبراهيم بن سعد عن أبيه عن أبي عبيدة بن محمد عن طلحة بن عبد الله بن عوف
عن النبي ﷺ قال من قاتل دون ماله فقتل فهو شهيد ومن قاتل دون دمه فهو شهيد ومن قاتل دون أهله فهو شهيد
Its isnad is sahih. Abu Dawud narrated it in the Sunnah section, Chapter on Fighting Robbers, no. 4772, from the hadith of Ibrahim bin Saad through this route, and it is also in al-Kubra, no. 3557, see also no. 4095, and Tirmidhi said, no. 1421, hasan sahih.