Skip to main content
SQL Injection is a security flaw that allows attackers to interfere with the database queries of an application, potentially viewing, modifying, or deleting data they shouldn’t access.

Entry Point Detection

The first step is finding a value you control that is injected into a query. Try these break characters:

SQL Comments by Database

Confirming with Logical Operations

Confirming with Timing

Identifying the Backend

Union-Based Exploitation

1

Find Number of Columns

Or use UNION SELECT with NULLs:
2

Extract Database Information

Error-Based Exploitation

When you can see error messages but not query output:

Blind SQL Injection

When you can only distinguish between true/false responses:

Time-Based Blind SQLi

Stacked Queries

Oracle does not support stacked queries. MySQL, Microsoft, and PostgreSQL do:

Out-of-Band Exfiltration

Authentication Bypass

WAF Bypasses

INSERT Statement Attacks

Bypass Column Name Restriction

Automated Exploitation

Resources

  • PayloadsAllTheThings SQL Injection wordlists
  • PortSwigger SQL Injection cheat sheet
  • SQLmap for automated exploitation