0:00
–:––
React at 0:00
Black Hat USA 2025

QUACK: Hindering Deserialization Attacks via Static Duck Typing

Neophytos Christou, Brown University; Andreas Kellas, Columbia UniversityApplication Security: Defense

When and where

Day
Thu 7 Aug 2025
Time
15:20 to 16:00 PDT
Room
Islander E & I, Level 0 - North Convention Center

Speakers

  • Neophytos ChristouBrown University

    Neophytos Christou is a 5th year PhD candidate at the Secure Systems Lab (SSL) at Brown University, working on systems security and software hardening under the supervision of Professor Vasileios Kemerlis. His research revolves around a variety of topics, including uncovering security vulnerabilities in Deep-Learning (DL) frameworks, mitigating deserialization vulnerabilities in PHP, and hardening software against novel attacks that combine memory corruption with speculative execution. His work has been published and presented in top-tier security venues, such as the USENIX Security Symposium, the ACM Conference on Computer and Communications Security (CCS), and the Network and Distributed System Security (NDSS) Symposium.

  • Andreas KellasColumbia University

    Andreas Kellas applies program analysis techniques to solve security problems, like preventing threats to the software supply chain. He is working on his Ph.D at Columbia University. For fun, he enjoys breaking systems.

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 QUACK, a framework for automatically protecting applications by fixing calls to deserialization 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. QUACK 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 QUACK for PHP and evaluated it on a set of applications with known CVEs and popular applications crawled from GitHub. QUACK 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 QUACK as pull requests, and their developers merged them.

What you'll get from it

Deserialisation bugs let attackers chain together code already in an application, and the defences are fiddly enough that many developers skip them. Neophytos Christou and Andreas Kellas built QUACK to add them automatically. It works out which classes an application really expects to rebuild from serialised data, from how the code uses those objects afterwards, and limits deserialisation to that set. On PHP applications with known CVEs and popular GitHub projects, it stopped every automated exploit and removed 97 per cent of usable gadget code on average. Several of its fixes were merged upstream.

Did you find what you came for?