A PHP Filter Chain is a powerful technique that exploits the php://filter stream wrapper in PHP.
By chaining together specific character encoding filters (like convert.iconv.UTF8.UTF16, convert.base64-encode, etc.), an attacker can manipulate the data stream byte-by-byte. This capability allows attackers to:
- Bypass WAFs: Obfuscate payloads to evade detection.
- Achieve RCE: Generate arbitrary PHP code to be executed.
- Blind File Read: Create "Error Oracles" to leak sensitive files (like
config.php) even when the application produces no output.
This challenge demonstrates a Blind File Read vulnerability where you must use an error oracle to extract the flag from the server.
You can run this challenge instantly without cloning the code.
Docker Run Command:
docker run -d --restart always --name flag-red67 -p 9051:80 joshbeck2024/ctf-php-filter-chain-lesson-flag-red70:latestOnce running, access the challenge at: http://localhost:9051
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/androidteacher/PHP-Filter-Chain-Lesson.git cd PHP-Filter-Chain-Lesson -
Start the container:
docker-compose up -d --build
-
Access the Challenge: Navigate to
http://localhost:9051in your browser.
Solution Guide: https://humble-raptor-f30.notion.site/Red70-PHP-Filter-Chain-Lesson-2fa4c8e523768061bc1dfc42e70737b9?source=copy_link