Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-4577 PoC — Argument Injection in PHP-CGI

Source
Associated Vulnerability
Title:Argument Injection in PHP-CGI (CVE-2024-4577)
Description:In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, when using Apache and PHP-CGI on Windows, if the system is set up to use certain code pages, Windows may use "Best-Fit" behavior to replace characters in command line given to Win32 API functions. PHP CGI module may misinterpret those characters as PHP options, which may allow a malicious user to pass options to PHP binary being run, and thus reveal the source code of scripts, run arbitrary PHP code on the server, etc.
Description
php-cgi-cve-2024-4577
Readme
# php-cgi-cve-2024-4577
php-cgi-cve-2024-4577

국외 IP 내부서버로 PHP-CGI CVE-2024-4577 Argument Injection 이벤트 탐지에 등록된 php 언어의 cgi 모드에서 발생하는 원격 코드 실행 취약점이며, 윈도우 환경에서 php가 cgi 모드로 실행될 경우 유니코드 문자를 지원하지 않는 시스템에서도 가장 유사한 문자로 매핑하여 변환하는 Best-fit 기능이 잘못된 인코딩 변환을 일으켜 발생하는 이벤트

-> Raw Data
```
POST /php-cgi/php-cgi%ADd + cgiforce_redirect%3D0 + %ADd + disable_functions%3D%22%22 + %ADd

%AD <- %뒤에 오는 두 문자를 Decode 하였더니 아무 문자도 나오지 않는다 이는 이 php가 자동으로 변환해주는(좋은뜻으로) 기능을 악용하여 악성코드를 삽입한다거나 하는 2차 공격이 이어질 수 있으므로 차단. Block
```
File Snapshot

[4.0K] /data/pocs/f7637cc46a26fc2f20139fce3d840df36dd6282c └── [ 877] README.md 0 directories, 1 file
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →