SQL Injection Authentication Bypass Method:: Chinni Diwakar
SQL Injection Authentication Bypass Method:: Chinni Diwakar
Execute 1’ or ‘1’ = ‘1 in the both username and password fields. If the target web application is
vulnerable to the sql injection it will give access to you even with the mentioned malformed queries.
Chinni Diwakar 1
Chinni Diwakar 2
Chinni Diwakar 3
Sql Injection Manual Steps:
Just search for php?id= along with your favorite keywords in internet to find out vulnerable websites
if you get sql error or content miss in the webpage that website is vulnerable
Chinni Diwakar 4
Append order by 1--
order by 2--
Chinni Diwakar 5
if you get error at 11 means you have 10 columns
Chinni Diwakar 6
sometimes give negative php id also like
or
the above command will show you the vulnerable column numbers in web page.
you can simply replace with sql commands to get the sql query output.
Example
To know the version of database server execute command like below image
Chinni Diwakar 7
To know the host and username execute command like below image.
Chinni Diwakar 8
Now if you want you can execute some commands to retrieve database information also like tables
Chinni Diwakar 9
Then you can extract column names from a table like this
Chinni Diwakar 10
Chinni Diwakar 11
php?id=-1 union select 1,2,group_concat(column name your want to get),4,5,6,7 from <table_name>--
Chinni Diwakar 12
Chinni Diwakar 13
Performing Sql Injection with SQL map tool.
Finding out vulnerable website from google
Search for php?id= along with the combination of other google dorks to find out vulnerable pages.
Chinni Diwakar 14
This will leakout the target sql server database names. Then we have to retrieve the table names from
the database with the below given command.
Chinni Diwakar 15
After some processing like the above picture you will get table names like the below picture
Chinni Diwakar 16
Next we need to extract columns information from the above shown tables for that follow the given
command.
Chinni Diwakar 17
You will get column names like this
Chinni Diwakar 18
Finally we need to grab the contents in the database columns with the below command.
sqlmap –u <URL of the vulnerable website> -D <database> -T <table name> -C <columnnames> --dump
Chinni Diwakar 19
You will be asked few questions in order to get the contents act according to the questions, you can see
few in the above image. Finally you will get data like shown in the below image.
Chinni Diwakar 20
Chinni Diwakar 21