来源:自学PHP网 时间:2015-04-17 12:00 作者: 阅读:次
[导读] 标题: Mybb All Versions Remote Command Execution作者 : Nafsh日期: 3 Oct 2012主页: http://Sec-Lab.Tap-Co.Net联系方式: Nafsh.Hack@Gmail.com##############################################......
标题: Mybb All Versions Remote Command Execution
作者 : Nafsh 日期: 3 Oct 2012 主页: http://Sec-Lab.Tap-Co.Net 联系方式: Nafsh.Hack@Gmail.com ######################################################### 源码下载 : http://www.mybb.com/download/latest 文件: /inc/3rdparty/diff/Diff/Engine/shell.php Bug 部分源码: $fp = fopen($to_file, 'w'); fwrite($fp, implode("\n", $to_lines)); fclose($fp); $diff = shell_exec($this->_diffCommand . ' ' . $from_file . ' ' . $to_file); unlink($from_file); unlink($to_file); 证明: $_GET + shell_exec() = Command Execution 缺陷描述: An attacker might execute arbitrary system commands with this vulnerability. User tainted data is used when creating the command that will be executed on the underlying operating system. This vulnerability can lead to full server compromise. 缺陷示例代码: 1: exec("./crypto -mode " . $_GET["mode"]); proof of concept : /index.php?mode=1;sleep 10; 补丁: www.2cto.com Limit the code to a very strict character subset or build a whitelist of allowed commands. Do not try to filter for evil commands. Try to avoid the usage of system command executing functions if possible. 1: $modes = array("r", "w", "a"); if(!in_array($_GET["mode"], $modes)) exit ; r D3m0 : http://www.minuteworkers.com/forum/inc/3rdparty/diff/Diff/Engine/shell.php?Find It In Source=RCE http://www.artistsuniverse.org/forum/inc/3rdparty/diff/Diff/Engine/shell.php?Find It In Source=RCE ######################################################### We are : K0242 | Nafsh | Ehram.shahmohamadi |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com