Sqlmap
Purpose
Use this skill only after manual triage suggests a credible injection candidate and the rules of engagement allow controlled validation.
Phase Fit
- Primary: Validation and Controlled Impact Demonstration
- Secondary: Vulnerability Analysis, Retest and Closure
Use When
- Need to validate a likely SQL injection issue with the lowest safe settings.
- Need to replay a captured request during a controlled retest.
- Need a repeatable proof path for an already triaged injection candidate.
Avoid When
- The issue has not been manually triaged.
- Data extraction or state-changing behavior is not explicitly approved.
Inputs
- Confirmed target URL or captured request file
- Suspected parameter and auth context
- Approved impact ceiling and stop conditions
Procedure
- Start with the lowest risk and level settings.
- Validate only the specific parameter or request already under review.
- Keep automated behavior narrow and observable.
- Stop as soon as the issue is confirmed to the approved standard.
- Preserve the exact request path and options for retest.
Command Syntax
Replace sample targets with approved in-scope assets and keep settings conservative.
# Basic GET parameter injection test
sqlmap -u 'https://portal.contoso.com/item?id=1' --batch --level 1 --risk 1
# Test a saved HTTP request file (e.g., exported from Burp)
sqlmap -r request.txt --batch --level 1 --risk 1
# Authenticated scan with session cookie
sqlmap -u 'https://portal.contoso.com/item?id=1' --cookie='session=<token>' --batch
# POST parameter injection
sqlmap -u 'https://portal.contoso.com/search' --data='query=test&cat=1' --batch
# Enumerate databases (only after confirmed injection)
sqlmap -u 'https://portal.contoso.com/item?id=1' --dbs --batch
# Dump a specific table
sqlmap -u 'https://portal.contoso.com/item?id=1' -D appdb -T users --dump --batch
# Specify DBMS to reduce fingerprinting noise
sqlmap -u 'https://portal.contoso.com/item?id=1' --dbms=mssql --batch --level 1 --risk 1
Evidence to Capture
- The specific parameter or request path that validated
- Preconditions required for the issue to reproduce
- The minimum options needed to reproduce during retest
Safety Boundaries
- Do not escalate to data dumping or destructive options without explicit written approval.
- Stop immediately if the application shows instability or unintended state changes.