预热,敬请期待:
专业 JSVM 虚拟机混淆功能正在开发中
Professional JSVM-based obfuscation functionality is currently under development.
深度代码保护模式|开发预览
专业 JSVMP 虚拟机混淆功能正在开发中。
目前处于持续研发、兼容性验证与性能优化阶段。
预热,敬请期待。
本次研发方向不再只是继续叠加传统 JavaScript 混淆强度。
在现有:
- 变量名混淆
- 字符串保护
- 数值表达式扰乱
- 控制流混淆
- 属性访问保护
- 多层结构扰乱
等能力基础上,计划进一步对部分高价值核心业务逻辑进行更加深入的结构级保护。
核心目标:
兼容性
+
运行性能
+
代码保护强度
在三者之间取得更合理的平衡。
计划中的主要能力
核心逻辑深度保护
普通 JavaScript 混淆主要还是让代码:
更乱
更难读
更难搜索
深度保护模式希望进一步做到:
核心业务逻辑
↓
转换为内部执行结构
↓
不再直接以普通 JavaScript 业务表达式形式暴露
重点用于保护:
- 核心算法
- 授权逻辑
- 关键校验
- 游戏规则
- 数据处理算法
- 安全逻辑
- 商业核心逻辑
- 重要本地计算
多层结构保护
计划根据代码特征组合使用不同保护策略,包括:
函数结构保护
+
控制逻辑扰乱
+
调用关系保护
+
字符串保护
+
属性访问保护
+
核心逻辑深度转换
目标不是简单把文件变大。
而是提高:
自动分析成本
人工阅读成本
逻辑还原成本
批量恢复成本
智能分级保护
并不会简单地:
所有函数
↓
全部套最重保护
而是计划根据代码类型自动选择更合适的保护方式:
普通业务逻辑
↓
高强度常规混淆
重要业务逻辑
↓
更深层结构保护
核心算法 / 授权 / 校验
↓
JSVMP 深度保护
高频运行逻辑
↓
优先保证运行性能
游戏性能优先
针对游戏和小游戏环境,运行性能仍然是重要目标。
例如:
update
lateUpdate
tick
render
physics
Tween
动画循环
高频事件
每帧逻辑
不会简单粗暴地全部进入高成本保护结构。
后续会综合考虑:
- 函数执行频率
- 函数复杂度
- 安全价值
- 运行成本
- 代码规模
自动选择更加合适的保护策略。
不同构建产生不同结构
计划让同一份源码在不同构建中产生结构差异。
例如:
第一次构建
→ 保护结构 A
第二次构建
→ 保护结构 B
第三次构建
→ 保护结构 C
进一步增加固定规则批量分析多个版本的难度。
混淆前后效果示意
以下代码仅用于简单展示不同保护层级之间的区别。
实际最终输出会根据:
源码
配置
构建随机性
代码类型
安全策略
产生变化。
① 原始代码
function verify(score, token) {
if (token.length > 3 && score * 7 + 11 > 100) {
return "ok";
}
return "no";
}
业务逻辑非常直接:
token.length > 3
score * 7 + 11 > 100
阅读源码即可快速理解判断规则。
② 普通混淆后的效果
传统高强度混淆后,可能变成类似:
function _0x91(_a, _b) {
var _s = 0;
while (true) {
switch (_s) {
case 0:
if (_b.length > 3) {
_s = 1;
continue;
}
return _x[2];
case 1:
if (_a * 7 + 11 > 100) {
return _x[1];
}
return _x[2];
}
}
}
代码已经明显更难阅读。
但经过:
格式化
↓
整理变量
↓
简化控制流
仍然可能观察到:
_a * 7 + 11 > 100
也就是说:
普通混淆主要是在原有 JavaScript 结构上增加阅读和分析难度。
③ 深度保护模式效果示意
正在研发的深度保护模式,希望让适合保护的核心业务逻辑进一步转换。
效果可能更接近:
function _a(a, b) {
return _v(
[a, b],
_p,
0x31ac
);
}
var _p = [
187, 22, 91, 7,
216, 53, 11, 168,
72, 199, 34, 5,
118, 63, 205, 17,
...
];
此时原本非常明显的:
score * 7 + 11 > 100
不会再直接以普通业务表达式的形式暴露。
攻击者看到的会更加接近:
内部执行结构
+
编码数据
+
复杂控制关系
+
运行状态
而不是直接看到原始业务公式。
简单理解
| 保护方式 |
主要效果 |
分析难度 |
| 原始 JavaScript |
业务逻辑直接可读 |
 |
