SQLMap Section 3 of 13
Detection & Enumeration
SQLMap automatically detects SQL injection vulnerabilities and fingerprints the database management system.
Automatic Detection
Point SQLMap at any URL with a parameter to test:
bash
1sqlmap -u 'http://target.com/page?id=1'
SQLMap will test all parameters automatically and report which are injectable.
DBMS Fingerprinting
SQLMap identifies the database type automatically:
bash
1sqlmap -u 'http://target.com/page?id=1' --level=3
Supported databases: MySQL, PostgreSQL, MSSQL, Oracle, SQLite, DB2, Firebird, Sybase, etc.
Testing Specific Parameters
Test only specific parameters with -p:
bash
1sqlmap -u 'http://target.com/search?q=test&cat=1' -p q
POST Data Injection
Test POST parameters:
bash
1sqlmap -u 'http://target.com/login' --data='username=admin&password=pass'
Request File Method
Use Burp Suite exported requests:
bash
1sqlmap -r request.txt
Tip
Use
--batch to skip interactive prompts and accept defaults automatically.