I like the idea of white hat hacking. That's why I'd like to become a pentester in the future. But now I like to learn a bit and was wondering, if it's legal to search for SQL injection, XSS and some other Basic stuff for webapplications, with the intention to report them to the webmaster.
If this matters, I'm from Germany, we have the so called "Hackerparagraph" (§ 202c StGB) which criminalizes the attempt of trying to break into a system or even develop such code/tools. Theoretically, a successful injection would be an act of crime.
But what is, if this is for a good cause? Should I fear that the admin will report my action to the police?
E.g if i write the admin an email like this:
Dear Admin,
I found a vulnerability for an SQL Injection on yout Page XXX. I had/have no intention to share this vulnerability with somone except you.
http://domain.de/site.php?cat=1&s_id=4818&p_id=13807&r_id=4&nr_id=647568+%27and+%271%27=%272%27+union+select+1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,version(),7,8,9,0,1,2,3,4,5,6,7,8,9--+
I'd recommend you to [explain various things about security]. I hope this helps you and your company to guarantee the safety of yours and your customers.