When Hermione told the animagus about Harry’s detentions and the marks in the back of his hands after, Sirius confronted Harry. After getting the details, he urged them to write to the Department of Magical Law Enforcement. It was illegal for someone to use a black quill (or a blood quill, depending on who you talk to) as a punishment.