The Messenger of Allah (ﷺ) enjoined killing the two black ones (snakes and scorpions) while praying.
Sunan an-Nasa'i Book 13, Hadith 25