| 普通高强度混淆 |
名称、字符串、流程被扰乱 |
 
|
| 深度保护模式 |
核心逻辑进一步转换为内部执行结构 |
   
|
保护目标
普通混淆后的分析过程通常比较接近:
格式化代码
↓
恢复变量关系
↓
整理控制流
↓
阅读业务代码
深度保护模式希望进一步提高到:
识别内部执行结构
↓
分析数据关系
↓
恢复控制关系
↓
恢复调用逻辑
↓
恢复业务语义
从而进一步增加自动化分析和人工还原成本。
计划兼容环境
主要面向:
- Cocos Creator
- 微信小游戏
- 抖音小游戏
- Web
- Android
- iOS
- Node / CommonJS
- System.register
等 JavaScript 项目环境。
关于安全性的说明
任何最终运行在客户端的 JavaScript,都不存在真正意义上的:
绝对无法逆向
100% 无法破解
永久不可恢复
深度代码保护真正追求的是:
提高逆向成本、增加恢复步骤、降低批量自动分析效率。
同时尽量保证项目:
正常运行
+
平台兼容
+
性能可接受
当前功能仍在持续研发、兼容测试与性能优化中。
上述代码仅用于展示设计方向,不代表最终固定输出格式。
最终功能、兼容范围、运行性能及保护效果,以正式发布版本为准。
预热,敬请期待。
English Version
Deep Code Protection Mode | Development Preview
Professional JSVMP-based virtualized JavaScript protection is currently under development.
Compatibility testing and performance optimization are still ongoing.
Coming soon.
This new protection mode is not simply about adding more layers to traditional JavaScript obfuscation.
Based on existing protection techniques such as:
- Identifier obfuscation
- String protection
- Numeric expression transformation
- Control-flow obfuscation
- Property access protection
- Multi-layer structural transformation
the new mode is designed to provide deeper protection for selected high-value business logic.
The main goal is to balance:
Compatibility
+
Runtime Performance
+
Protection Strength
Planned Features
Deep Protection for Critical Logic
Traditional JavaScript obfuscation mainly makes code:
Harder to read
Harder to search
Harder to understand
The new deep protection mode aims to go further:
Critical Business Logic
↓
Internal Execution Structure
↓
Original business expressions are no longer directly exposed
Typical targets include:
- Core algorithms
- License logic
- Validation logic
- Game rules
- Data-processing algorithms
- Security-related code
- Commercial core logic
- Important local calculations
Multi-Layer Structural Protection
Different protection strategies may be combined according to the characteristics of the source code:
Function Structure Protection
+
Control-Flow Transformation
+
Call-Relationship Protection
+
String Protection
+
Property Protection
+
Deep Logic Transformation
The goal is not simply to generate larger files.
The real target is to increase:
Automated Analysis Cost
Manual Analysis Cost
Logic Reconstruction Cost
Batch Recovery Cost
Intelligent Protection Levels
The new system is not designed to apply the heaviest protection to every function.
Instead:
Normal Business Logic
↓
High-Strength Traditional Obfuscation
Important Business Logic
↓
Deeper Structural Protection
Core Algorithms / License / Validation
↓
JSVMP Deep Protection
High-Frequency Runtime Logic
↓
Performance-Oriented Protection
Performance-Aware Design
Game and mini-game performance remains an important consideration.
High-frequency code such as:
update
lateUpdate
tick
render
physics
Tween callbacks
animation loops
frame-based logic
will not simply be forced into the heaviest protection structure.
The protection strategy will consider:
- Execution frequency
- Function complexity
- Security value
- Runtime cost
- Code size
to automatically select a more suitable protection level.
Different Structures for Different Builds
The same source code may produce different protection structures across different builds.
For example:
Build 1
→ Structure A
Build 2
→ Structure B
Build 3
→ Structure C
This is intended to increase the cost of applying one fixed recovery rule to multiple future builds.
Before / After Example
The following example is only intended to demonstrate the difference between protection levels.
Actual output may vary depending on:
Source Code
Configuration
Build Randomness
Code Type
Protection Strategy
① Original Code
function verify(score, token) {
if (token.length > 3 && score * 7 + 11 > 100) {
return "ok";
}
return "no";
}
The business logic is immediately visible:
token.length > 3
score * 7 + 11 > 100
② Traditional Obfuscation
A traditionally obfuscated result may look similar to:
function _0x91(_a, _b) {
var _s = 0;
while (true) {
switch (_s) {
case 0:
if (_b.length > 3) {
_s = 1;
continue;
}
return _x[2];
case 1:
if (_a * 7 + 11 > 100) {
return _x[1];
}
return _x[2];
}
}
}
The code is significantly harder to read.
However, after:
Beautification
↓
Variable Analysis
↓
Control-Flow Simplification
an analyst may still discover:
_a * 7 + 11 > 100
In other words:
Traditional obfuscation mainly increases complexity while the original JavaScript business structure still exists.
③ Deep Protection Preview
For suitable high-value logic, the new protection mode is designed to transform the original business logic further.
The result may look more like:
function _a(a, b) {
return _v(
[a, b],
_p,
0x31ac
);
}
var _p = [
187, 22, 91, 7,
216, 53, 11, 168,
72, 199, 34, 5,
118, 63, 205, 17,
...
];
The original expression:
score * 7 + 11 > 100
is no longer directly exposed as ordinary business JavaScript.
Instead, an analyst is more likely to encounter:
Internal Execution Structure
+
Encoded Data
+
Complex Control Relationships
+
Runtime State
before reaching the original business logic.
Simple Comparison
| Protection Level |
Main Effect |
Analysis Difficulty |
| Original JavaScript |
Business logic directly readable |
 |
