关联漏洞
标题:
PHP ‘php-cgi’ 参数信息泄漏漏洞
(CVE-2012-1823)
描述:PHP(PHP:Hypertext Preprocessor,PHP:超文本预处理器)是PHP Group和开放源代码社区共同维护的一种开源的通用计算机脚本语言。该语言主要用于Web开发,支持多种数据库及操作系统。 PHP中存在信息泄漏漏洞。远程攻击者可利用该漏洞在服务器进程上下文中查看文件的源代码,获取敏感信息,在受影响计算机上运行任意PHP代码,也可能执行其他攻击。
描述
PHP CGI Argument Injection.
介绍
# PHP CGI Argument Injection (CVE-2012-1823)
[](https://www.php.net/manual)
[](https://www.cve.org/CVERecord?id=CVE-2012-1823)
## Description
> sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle query strings that lack an = (equals sign) character, which allows remote attackers to execute arbitrary > code by placing command-line options in the query string, related to lack of skipping a certain php_getopt for the 'd' case.
## Usage
```
./php_cgi.sh http://<RHOST> <COMMAND>
```
## Example
```
./php_cgi.sh http://10.128.20.2 "whoami"
```

文件快照
[4.0K] /data/pocs/41cdcf23d6ab1c028eb77b4834e4612271d69a42
├── [4.0K] images
│ └── [6.5K] poc.png
├── [ 547] php_cgi.sh
└── [ 896] README.md
1 directory, 3 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。