Didcuz memcache+ssrf GETSHELL漏洞的解决方法 [复制链接]

moqu8 2017-5-4

2900 0
Didcuz memcache+ssrf GETSHELL漏洞的解决方法


145114azdsaah8q7hlozab.jpg



[p=null, 2, left]漏动来源:阿里云云盾[/p][p=null, 2, left]漏动名称:Didcuz memcache+ssrf GETSHELL漏洞[/p][p=null, 2, left]漏动描述:Discuz存在SSRF漏洞,在配置了memcache的情况下,攻击者可以利用ssrf通过memcache中转,向磁盘上写入WEBSHELL恶意代码,从而造成数据库泄漏;[/p][p=null, 2, left]漏动文件:/source/function/function_core.php[/p][p=null, 2, left]修复方法:[/p][p=null, 2, left]查找代码:[/p][p=null, 2, left]$content = preg_replace($_G['setting']['output']['preg']['search'], $_G['setting']['output']['preg']['replace'], $content);[/p][p=null, 2, left]在其中上面一行添加代码:[/p][p=null, 2, left]if (preg_match("(/|#|\+|%).*(/|#|\+|%)e", $_G['setting']['output']['preg']['search']) !== FALSE) { die("request error"); }[/p][p=null, 2, left]注意事项:如果是utf-8编码的话,该文件也是utf-8编码的,要注意用编辑器编辑保存的时候不要带bom,否则前台页面中可能出现多余空行或无法使用的情况。[/p]



最新回复 (0)
返回
支持中心
邮箱:winkill2012@qqcom
新站优化中!部分功能尚未完善,敬请谅解!
支持中心