You don't learn to be a 'hacker', in order to exploit security weaknesses in systems, websites etc. you first have to learn all about the system. Once you have studies and become well hearsed in what it is you want to break in to then it's simply a case of using your new found knowledge to test weaknesses.
For example, if you want to hack a website and it uses php, there is a page on the website where you can enter your email address to be added to the mailing list. Now we assume that when we enter our email address then that information will be added to a mysql database, which means the POST data sent will be inserted in to a query such as:
mysql_query("INSERT INTO maillist (email) VALUES ('".$_POST['email']."')");
Notice that the data isn't being processed and is just being input directly to the database (obviously we can't see the code but hacking is all about trial and error). So what we could type in to the email address form is:
x'); DROP TABLE maillist; --
Now what the new query will look like after the data has been inserted in to the query like above is:
INSERT INTO maillist (email) VALUES ('x'); DROP TABLE maillist; --
Now our unfortunate Mr WebHost has lost his entire mailing list because he didn't use mysql_real_escape_string before inserting his POST data.
Now this kind of thing you can expect to work on a site created by a complete noob to php programming, but very doubtful it will work on a pro's site, in fact it's probably impossible. When making attacks such as this you have to ensure you are selecting your targets carefully, some even put in measures to catch people in the act of hacking. I would demonstrate more examples over things such as .asp and through .exe files but I won't bother. I only learned about the different types of exploits myself to better protect my own software and website designs. Actually using this knowledge to cause random damage for no reason is just childish, it should only be used if you actually have a goal that needs accomplishing, such as gaining admin status for your favourite online game, or accessing a file on another persons computer and changing your college grades or such like.
Once you have the ability, USE IT RESPONSIBLY!!!
Comment/Reply (w/o sign-up)