Sahih al-Bukhari Book 46, Hadith 5
Allah's Messenger (ﷺ) said, "Help your brother, whether he is an oppressor or he is an oppressed one. People
asked, "O Allah's Messenger (ﷺ)! It is all right to help him if he is oppressed, but how should we help him if
he is an oppressor?" The Prophet (ﷺ) said, "By preventing him from oppressing others."
Allah's Messenger (ﷺ) said, "Help your brother, whether he is an oppressor or he is an oppressed one."
I heard Al-Bara' bin `Azib saying, "The Prophet (ﷺ) orders us to do seven things and prohibited us from doing seven other things." Then Al-Bara' mentioned the following:-- (1) To pay a visit to the sick (inquiring about his health), (2) to follow funeral processions, (3) to say to a sneezer, "May Allah be merciful to you" (if he says, "Praise be to Allah!"), (4) to return greetings, (5) to help the oppressed, (6) to accept invitations, (7) to help others to fulfill their oaths. (See Hadith No. 753, Vol. 7)