[论文解读] JSForce: A Forced Execution Engine for Malicious JavaScript Detection
JSForce 是一种用于 JavaScript 的强制执行引擎,可在无需输入或环境配置的情况下实现完整的代码覆盖率,并有效检测恶意 JavaScript。通过使用类型推断和路径探索来容忍运行时异常,其恶意 JavaScript 检测率提升了 206.29%,同时虚假阳性率几乎无增加,显著提升了动态分析的有效性。
The drastic increase of JavaScript exploitation attacks has led to a strong interest in developing techniques to enable malicious JavaScript analysis. Existing analysis tech- niques fall into two general categories: static analysis and dynamic analysis. Static analysis tends to produce inaccurate results (both false positive and false negative) and is vulnerable to a wide series of obfuscation techniques. Thus, dynamic analysis is constantly gaining popularity for exposing the typical features of malicious JavaScript. However, existing dynamic analysis techniques possess limitations such as limited code coverage and incomplete environment setup, leaving a broad attack surface for evading the detection. To overcome these limitations, we present the design and implementation of a novel JavaScript forced execution engine named JSForce which drives an arbitrary JavaScript snippet to execute along different paths without any input or environment setup. We evaluate JSForce using 220,587 HTML and 23,509 PDF real- world samples. Experimental results show that by adopting our forced execution engine, the malicious JavaScript detection rate can be substantially boosted by 206.29% using same detection policy without any noticeable false positive increase. We also make JSForce publicly available as an online service and will release the source code to the security community upon the acceptance for publication.
研究动机与目标
- 为解决现有动态分析技术在检测恶意 JavaScript 时存在的代码覆盖率有限和运行时环境配置不完整的问题。
- 克服静态分析技术易受混淆攻击、且虚假阳性与虚假阴性率较高的挑战。
- 设计一种强制执行引擎,可在无需输入或环境配置的情况下,驱动任意 JavaScript 片段沿所有可行路径执行。
- 通过提升代码覆盖率和对无效对象访问的鲁棒性,提高现有动态分析系统检测的准确性。
提出的方法
- JSForce 在 V8 JavaScript 引擎之上实现,以实现对执行过程和异常处理的底层控制。
- 使用类型推断模型检测并恢复异常,使引擎在发生无效对象访问时仍能继续执行。
- 设计路径探索算法,系统性地遍历 JavaScript 代码中的所有可行执行路径,包括依赖运行时条件的路径。
- 通过操纵控制流和对象状态强制分支结果,使原本在标准执行中无法到达的路径也能被执行。
- 避免依赖预定义的环境配置文件或完整功能的浏览器/PDF 阅读器,使其轻量且可移植。
- 系统设计为可无缝集成到现有动态分析流水线中,无需修改其检测逻辑。
实验结果
研究问题
- RQ1能否构建一个用于 JavaScript 的强制执行引擎,实现在无需输入或环境配置情况下的高代码覆盖率?
- RQ2如何处理由无效对象访问引发的运行时异常,以防止执行过早终止?
- RQ3强制执行在真实世界 HTML 和 PDF 样本中,对提升恶意 JavaScript 检测率的改善程度如何?
- RQ4此类系统能否作为独立服务部署,具备极低性能开销和可忽略的虚假阳性率增加?
- RQ5与现有动态分析技术相比,强制执行在鲁棒性和检测能力方面表现如何?
主要发现
- 当使用相同的检测策略时,JSForce 将恶意 JavaScript 检测率提升了 206.29%,显著增强了检测有效性。
- 该系统在提升检测率的同时,虚假阳性率无明显增加,保持了检测的可靠性。
- JSForce 的性能开销通常可忽略不计,适合集成到真实世界分析流水线中。
- 该引擎成功执行了多种环境中的 JavaScript 片段,包括 HTML 和 PDF 文件中的嵌入式脚本。
- 通过使用类型推断恢复异常并继续执行,JSForce 展现出对无效对象访问的强韧应对能力。
- 在 220,587 个 HTML 样本和 23,509 个 PDF 样本上的评估结果证实了该方法在真实场景中的可扩展性和鲁棒性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。