profit4u2 is correct. Hacking is a crime if you use it for illigal purposes. :)
It is like sharing files online. If you are a musician and you are recording your album, you can share your songs online with someone working on the project to mix it, for example. But if you are sharing the last album from your favourite band then it is illigal. It is all about what you are doing with the resources.
In the University where I work (and graduated) there is the course of Computer Forensic. They basicaly study to be hackers so they can hack into suspect computers and try to find proof that they are guilty and present the proof on court. That use of Hacking for example is Legal (done by someone with permition by the court)
Hope this helps