博客
关于我
【vulhub】Nginx 文件名逻辑漏洞(CVE-2013-4547)复现
阅读量:721 次
发布时间:2019-03-21

本文共 829 字,大约阅读时间需要 2 分钟。

这个环境是黑名单验证,我们无法上传php后缀的文件,需要利用CVE-2013-4547。

我们上传一个test.gif空格

注意后面的空格:传入一张图片格式的文件,内容就为phpinfo。

在这里插入图片描述

访问http://your-ip:8080/uploadfiles/test.gifaa.php,即可发现PHP已被解析

把aa替换为空格和分隔符

在这里插入图片描述

然后成功访问到
在这里插入图片描述

既然可以成功解析成php,那么我们现在来上马试试

这里我简单说下思路,通过上面的实验我们知道,如果要绕过黑名单,把文件变成php格式的话,是需要在bp里改编码的,

但是这里就遇到一个问题!!!!!!!!!!!
编码只能在bp里面改!!!!!!

通过想了很久和朋友的指点,想到了,可以写入一个旧马生成新马的方法。

代码如下

')?>

还是和上面一样,先把旧马上传上去。

在这里插入图片描述

开始上传

在这里插入图片描述

这是上传成功的样子
在这里插入图片描述
按照上面的思路,我们加个字符(这里我加的aa)

http://192.168.100.23:8080/uploadfiles/jiuma.gifaa.php

在这里插入图片描述

放包后,可以看到新马成功生成。
在这里插入图片描述
去访问一下新马。

http://192.168.100.23:8080/uploadfiles/xinma.php

成功访问到!!!!

在这里插入图片描述

详细文章

https://github.com/vulhub/vulhub/blob/master/nginx/CVE-2013-4547/README.md
https://blog.csdn.net/haha13l4/article/details/95949846
https://www.cnblogs.com/yuzly/p/11221564.html
https://blog.csdn.net/Blood_Pupil/article/details/88565176
https://www.cnblogs.com/bmjoker/p/9838600.html

你可能感兴趣的文章
NN&DL4.3 Getting your matrix dimensions right
查看>>
NN&DL4.7 Parameters vs Hyperparameters
查看>>
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named 'pandads'
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>