Cyber Risks · PortSwigger Research

Lab: Exploiting PHP deserialization with a pre-built gadget chain

Summary: PortSwigger's lab presents a PHP application with a serialization-based session mechanism that uses a signed cookie and a common PHP framework, with no source code access provided. The exercise is to identify the target framework, use the third-party PHPGGC tool to generate a malicious serialized object containing a remote code execution payload, and produce a valid signed cookie that deletes the morale.txt file from Carlos's home directory.

Bottom line: The exploit requires no source code: a pre-built gadget chain for a common PHP framework plus a forged signed cookie is enough to reach remote code execution, so a framework's own classes can supply the attack path when deserialization trusts user input.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related