Hello friends, we've already wrote couple of articles on SQL Injection Hacking Website with easy steps, and Click here for more. Today's post is about Hacking website Database through MySQL Injection - (Backtrack SQLMAP) Technique.
Requirements :
- Backtrack or Kali Linux
- DVWA or (Best Penetration testing lab in Backtrack/Kali)
- Mozilla Firefox with Tamper Data
- Brain
As you know guys our all post is pure ethical hacking. So here today we'll learn how an attacker can get complete database of any MySQL Vulnerable website just with simple techniques. Victim - (DVWA)
SQL Injection attack through Backtrack - (SQLmap)
- Start your Backtrack with DVWA - Penetration testing lab in Backtrack
- Login DVWA and Click on [SQL Injection] Tab and Security level on [Low]
Click on Image to enlarge it
Start Tamper Data and Click on [Start Tamper]
Click on Image to enlarge it
Back to DVWA - SQLi : Enter 1 into user id and [Submit]
Tamper Data Pop-up -> Click on [Tamper] and Copy entire cookie and paste it in one text file. Next click on Ok - come back to dvwa : again copy entire URL.
Click on Image to enlarge it
Copy Entire URL
Copy all data in one text file we'll modify URL,
Cookies and Some others Sqlmap commands :
So here i created one image follow it and change copied data into sqlmap commands :
* First of all Copy URL and Cookies into Text file
* Modify cookies and remove some unwanted cookie
* Finally Just add some simple sqlmap commands
Understand with this Image : Click to enlarge it
- Now start Sqlmap automatic SQL Injection tool :
Backtrack> Application > Exploitation tools > Web Explot. tools > Sqlmap
Now it's time to understand that sqlmap commands : we're using cookie and submit button value as parameter and injecting command through sqlmap.
Copy entire command into SQLmap terminal and hit Enter : -
Wait...! until it scan web server database and search for injectable parameter, And finally we found Website Database :
Click on image to enlarge it
Cool, we got Database now it's time to dig more and harvest information, Tables, columns, data, username, passwords etc. again we've to modify small part of sqlmap commands : Just remove string and dbs from command and add database name and get table injection commmand :
Click on image to enlarge it
Write that command and hit enter so, you'll get Tables from dvwa database.
We found users table, now we've to dig more and harvest USERS columns.
Click on image to enlarge it
Well, m teaching you complete tutorial so please try to understand all commands and injection methods : here we go and got table Columns.
Click on image to enlarge it
Fine, we're going smoothly and the last step left is to extract complete username, password, id and etc.. so the last command is just replace --columns with --dump
Click on image to enlarge it
Enter that command wait for 20 Seconds and you'll get complete table, user, column and data like username, password, id, avatar, etc.!
Click on image to enlarge it
So finally we extracted data and now we got RAW text password with MD5 Hash.. don't worry sqlmap already cracked all MD5 encrypted passwords.
Thank you for reading this post, Please share it to increase us and share knowledge, always feel free to comment and let me know your problems and doubts. You can also follow me on Twitter or Hackw0rm Fb page to get daily hacking stuffs, tricks, etc.