A Static Method to Discover Deserialization Gadget Chains in Java Programs.

Junjie Wu,Jingling Zhao,Junsong Fu
DOI: https://doi.org/10.1145/3548608.3559310
2022-01-01
Abstract:Java deserialization vulnerability has become a server security problem at present. An attacker can execute arbitrary commands by submitting a malicious object for deserialization. However, existing methods for detecting Java deserialization vulnerability only find program paths to deserialize input data, it doesn't consider whether the program itself can build malicious deserialization objects, which may bring false positives. In order to solve this problem, people need to discover gadget chains in the program manually, however, it takes a lot of time. In this paper, we present a method for discovering gadget chains automatically and build a tool named Hawk Gadget in practice. The method is based on static analysis that analyzes every method in the program with control flow graph. We also Compare the Hawk Gadget with Gadget Inspector that is a tool to find gadget chains, the result shows that Hawk Gadget can find more gadget chains and has a lower false-positive rate. In addition, we use gadget chains found by Hawk Gadget in Apache-commons-collections-3 to generate malicious objects for CVE-2016-4437, and verify the effectiveness of gadget chains.
What problem does this paper attempt to address?