[Root-me]File upload - ZIP Writeup

个人博客地址

http://www.darkerbox.com

欢迎大家学习交流

Root-me网址:

https://www.root-me.org/fr/Challenges/Web-Serveur/File-upload-ZIP

题目描述:

Your goal is to read index.php file.

知识点

  • zip文件上传

在这里插入图片描述
是一个zip文件上传,上传后悔解压zip文件。

我写了个文件2.php,压缩为2.zip。
在这里插入图片描述
在这里插入图片描述

上传。被解压出来了。

在这里插入图片描述
在这里插入图片描述
直接访问会报403。因为php文件不能访问,只能访问txt/jpg。

在kali中创建软链接,再使用zip命令压缩符号链接文件。为什么是…/…/…/index.php?因为上传解压后的目录和index.php的目录差三级。

ln -s ../../../index.php index.txt、
zip --symlinks index.zip index.txt

在这里插入图片描述
点击上传。发现index.txt的大小比较大,点击index.txt.得到index.php代码

在这里插入图片描述
在这里插入图片描述
欢迎大家一起学习交流,共同进步,欢迎加入信息安全小白群

在这里插入图片描述

发布了38 篇原创文章 · 获赞 8 · 访问量 2091

猜你喜欢

转载自blog.csdn.net/qq_41918771/article/details/103791104