一句话:提出 JSProtect,基于并行感知作用域分析实现微信小游戏代码的高吞吐混淆,兼顾代码体积、运行时性能与安全性。
微信小游戏生态面临严重的知识产权窃取风险,他人可通过二次开发复用代码,而现有 JavaScript 混淆工具难以支撑大规模应用:处理时间过长、运行时性能严重退化、代码体积急剧膨胀。本文提出 JSProtect——一个高吞吐并行化混淆框架,其核心是并行感知作用域分析(PASA)算法,支持独立代码划分以利用多核处理,并通过独立命名空间管理激进复用短标识符以抑制代码膨胀。评估显示,JSProtect 可在数分钟内处理 20MB 代码库,保持 100% 语义等价,代码体积膨胀最低仅 20%(基线工具超过 1000%),运行时性能接近原生,且能有效抵御静态分析工具与大语言模型。该工作为工业级 JavaScript 保护提供了兼顾安全、性能与可扩展性的新范式。
The WeChat mini-game ecosystem faces rampant intellectual property theft to other platforms via secondary development, yet existing JavaScript obfuscation tools are ill-equipped for large-scale applications, suffering from prohibitive processing times, severe runtime performance degradation, and unsustainable code size inflation. This paper introduces JSProtect, a high-throughput parallelized obfuscation framework designed to overcome these fundamental limitations. At the core of our framework is the Parallel-Aware Scope Analysis (PASA) algorithm, which enables two key optimizations: independent code partitioning for multi-core processing and independent namespace management that aggressively reuses short identifiers to combat code bloat. Our evaluation demonstrates that JSProtect processes 20MB codebases in minutes, maintaining 100% semantic equivalence while controlling code size inflation to as low as 20% compared to over 1,000% with baseline tools. Furthermore, it preserves near-native runtime performance and provides superior security effectiveness against both static analysis tools and large language models. This work presents a new paradigm for industrial-scale JavaScript protection that effectively balances robust security with high performance and scalability.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2509-24498,
title = {JSProtect: A Scalable Obfuscation Framework for Mini-Games in WeChat},
author = {Zhihao Li and Chaozheng Wang and Zongjie Li and Xinyong Peng and Zelin Su and Qun Xia and Haochuan Lu and Ting Xiong and Man Ho Lam and Shuzheng Gao and Yuchong Xie and Cuiyun Gao and Shuai Wang and Yuetang Deng and Huafeng Ma},
booktitle = {FSE},
year = {2026},
doi = {10.1145/3803437.3805204}
}