[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文件上传

[Root-me]File upload - ZIP Writeup_第1张图片
是一个zip文件上传,上传后悔解压zip文件。

我写了个文件2.php,压缩为2.zip。
[Root-me]File upload - ZIP Writeup_第2张图片
[Root-me]File upload - ZIP Writeup_第3张图片

上传。被解压出来了。

[Root-me]File upload - ZIP Writeup_第4张图片
在这里插入图片描述
直接访问会报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代码

在这里插入图片描述
[Root-me]File upload - ZIP Writeup_第5张图片
欢迎大家一起学习交流,共同进步,欢迎加入信息安全小白群

在这里插入图片描述

你可能感兴趣的:(Rootme)