Back to Browse

Exploiting Java deserialization with Apache Commons - Lab#05

806 views
Apr 5, 2025
9:44

In this video, I demonstrate how to exploit an insecure deserialization vulnerability using pre-built gadget chains from the Apache Commons Collections library. Even without access to the source code, I use a third-party tool like ysoserial to generate a malicious serialized Java object that executes a remote code execution (RCE) payload. The payload is designed to delete morale.txt from Carlos’s home directory. This is a great example of how powerful and dangerous gadget chains can be when deserialization is handled insecurely in Java applications. 🔹 Lab Type: Insecure Deserialization (Java) 🔹 Vulnerability: Unsafe use of Java serialization with gadget chains 🔹 Attack Goal: Delete morale.txt via RCE using Commons Collections gadget 🔹 Tool Used: ysoserial 🔹 Example Payload Generation: java -jar ysoserial.jar CommonsCollections2 'rm /home/carlos/morale.txt' | base64 -w 0 📌 Like & Subscribe for more ethical hacking tutorials and lab walkthroughs! 💻🔥 #InsecureDeserialization #ApacheCommonsCollections #GadgetChains #JavaRCE #WebSecurity #BugBounty #EthicalHacking #ysoserial

Download

0 formats

No download links available.

Exploiting Java deserialization with Apache Commons - Lab#05 | NatokHD