But seriously--anything you might consider "subversive hacking" is illegal. I'm trying to think of an exception, and one really isn't coming to mind. It's legal to port scan people, but scanning the government or military is sort of asking for trouble.
It is easy to get caught if you don't know how to cover your tracks. I'm not going to give more details on not getting caught doing illegal things, because that's not how I roll.
I work in information security, and would love to point you in the direction of legal (but still cool) resources. One popular resource is the Offensive Security Metasploit Unleashed course http://www.offensive-security.com/metasploit-unleashed/Metas... -- It's well written and teaches you pretty much all there is to know about Metasploit, from basic usage to advanced scripting.
Hope that helps a little bit, and remember--the knowledge isn't illegal, but breaking into systems without propor authorization is. Don't throw away a bright future because you want to see what's on some random box.