QUACK: Hindering Deserialization Attacks via Static Duck Typing
Yaniv David, Neophytos Christou, Andreas D. Kellas, Vasileios P. Kemerlis, Junfeng Yang
Abstract
—Managed languages facilitate convenient ways for serializing objects, allowing applications to persist and transfer them easily, yet this feature opens them up to attacks. By manipulating serialized objects, attackers can trigger a chained execution of existing code segments, using them as gadgets to form an exploit. Protecting deserialization calls against attacks is cumbersome and tedious, leading to many developers avoiding deploying defenses properly. We present Q UACK , a framework for automatically protecting applications by fixing calls to deseri-alization APIs. This “binding” limits the classes allowed for usage in the deserialization process, severely limiting the code available for (ab)use as part of exploits. Q UACK computes the set of classes that should be allowed using a novel static duck typing inference technique. In particular, it statically collects all statements in the program code that manipulate objects after they are deserialized, and puts together a filter for the list of classes that should be available at runtime. We have implemented Q UACK for PHP and evaluated it on a set of applications with known CVEs, and popular applications crawled from GitHub. Q UACK managed to fix the applications in a way that prevented any attempt at automatically generating an exploit against them, by blocking, on average, 97% of the application’s code that could be used as gadgets. We submitted a sample of three fixes generated by Q UACK as pull requests, and their developers merged them.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3dac1dcb-52ec-445e-b488-3d4d622de148Cited by top-tier papers4
- Typed and Confused: Studying the Unexpected Dangers of Gradual TypingDominic Troppmann, Aurore Fass, Cristian-Alexandru StaicuASE 2024 · 2 citations
- The First Large-Scale Systematic Study of Python Class Pollution VulnerabilityZhengyu Liu, Jiacheng Zhong, Jianjia Yu, Muxi Lyu et al.S&P 2026
- Sleeping Giants - Activating Dormant Java Deserialization Gadget Chains through Stealthy Code ChangesBruno Kreyssig, Sabine Houy, Timothée Riom, Alexandre BartelCCS 2025
- PickleBall: Secure Deserialization of Pickle-based Machine Learning ModelsAndreas D. Kellas, Neophytos Christou, Wenxin Jiang, Penghui Li et al.CCS 2025
Builds on6
- Less is More: Quantifying the Security Benefits of Debloating Web ApplicationsBabak Amin Azad, Pierre Laperdrix, Nick NikiforakisUSENIX Security 2019 · 100 citations
- Saphire: Sandboxing PHP Applications with Tailored System Call AllowlistsAlexander Bulekov, Rasoul Jahanshahi, Manuel EgeleUSENIX Security 2021 · 30 citations
- SimTyper: sound type inference for Ruby using type equality predictionMilod Kazerounian, Jeffrey S. Foster, Bonan MinOOPSLA 2021 · 9 citations
- ODDFuzz: Discovering Java Deserialization Vulnerabilities via Structure-Aware Directed Greybox FuzzingSicong Cao, Biao He, Xiaobing Sun, Yu Ouyang et al.S&P 2023
- FUGIO: Automatic Exploit Generation for PHP Object Injection VulnerabilitiesSunnyeo Park, Daejun Kim, Suman Jana, Sooel SonUSENIX Security 2022
Related papers
- Automatic Policy Synthesis and Enforcement for Protecting Untrusted DeserializationQuan Zhang, Yiwen Xu, Zijing Yin, Chijin Zhou et al.NDSS 2024
- Crystallizer: A Hybrid Path Analysis Framework to Aid in Uncovering Deserialization VulnerabilitiesPrashast Srivastava, Flavio Toffalini, Kostyantyn Vorobyov, François Gauthier et al.FSE 2023 · 7 citations
- PFortifier: Mitigating PHP Object Injection Through Automatic Patch GenerationBo Pang, Yiheng Zhang, Mingzhe Gao, Junzhe Zhang et al.S&P 2025
- Precise and Effective Gadget Chain Mining through Deserialization Guided Call Graph ConstructionYiheng Zhang, Ming Wen, Shunjie Liu, Dongjie He et al.USENIX Security 2025
- Seneca: Taint-Based Call Graph Construction for Java Object DeserializationJoanna C. S. Santos, Mehdi Mirakhorli, Ali ShokriOOPSLA 2024 · 9 citations
