If someone is shooting at you, it's not your responsibility or obligation to figure out why they are shooting, or who they are- you just need to shoot back. Killing them is a good thing. Unless you are the one trespassing or stealing. But you wouldn't be doing that, would you?
Anyone wanting to prevent that by "law" or in any other way is NOT a friend of life, liberty, or the pursuit of happiness. They are a murderous monster. Treat them as such.