Well, in the courts of human law, they don't - they are considered property, and offenses against them are actually offenses against the owner or the state. This in no way changes my course of action, just the language I use to justify it. ("Your Honor, when the scumbag - ah, perp - attacked my dog I was put in fear for my life.").
As far as other Law goes, I have no question that my actions would be (at worst) forgiveable before the only Judge that ultimately matters. The G-d I worship is a dog lover.
I know dogs are considered property but we treat them like humans. I live in a area were people own pitbulls. If someone gets bit by a pitbull here they can't sue if...
1) you provoke the dog to bite. (Kids stabbing dog with sticks, breaking into premises where the dog lives or like that woman kicking the dog in the ribs.)
2) having dog properly secured in closure or leashed.
3) And does the dog have a history of biting people without reason.
A nice medical bill and being out of work should do.