Payload topic
SQL Injection (SQLi) is a type of security vulnerability that allows an attacker to interfere with the queries that an application makes to its database. SQL Injection is one of the most common and severe types of web application vulnerabilities, enabling attackers to execute arbitrary SQL code on…
- Passages
- 186
Contents
- SQL Injection
- Entry Point Detection
- DBMS Identification Keyword Based
- DBMS Identification Error Based
- Authentication Bypass
- Raw MD5 and SHA1
- Hashed Passwords
- UNION Based Injection
- Error Based Injection
- Blind Injection
- Boolean Based Injection
- Blind Error Based Injection
- Time Based Injection
- Out of Band (OAST)
- Stacked Based Injection
- Polyglot Injection
- Routed Injection
- Second Order SQL Injection
- PDO Prepared Statements
- Generic WAF Bypass
- No Space Allowed
- Alternative Whitespace Characters
- Bypassing with Comments and Parentheses
- No Comma Allowed
- No Equal Allowed
- Case Modification
- BigQuery Injection: Google BigQuery SQL Injection
- BigQuery Injection: Detection
- BigQuery Injection: BigQuery Comment
- BigQuery Injection: BigQuery Union Based
- BigQuery Injection: BigQuery Error Based
- BigQuery Injection: BigQuery Boolean Based
- BigQuery Injection: BigQuery Time Based
- Cassandra Injection: Cassandra Injection
- Cassandra Injection: CQL Injection Limitations
- Cassandra Injection: Cassandra Comment
- Cassandra Injection: Example #1
- Cassandra Injection: Example #2
- DB2 Injection: DB2 Injection
- DB2 Injection: DB2 Comments
- DB2 Injection: DB2 Default Databases
- DB2 Injection: DB2 Enumeration
- DB2 Injection: DB2 Methodology
- DB2 Injection: DB2 Error Based
- DB2 Injection: DB2 Blind Based
- DB2 Injection: DB2 Time Based
- DB2 Injection: DB2 Command Execution
- DB2 Injection: Avoiding Quotes
- DB2 Injection: DB2 Accounts and Privileges
- MSSQL Injection: MSSQL Injection
- MSSQL Injection: MSSQL Default Databases
- MSSQL Injection: MSSQL Comments
- MSSQL Injection: MSSQL Enumeration
- MSSQL Injection: MSSQL List Databases
- MSSQL Injection: MSSQL List Tables
- MSSQL Injection: MSSQL List Columns
- MSSQL Injection: MSSQL Union Based
- MSSQL Injection: MSSQL Error Based
- MSSQL Injection: MSSQL Blind Based
- MSSQL Injection: MSSQL Blind With Substring Equivalent
- MSSQL Injection: MSSQL Time Based
- MSSQL Injection: MSSQL Stacked Query
- MSSQL Injection: MSSQL Read File
- MSSQL Injection: MSSQL Write File
- MSSQL Injection: XPCMDSHELL
- MSSQL Injection: Python Script
- MSSQL Injection: MSSQL DNS exfiltration
- MSSQL Injection: MSSQL UNC Path
- MSSQL Injection: MSSQL Trusted Links
- MSSQL Injection: MSSQL List Permissions
- MSSQL Injection: MSSQL Make User DBA
- MSSQL Injection: MSSQL Database Credentials
- MSSQL Injection: MSSQL OPSEC
- MySQL Injection: MySQL Injection
- MySQL Injection: MYSQL Default Databases
- MySQL Injection: MYSQL Comments
- MySQL Injection: MYSQL Testing Injection
- MySQL Injection: Detect Columns Number
- MySQL Injection: Iterative NULL Method
- MySQL Injection: ORDER BY Method
- MySQL Injection: LIMIT INTO Method
- MySQL Injection: Extract Database With InformationSchema
- MySQL Injection: Extract Columns Name Without InformationSchema
- MySQL Injection: Extract Data Without Columns Name
- MySQL Injection: MYSQL Error Based
- MySQL Injection: MYSQL Error Based - Basic
- MySQL Injection: MYSQL Error Based - UpdateXML Function
- MySQL Injection: MYSQL Error Based - Extractvalue Function
- MySQL Injection: MYSQL Error Based - NAMECONST function (only for constants)
- MySQL Injection: MYSQL Blind With Substring Equivalent
- MySQL Injection: MYSQL Blind Using a Conditional Statement
- MySQL Injection: MYSQL Blind With MAKESET
- MySQL Injection: MYSQL Blind With LIKE
- MySQL Injection: MySQL Blind with REGEXP
- MySQL Injection: MYSQL Time Based
- MySQL Injection: Using SLEEP in a Subselect
- MySQL Injection: Using Conditional Statements
- MySQL Injection: MYSQL DIOS - Dump in One Shot
- MySQL Injection: MYSQL Current Queries
- MySQL Injection: MYSQL Read Content of a File
- MySQL Injection: WEBSHELL - OUTFILE Method
- MySQL Injection: WEBSHELL - DUMPFILE Method
- MySQL Injection: COMMAND - UDF Library
- MySQL Injection: MYSQL INSERT
- MySQL Injection: MYSQL Truncation
- MySQL Injection: MYSQL Out of Band
- MySQL Injection: DNS Exfiltration
- MySQL Injection: UNC Path - NTLM Hash Stealing
- MySQL Injection: Alternative to Information Schema
- MySQL Injection: Alternative to VERSION
- MySQL Injection: Alternative to GROUPCONCAT
- MySQL Injection: Scientific Notation
- MySQL Injection: Conditional Comments
- MySQL Injection: Wide Byte Injection (GBK)
- OracleSQL Injection: Oracle SQL Injection
- OracleSQL Injection: Oracle SQL Default Databases
- OracleSQL Injection: Oracle SQL Comments
- OracleSQL Injection: Oracle SQL Enumeration
- OracleSQL Injection: Oracle SQL Database Credentials
- OracleSQL Injection: Oracle SQL List Databases
- OracleSQL Injection: Oracle SQL List Tables
- OracleSQL Injection: Oracle SQL List Columns
- OracleSQL Injection: Oracle SQL Error Based
- OracleSQL Injection: Oracle SQL Blind
- OracleSQL Injection: Oracle Blind With Substring Equivalent
- OracleSQL Injection: Oracle SQL Time Based
- OracleSQL Injection: Oracle SQL Out of Band
- OracleSQL Injection: Oracle SQL Command Execution
- OracleSQL Injection: Oracle Java Execution
- OracleSQL Injection: Oracle Java Class
- OracleSQL Injection: Package oscommand
- OracleSQL Injection: DBMSSCHEDULER Jobs
- OracleSQL Injection: OracleSQL File Manipulation
- OracleSQL Injection: OracleSQL Read File
- OracleSQL Injection: OracleSQL Write File
- PostgreSQL Injection: PostgreSQL Injection
- PostgreSQL Injection: PostgreSQL Comments
- PostgreSQL Injection: PostgreSQL Enumeration
- PostgreSQL Injection: PostgreSQL Methodology
- PostgreSQL Injection: PostgreSQL Error Based
- PostgreSQL Injection: PostgreSQL XML Helpers
- PostgreSQL Injection: PostgreSQL Blind With Substring Equivalent
- PostgreSQL Injection: Identify Time Based
- PostgreSQL Injection: Database Dump Time Based
- PostgreSQL Injection: Table Dump Time Based
- PostgreSQL Injection: Columns Dump Time Based
- PostgreSQL Injection: PostgreSQL Out of Band
- PostgreSQL Injection: PostgreSQL Stacked Query
- PostgreSQL Injection: PostgreSQL File Read
- PostgreSQL Injection: PostgreSQL File Write
- PostgreSQL Injection: Using COPY TO/FROM PROGRAM
- PostgreSQL Injection: Using libc.so.6
- PostgreSQL Injection: Alternative to Quotes
- PostgreSQL Injection: PostgreSQL List Privileges
- PostgreSQL Injection: PostgreSQL Superuser Role
- SQLite Injection: SQLite Injection
- SQLite Injection: SQLite Comments
- SQLite Injection: SQLite Enumeration
- SQLite Injection: SQLite String Methodology
- SQLite Injection: SQLite Blind Methodology
- SQLite Injection: SQLite Blind With Substring Equivalent
- SQLite Injection: SQlite Error Based
- SQLite Injection: SQlite Time Based
- SQLite Injection: Attach Database
- SQLite Injection: Loadextension
- SQLite Injection: SQLite Read File
- SQLite Injection: SQLite Write File
- SQLmap: SQLmap
- SQLmap: Basic Arguments For SQLmap
- SQLmap: Load A Request File
- SQLmap: Custom Injection Point
- SQLmap: Second Order Injection
- SQLmap: Getting A Shell
- SQLmap: Crawl And Auto-Exploit
- SQLmap: Proxy Configuration For SQLmap
- SQLmap: Injection Tampering
- SQLmap: Suffix And Prefix
- SQLmap: Default Tamper Scripts
- SQLmap: Custom Tamper Scripts
- SQLmap: Custom SQL Payload
- SQLmap: Evaluate Python Code
- SQLmap: Preprocess And Postprocess Scripts
- SQLmap: Preprocessing Script (preprocess.py)
- SQLmap: Postprocessing Script (postprocess.py)
- SQLmap: Reduce Requests Number
- SQLmap: SQLmap Without SQL Injection
The `--eval` option lets you define or modify request parameters using Python. The evaluated variables can then be used inside the URL, headers, cookies, etc.
Particularly useful in scenarios such as:
* **Dynamic parameters**: When a parameter needs to be randomly or sequentially generated.
* **Token generation**: For handling CSRF tokens or dynamic auth headers.
* **Custom logic**: E.g., encoding, encryption, timestamps, etc.
sqlmap -u "http://example.com/vulnerable.php?id=1" --eval="import random; id=random.randint(1,10)"
sqlmap -u "http://example.com/vulnerable.php?id=1" --eval="import hashlib;id2=hashlib.md5(id).hexdigest()"
sqlmap -u 'http://example.com/vulnerable.php?id=1' --preprocess=preprocess.py --postprocess=postprocess.py
The preprocessing script is used to modify the request data before it is sent to the target application. This can be useful for encoding parameters, adding headers, or other request modifications.
--preprocess=preprocess.py Use given script(s) for preprocessing (request)
**Example preprocess.py**:
#!/usr/bin/env python
def preprocess(req):
print("Preprocess")
print(req)
The postprocessing script is used to modify the response data after it is received from the target application. This can be useful for decoding responses, extracting specific data, or other response modifications.
--postprocess=postprocess.py Use given script(s) for postprocessing (response)
The parameter `--test-filter` is helpful when you want to focus on specific types of SQL injection techniques or payloads. Instead of testing the full range of payloads that SQLMap has, you can limit it to those that match a certain pattern, making the process more efficient, especially on large or slow web applications.
sqlmap -u "https://www.target.com/page.php?category=demo" -p category --test-filter="Generic UNION query (NULL)"
sqlmap -u "https://www.target.com/page.php?category=demo" --test-filter="boolean"
By default, SQLmap runs with level 1 and risk 1, which generates fewer requests. Increasing these values without a purpose may lead to a larger number of tests that are time-consuming and unnecessary.
sqlmap -u "https://www.target.com/page.php?id=1" --level=1 --risk=1
Use the `--technique` option to specify the types of SQL injection techniques to test for, rather than testing all possible ones.
sqlmap -u "https://www.target.com/page.php?id=1" --technique=B
Using SQLmap without exploiting SQL injection vulnerabilities can still be useful for various legitimate purposes, particularly in security assessments, database management, and application testing.
You can use SQLmap to access a database via its port instead of a URL.
sqlmap -d "mysql://user:pass@ip/database" --dump-all
For testing systems you own or are authorised to test, and for defending them. Nothing here is run by this page. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky. The repository. Data as of 2026-11-14.