ODDFuzz: Hunting Java Deserialization Gadget Chains via Structure-Aware Directed Greybox Fuzzing
This talk introduces ODDFuzz, a novel hybrid approach for automatically discovering Java deserialization gadget chains by combining lightweight static analysis with directed greybox fuzzing. The technique addresses the limitations of existing static analysis tools, which often struggle with dynamic language features like runtime polymorphism, and traditional fuzzers, which lack the structure awareness needed to generate valid serialized objects. The researchers demonstrate the tool's effectiveness by identifying 13 previously unknown gadget chains in real-world applications, including Oracle WebLogic Server and Apache Dubbo, several of which were assigned CVEs. The approach significantly improves both precision and recall in identifying exploitable deserialization paths.
Automating Java Deserialization Gadget Chain Discovery with ODDFuzz
TLDR: Java deserialization remains a critical vector for remote code execution, but finding new gadget chains is notoriously manual and error-prone. ODDFuzz automates this process by combining lightweight static analysis with directed greybox fuzzing to identify exploitable paths that traditional tools miss. Researchers used this approach to uncover 13 new gadget chains in major enterprise software like Oracle WebLogic and Apache Dubbo, resulting in multiple new CVEs.
Deserialization vulnerabilities are the gift that keeps on giving. While the industry has spent years cataloging gadgets for common libraries, the sheer complexity of modern Java applications means that custom, application-specific gadget chains are still lurking in the wild. Most static analysis tools fail here because they struggle with the dynamic nature of Java, specifically runtime polymorphism and complex call graphs. When you combine that with the difficulty of generating valid serialized objects for a fuzzer, you end up with a massive blind spot in your testing methodology.
The research presented at Black Hat 2023 introduces ODDFuzz, a tool that bridges this gap. Instead of relying on purely static or purely dynamic analysis, it uses a hybrid approach. It starts by performing lightweight static analysis to identify potential gadget chains, then uses that information to guide a greybox fuzzer. This is the difference between throwing random bytes at an endpoint and having a surgical map of the application's internal logic.
The Mechanics of the Attack
At its core, a deserialization gadget chain is just a sequence of method calls that starts with a "magic" method—like readObject or readResolve—and ends in a "sink" that performs a dangerous action, such as executing a system command or writing a file. The challenge is that the path between the source and the sink is often obscured by layers of abstraction.
ODDFuzz tackles this by constructing a "Property Tree" to handle the complex structure of serialized objects. Traditional fuzzers often fail because they generate malformed objects that are rejected by the application before they ever reach the vulnerable sink. By using static analysis to understand the required object structure, ODDFuzz generates seeds that are much more likely to pass initial validation checks.
The tool then employs a directed greybox fuzzing strategy. It uses a feedback loop where the fuzzer prioritizes seeds that get closer to the sink method in the call graph. This is a massive improvement over standard coverage-guided fuzzing, which might spend hours exploring irrelevant code paths that have nothing to do with the deserialization logic.
Technical Implementation and Real-World Impact
During the research, the team applied ODDFuzz to a variety of targets, including Oracle WebLogic Server, Sonatype Nexus, and Apache Dubbo. The results were significant. By automating the discovery process, they identified 13 previously unknown gadget chains.
One of the most interesting aspects of the tool is how it handles the "sink" identification. It looks for known security-sensitive methods and works backward to find paths that can be triggered via deserialization. For a pentester, this means you can point the tool at a library or an application and get a list of potential RCE paths without having to manually trace through thousands of lines of code.
If you are performing a penetration test on an application that uses Java serialization, you should be looking at the OWASP Deserialization Cheat Sheet to understand the baseline risks. However, when the standard ysoserial payloads don't work, you are often stuck. ODDFuzz provides a way to generate custom payloads tailored to the specific application you are testing.
Defensive Considerations
Defending against these attacks is difficult because serialization is often deeply embedded in the communication protocols of enterprise Java applications. The most effective defense is to avoid native Java serialization entirely. If you must use it, you need to implement strict look-ahead deserialization, which validates the class type before the object is instantiated. This is a classic A08:2021 – Software and Data Integrity Failures scenario. Relying on a blacklist of "bad" classes is a losing battle, as researchers will always find new gadgets that bypass your filters.
For those of you doing active research, the release of ODDFuzz is a signal to update your toolkit. The days of relying solely on public gadget chains are numbered. As applications become more complex, the ability to automatically discover application-specific chains will become a standard requirement for any serious security assessment. Download the tool, run it against your target's dependencies, and see what paths it uncovers. You might be surprised at what is hiding in the code you thought was already secure.
Vulnerability Classes
Target Technologies
Attack Techniques
OWASP Categories
All Tags
Up Next From This Conference

Chained to Hit: Discovering New Vectors to Gain Remote and Root Access in SAP Enterprise Software

Zero-Touch-Pwn: Abusing Zoom's Zero Touch Provisioning for Remote Attacks on Desk Phones

ODDFuzz: Hunting Java Deserialization Gadget Chains via Structure-Aware Directed Greybox Fuzzing
Similar Talks

Kill List: Hacking an Assassination Site on the Dark Web

Firewalls Under Fire: China's Ongoing Campaign to Compromise Network Protection Devices

