Cyber Risks · PortSwigger Research

Lab: Exploiting Java deserialization with Apache Commons

Summary: This PortSwigger lab uses a serialization-based session mechanism and loads the Apache Commons Collections library, and it can be exploited without source code access using pre-built gadget chains. The task is to use a third-party tool such as ysoserial to generate a malicious serialized object containing a remote code execution payload, pass it into the website, and delete the morale.txt file from Carlos's home directory, logging in with the credentials wiener:peter.

What you should know: A session cookie that carries a serialized Java object is enough to turn a web request into remote code execution when Apache Commons Collections is on the classpath, and the only tooling the attacker needs is a public gadget-chain generator like ysoserial.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related