| Traditional Obfuscation |
Names, strings and control flow transformed |
 
|
| Deep Protection Mode |
Core logic transformed into an internal execution structure |
   
|
Protection Goal
Traditional obfuscation analysis often follows a path similar to:
Beautify Code
↓
Recover Variable Relationships
↓
Simplify Control Flow
↓
Read Business Logic
The deep protection mode aims to increase the required analysis steps:
Identify Internal Execution Structure
↓
Analyze Data Relationships
↓
Recover Control Relationships
↓
Recover Call Logic
↓
Reconstruct Business Semantics
The goal is to significantly increase the cost of both automated analysis and manual reconstruction.
Planned Compatibility
Main target environments include:
- Cocos Creator
- WeChat Mini Games
- Douyin Mini Games
- Web
- Android
- iOS
- Node / CommonJS
- System.register
Security Notice
No client-side JavaScript protection can honestly guarantee:
100% Impossible to Reverse
Completely Unbreakable
Permanently Unrecoverable
The real purpose of advanced code protection is to:
Increase reverse-engineering cost, add reconstruction steps, and reduce the efficiency of automated recovery.
while maintaining:
Runtime Compatibility
+
Practical Performance
+
Protection Strength
This feature is still under active development, compatibility testing and performance optimization.
The examples above are intended only to demonstrate the design direction and do not represent a fixed final output format.
Final functionality, compatibility, runtime performance and protection strength may change before release.
Coming Soon.