Manuscript Offprint

arXiv:2610.35532

JANUS: Synthesizing Cross-Layer Defenses Against Web Deserialization Attacks

Ruozhao Yang, Minglang Li, Jiongchi Yu, Xinfeng Li, Xiaofei Xie

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Ruozhao Yang

rz.yang.2024@phdcs.smu.edu.sg

Singapore Management University

Singapore

Minglang Li

2024060909004@std.uestc.edu.cn

UESTC

China

Jiongchi Yu

jiongchiyu@acm.org

Nanyang Technological University

Singapore

Xinfeng Li

xinfeng.li@polyu.edu.hk

The Hong Kong Polytechnic

University

China

Abstract

Unsafe deserialization turns untrusted data into attacker-controlled execution, and a single vulnerability can admit diverse exploit variants that evade defenses tailored to a known exploit. Existing defenses typically operate at a single enforcement point with limited visibility into the full attack. Combining controls across layers offers complementary protection, but coordinating them to preserve legitimate functionality and adapting them to new variants requires substantial expert effort.

We propose Janus, a red-blue adversarial framework for automated cross-layer defense synthesis. Starting from a known exploit, Janus iteratively refines deployment-specific policies in an isolated offline environment. A black-box attacker probes the current policy for exploit variants using only externally observable feedback. The defender summarizes each verified variant into its security-relevant effects, uses counterfactual replay to separate complementary coverage from redundant enforcement, and jointly selects and scopes controls across layers. Each candidate policy is validated against accumulated exploits and benign workflows.

We evaluate Janus on sixteen vulnerability deployments across six Java and PHP applications against gateway, application, system, and cross-layer defenses. Janus reduces held-out attack success to 6.2%, compared with 18.8-55.0% for the baselines, fully mitigates 13 of 16 deployments, and preserves 98.4% of benign functionality tests at a 6.9% targeted P95 latency increase.

CCS Concepts

• Security and privacy → Web application security; Software security engineering.

Xiaofei Xie

xfxie@smu.edu.sg

Singapore Management University

Singapore