312-50 ยท SQL injection
SQL injection tools and evasion
sqlmap key options (--dbs, --tables, --dump, --level, --risk), WAF evasion by encoding and comments, tool roles.
Key points
- sqlmap automates SQL injection detection and exploitation.
- u: target URL. --dbs: databases. --tables: tables. --dump: table entries.
- level (1-5): more parameters and payloads tested. --risk (1-3): riskier payloads.
- Filter and WAF evasion: URL or other encodings, inline comments, case changes; in sqlmap via tamper scripts (--tamper).
- Use only with written authorisation.
Source: https://github.com/sqlmapproject/sqlmap/wiki/Usage
Practice questions
Which sqlmap option lists the databases available on the DBMS?
- --dump
- --tables
- --dbs
- --risk
Show answer
Answer: C. --dbs
--dbs enumerates databases; --tables lists tables and --dump extracts rows.
Which are common ways to try to slip a payload past a simple filter?
- URL-encoding the payload
- Splitting keywords with inline comments
- Mixing upper and lower case in keywords
- Switching the connection to HTTPS only
- Using a longer database password
Show answer
Answer: A. URL-encoding the payload, B. Splitting keywords with inline comments, C. Mixing upper and lower case in keywords
Encoding, inline comments and case changes alter the payload's look while the database still parses it. Using a stronger password or HTTPS does nothing to a content filter.
A WAF makes parameterized queries unnecessary.
Show answer
Answer: False
False. A WAF is a compensating control that can be bypassed with encodings and tampering; the code flaw remains until queries are parameterized.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
