‘Aishah reported that the Prophet (peace be upon him) said: “Five of the animals are vicious and they may be killed in the sacred precincts of Haram: the crow, the kite, the scorpion, the mouse, and the ravenous dog. This is reported by Muslim and Bukhari, who added “(and) the snake.”
There is consensus among the scholars that the small crow which eats the seeds, is not included in the category of the above animals. Under the ravenous dog is included one that bites people and frightens them and all other similar vicious animals that attack humans such as the lion, tiger, leopard and wolf. Thus Allah said: “They ask you what is lawful to them (as food). Say: ‘Lawful to you, are (all) things good and pure: And what you have taught your trained hunting animals 8 (to catch) in the manner directed to you by Allah”‘ (Qur’an 5.4). The Hanafi scholars hold, however, that the word “vicious dog” in this case applies only to dogs and wolves.
Ibn Taimiyyah is of the opinion that a muhrim may kill any harmful creature that usually causes harm to humans, such as snake, scorpion, mouse, crow, and a vicious dog. He is also permitted to defend himself against whatever harms him, whether animals or people; if they assault him, he should fight them back. The Prophet (peace be upon him) said: “He who is killed while defending his wealth is a martyr, and he who is killed while defending his life is a martyr, and he who is killed while defending his religion is a martyr, and similarly he who is killed while defending his honour is also a martyr.”
Ibn Taimiyyah further said: “If fleas and lice bite him, a muhrim should cast them out. He may also kill them, and incur no penalty. Casting them out is, however, easier than killing them. Similarly a muhrim is forbidden to kill any animal that he sees, such as a lion, a leopard, etc. But, most of the scholars hold that if he should kill one of these animals, he is not required to make any atonement. Looking for lice without feeling any bite, for comfort and pleasure, however, while one is in the state of ihram, should be avoided. But if someone does it, he is not required to make an atonement.