Bitzu

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

Single choice

Which sqlmap option lists the databases available on the DBMS?

  1. --dump
  2. --tables
  3. --dbs
  4. --risk
Show answer

Answer: C. --dbs

--dbs enumerates databases; --tables lists tables and --dump extracts rows.

Select all that apply

Which are common ways to try to slip a payload past a simple filter?

  1. URL-encoding the payload
  2. Splitting keywords with inline comments
  3. Mixing upper and lower case in keywords
  4. Switching the connection to HTTPS only
  5. 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.

True or false

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.

Download on the App StoreGet it on Google Play

More 312-50 topics in this module