arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.01131cs.CR
收藏

在JavaScript代码中对抗静态分析的代码漏洞混淆

Obfuscating Code Vulnerabilities against Static Analysis in JavaScript Code

University of Verona(维罗纳大学);University of Cagliari(卡利亚里大学);School of Advanced Defense Studies (CASD)(高级防务研究学院(CASD));National Interuniversity Consortium for Informatics(国家大学间信息学联盟)

Francesco Pagano, Lorenzo Pisu, Leonardo Regano, Davide Maiorca, Alessio Merlo, Giorgio Giacinto

AI总结:

本文研究了JavaScript代码混淆对静态应用安全测试工具的影响,通过实证分析发现常见混淆技术可显著降低漏洞检测率,揭示当前SAST工具在面对混淆代码时的不足。

摘要:

代码混淆广泛应用于现代软件开发以保护知识产权并阻碍逆向工程,但同时也为攻击者提供了隐藏恶意逻辑的手段。在软件供应链中,单个被篡改的包可能影响数千个应用,这引发了关键问题:CI/CD流水线依赖的静态应用安全测试(SAST)工具在面对JavaScript混淆代码时有多稳健?本文通过实证量化了JavaScript混淆对现有SAST工具的影响。我们定义了一个现实的供应链威胁模型,其中攻击者注入漏洞代码并迭代混淆直至流水线报告清洁扫描。为衡量由此产生的降级,我们引入了漏洞检测损失(VDL)指标,并进行了两阶段研究。首先,我们分析了16个由设计漏洞的Node.js Web应用程序;其次,我们将分析扩展到260个真实世界中的JavaScript/Node.js项目。在两个数据集中,我们应用了八种语义保持的混淆技术及其组合,并评估了两个代表性的SAST工具,Njsscan和Bearer。即使单个混淆技术通常会抑制大多数基线发现,包括高严重性问题,而叠加技术会产生接近完全的逃避,VDL通常接近100%。我们的结果表明,当前的JavaScript SAST在面对常见混淆时本质上并不稳健,且对混淆代码的“清洁”报告可能只提供虚假的安全感。最后,我们讨论了实用的缓解指南和面向混淆的分析方向。

英文摘要:

Code obfuscation is widely adopted in modern software development to protect intellectual property and hinder reverse engineering, but it also provides attackers with a powerful means to conceal malicious logic inside otherwise legitimate JavaScript code. In a software supply chain where a single compromised package can affect thousands of applications, this raises a critical question: how robust are the Static Application Security Testing (SAST) tools that CI/CD pipelines rely on as automated security gatekeepers? This paper answers that question by empirically quantifying the impact of JavaScript obfuscation on state-of-practice SAST. We define a realistic supply-chain threat model in which an adversary injects vulnerable code and iteratively obfuscates it until the pipeline reports a clean scan. To measure the resulting degradation, we introduce the Vulnerability Detection Loss (VDL) metric and conduct a two-phase study. First, we analyze 16 vulnerable-by-design Node.js web applications from the OWASP directory; second, we extend the analysis to 260 in-the-wild JavaScript/Node.js projects from GitHub. Across both datasets, we apply eight semantics-preserving obfuscation techniques and their combinations and evaluate two representative SAST tools, Njsscan and Bearer. Even a single obfuscation technique typically suppresses most baseline findings, including high-severity issues, while stacking techniques yield near-total evasion, with VDL often approaching 100%. Our results show that current JavaScript SAST is fundamentally not robust against commonplace obfuscations and that "clean" reports on obfuscated code may offer only a false sense of security. Finally, we discuss practical mitigation guidelines and directions for obfuscation-aware analysis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