![]() |
|
[HOT TUTORIAL 2016] How to hack a website! [SQL Injection - Kali Linux] - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449) +---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4) +----- Forum: Hacking Tutorials (https://hackforums.net/forumdisplay.php?fid=47) +----- Thread: [HOT TUTORIAL 2016] How to hack a website! [SQL Injection - Kali Linux] (/showthread.php?tid=5082757) Pages: Pages
1
2
|
[HOT TUTORIAL 2016] How to hack a website! [SQL Injection - Kali Linux] - SilentkillarHF - Dec 5, 2015 Greetings, Hackforums!
My name is Silentkillar, and in this thread I will try to make a detailed and understandable tutorial on how to hack into a website's database, with sqlmap. I will try to explain as much as I can, of what I am doing. So let's just get started. Before we start Before I start this tutorial, I wanna recommend using Kali Linux on a virtual machine, as I find it the most useful. We will be using a tool called sqlmap, which is in Kali Linux. You can ofcourse download the tool from their website instead, if you don't want to use Kali. Sqlmap is an automatic SQL injection tool, which I personally prefer instead of doing a manual SQL injection, because I think it's faster, and you don't really need any skills in using codes. I think it's simple and easy to use! But let's get down to business! Finding a vulnerable site! To find a vulnerable site you will need some dorks. You can write a dork in google search, to find something specific. In our case we will be attacking a .php site. A dork to find vulnerable .php sites could be: Code inurl:catalog.php?id=Whenever you found a website with one of these dorks in their url, you can test if it is vulnerable or not. To do that make an apostrophe in the ending of the url Example: Code vulnerablesite.com/category.php?c=23'If a MySQL error appears somewhere on your screen/website, you've found a vulnerable spot on the website! But if a MySQL doesn't appear, it isn't vulnerable. So just keep looking on google untill you find a vulnerable website! :) Now that we found our vulnerable spot, we're ready to move on to the next step! Getting their database names! Now we need to get in their database and get some goodies of information, which is the exciting part! ;P. So boot up Kali Linux and open a terminal! When you've opened a terminal, type in: Code sqlmap -u YOURVULNERABLEWEBSITE --dbsWell, first we tell our terminal that want to use sqlmap. Then we use the option "-u", I usually like to tell that it's the option for using a link, which we are, and that it stands for "URL" ;D. Then you paste in your vulnerable website, example: Code vulnerablesite.com/category.php?id=1After you've hit enter alot of text will start being written. If any white texted messages pop up, you usually wanna type "y" for yes if you wish to continue. You just wait untill it stops and looks like this: This means that we have succesfully found the websites databases! Usually there's a database called "Information_schema", and there's no useful information in there, so try some of the other databases you might have found. Congratulations on your first hacked website. But we're not totally done yet. What do I do now you ask?. We steal information! Which leads us to the next step!: Finding the tables of the databases! To find the tables of the databases you will need to write some more on the code you wrote earlier. So type hit the up-arrow on your keyboard to bring up the code you just wrote before. Then we need to edit it a bit. Change it to this: Code sqlmap -u YOURVULNERABLEWEBSITE -D DATABASENAME --tablesCode sqlmap -u vulnerablesite.com/category.php?id=1 -D database123 --tablesYou've succesfully found the tables inside your chosen database. Now you wanna look for some interesting tables. In the picture above, then in my case it would be the table "user". There might be user informations like usernames, passwords, emails, etc. So choose a table that looks interesting, and we'll be moving on to the next step! Finding the columns of the tables! We'll be finding the columns of the table we chose to be interesting. So hit the up-arrow once again to bring up the code you just used before. Now we need to edit the code a bit, just like the last time. It will now look like this: Code sqlmap -u YOURVULNERABLEWEBSITE -D DATABASENAME -T TABLENAME --columnsThen after "-T" we wrote our table name. After we wrote our table name, we wrote "--columns". We use double dash because we wanna find out something. This code could look like this: Code sqlmap -u vulnerablesite.com/category.php?id= -D exampledatabase -T user --columnsWe now have found our columns, and as you can see above, I've found ALOT of interesting things like email, ip, moderator, password and username. These could be interesting to know what's inside! So let's move on the the last step! Getting the informations inside the columns So we found some pretty interesting things in the tables. Now we want to find out what they contain. So let's hit the up-arrow button once again and change the code a bit. Code sqlmap -u YOURVULNERABLEWEBSITE -D DATABASENAME -T TABLENAME -C COLUMNNAME --dumpThen we wrote our column name. And then we wrote "--dump" It would look like this: Code sqlmap -u vulnerablesite.com/category.php?id= -D exampledatabase -T user -C passwords --dumpIt will again start working, and after some seconds your wanted information comes up. You succesfully got into a websites database and found some information! Hope you learned something! Thanks for reading! - Silentkillar It took me many hours to make a perfect guide, with pictures and goods. But when I tried posting it, it said I needed 50 posts to have images.. :( Had to edit it alot until it let me post it! But.. Hope you understood it all anyway! :) - Silentkillar * - GOD OF SARADOMIN - Dec 5, 2015 well well well , if there no copy paste i l VOUCH for you , thanks though * - SilentkillarHF - Dec 5, 2015 (Dec 5, 2015 12:04 PM)GOD OF SARADOMIN Wrote: well well well , if there no copy paste i l VOUCH for you , thanks though It is all written by me :) And thanks alot! - Silentkillar * - Iterator - Dec 5, 2015 Well written tutorial, thanks * - GOD OF SARADOMIN - Dec 5, 2015 (Dec 5, 2015 12:09 PM)SilentkillarHF Wrote: It is all written by me :) And thanks alot! Ok Great Work Then KEEP HQ * - SilentkillarHF - Dec 5, 2015 (Dec 5, 2015 12:22 PM)GOD OF SARADOMIN Wrote: Ok Great Work Then KEEP HQ I will definetly do :) (Dec 5, 2015 12:13 PM)m__m Wrote: Well written tutorial, thanks You're welcome! :) * - Aakash_Choudhary - Dec 6, 2015 (Dec 5, 2015 12:22 PM)GOD OF SARADOMIN Wrote: Ok Great Work Then KEEP HQ There is nothing much which can make it HQ 😠 Infact you will get more than this if you visit pastebin site and type sqlmap tutorial and we will get much better tutorial on this * - TheGodOfGodz - Dec 6, 2015 Vouch for this ''hero''! Best tutorial! * - CyberError - Dec 6, 2015 best tut on hf ///// Thump up for you * - swaggy_P_38 - Apr 25, 2016 the sqlmap wont work for me? * - The Kraken - Apr 25, 2016 Nice tutorial man, keep up the HQ posts! * - sam786000 - Apr 27, 2016 thanks for the information * - equi_gonzales13 - Nov 8, 2016 Good job OP ! Couldn't be explained better * - PrO__KiLeR - Nov 8, 2016 SQLi i so old methode... i don't think sites still use it * - CountZer0 - Nov 8, 2016 Bookmarking this for later use, thanks |