JSProtect: A Scalable Obfuscation Framework for Mini-Games in WeChat

📅 2025-09-29
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
WeChat Mini-Program ecosystems suffer from widespread JavaScript code theft, while existing obfuscation tools face critical bottlenecks—including slow processing, severe code bloat (often >50%), and significant runtime performance degradation. To address these challenges, we propose Parallel-Aware Scope Analysis (PASA), a novel algorithm integrating multi-core parallelism, scope-sensitive static analysis, namespace isolation, and semantics-preserving obfuscation. Based on PASA, we design an efficient, scalable obfuscation protection framework. Our framework processes large-scale codebases (e.g., 20 MB) within minutes, incurs ≤20% code size overhead, preserves near-native runtime performance, and maintains compatibility with static analyzers and large-language-model-based security tools. Compared to state-of-the-art baselines, our approach achieves substantially higher security strength—marking the first practical solution for high-throughput, low-overhead, and robust large-scale JavaScript obfuscation.

Technology Category

Application Category

📝 Abstract
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 JSProtectprocesses 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.
Problem

Research questions and friction points this paper is trying to address.

Preventing intellectual property theft of WeChat mini-games via obfuscation
Overcoming performance degradation and code size inflation in JavaScript protection
Providing scalable obfuscation for large-scale applications with parallel processing
Innovation

Methods, ideas, or system contributions that make the work stand out.

Parallelized obfuscation framework for high-throughput processing
Parallel-Aware Scope Analysis enables multi-core code partitioning
Aggressive identifier reuse controls code size inflation
🔎 Similar Papers
No similar papers found.
Z
Zhihao Li
Tencent Inc.
Chaozheng Wang
Chaozheng Wang
The Chinese University of Hong Kong
software engineeringartificial intelligence
Zongjie Li
Zongjie Li
HKUST
Large Language Model for Code
X
Xinyong Peng
Tencent Inc.
Z
Zelin Su
Tencent Inc.
Q
Qun Xia
Tencent Inc.
H
Haochuan Lu
Tencent Inc.
T
Ting Xiong
Tencent Inc.
Man Ho Lam
Man Ho Lam
The Chinese University of Hong Kong
Natural Language ProcessingCode IntelligenceMulti-Agent Systems
Shuzheng Gao
Shuzheng Gao
The Chinese University of Hong Kong
Code IntelligenceSoftware EngineeringLarge Language Models
Yuchong Xie
Yuchong Xie
HKUST
Security
C
Cuiyun Gao
The Chinese University of Hong Kong
S
Shuai Wang
Hong Kong University of Science and Technology, China
Y
Yuetang Deng
Tencent Inc.
H
Huafeng Ma
Tencent Inc.