paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Maltracker: A Fine-Grained NPM Malware Tracker Copiloted by LLM-Enhanced Dataset

Maltracker:由 LLM 增强数据集协同驱动的细粒度 NPM 恶意软件追踪器
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 4/10 · 论文将静态分析(调用图、程序依赖图、社区检测)与学习型方法结合,并用 LLM 扩充训练数据,与“PL×AI 交叉”有部分重叠,也具备工业落地与破 benchmark 的叙事。但其任务核心是 NPM 供应链恶意包检测,既非把静态分析用于 ML/Agentic 程序,也非用 LLM 改进静态分析/形式化验证本身,与浮点、贝叶斯程序分析更无交集,因此仅属邻近方向。引用 24 inbox
Zeliang Yu, Ming Wen, Xiaochen Guo, Hai Jin
crossref: 2026-09-12

AI 速览

一句话:Maltracker 以细粒度代码特征与 LLM 增强数据集检测 NPM 恶意包,包级与函数级 F1 分别提升约 12.6% 和 31.0%。

NPM 作为最大的包注册中心,近年成为供应链攻击的首要目标,恶意包泛滥给终端用户带来严重安全风险。基于学习的检测方法适应性强,但存在两点不足:一是多依赖元数据或包级粗粒度代码特征,忽略复杂代码语义;二是训练数据在数量与多样性上都较为匮乏,难以覆盖重要攻击类型。为此作者提出 Maltracker:首先构建精确调用图,提取可达预定义敏感 API 集合的可疑函数,再基于程序依赖图用社区检测算法识别可疑代码片段(gadget),从中抽取细粒度特征;同时利用先进大语言模型将 C/C++、Python、Go 等其他语言中的恶意函数翻译为 JavaScript,以扩充数据集。评估表明,相比当前最优的基于学习的方法,Maltracker 在包级 F1 上提升约 12.6%,函数级提升约 31.0%,消融实验显示各关键组件均有贡献;此外它在 NPM 中新发现 230 个恶意包并收到 61 封致谢信,其中部分恶意行为是现有工具无法检测的。

问题
现有基于学习的 NPM 恶意包检测方法多使用元数据或包级粗粒度代码特征,忽视复杂代码语义,且训练数据集在数量与多样性上不足,难以检测重要类型的攻击。
方法
Maltracker 先构建精确调用图以提取可达敏感 API 的可疑函数,再基于程序依赖图用社区检测识别可疑代码片段并抽取细粒度特征;同时用大语言模型把其他语言(C/C++、Python、Go)的恶意函数翻译为 JavaScript 来增强训练数据集。
评估
在包级与函数级上与当前最优的基于学习的方法比较,F1 分别提升约 12.6% 与 31.0%,并通过消融实验验证各关键组件的作用;还在真实 NPM 生态中发现 230 个新恶意包,获得 61 封致谢信。
原文摘要(Abstract)

As the largest package registry, Node Package Manager (NPM) has become the prime target for various supply chain attacks recently and has been flooded with numerous malicious packages, posing significant security risks to end-users. Learning-based methods have demonstrated promising performance with good adaptability to various types of attacks. However, they suffer from two main limitations. First, they often utilize metadata features or coarse-grained code features extracted at the package level while overlooking complex code semantics. Second, the dataset used to train the model often suffers from a lack of variety both in quantity and diversity, and thus cannot detect significant types of attacks. To address these problems, we introduce Maltracker, a learningbased NPM malware tracker based on fine-grained features empowered by LLM-enhanced dataset. First, Maltracker constructs precise call graphs to extract suspicious functions that are reachable to a pre-defined set of sensitive APIs, and then utilizes community detection algorithm to identify suspicious code gadgets based on program dependency graph, from which fine-grained features are then extracted. To address the second limitation, we extend the dataset using advanced large language models (LLM) to translate malicious functions from other languages (e.g., C/C++, Python, and Go) into JavaScript. Evaluations shows that Maltracker can achieve an improvement of about 12.6% in terms of F1-score at the package level and 31.0% at the function level compared with the SOTA learning-based methods. Moreover, the key components of 𝑀𝑎𝑙𝑡𝑟𝑎𝑐𝑘𝑒𝑟 all contribute to the effectiveness of its performance. Finally, Maltracker has also detected 230 new malicious packages in NPM and received 61 thanks letters, among which some contain new malicious behaviors that cannot be detected by existing tools.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8599,
  title = {Maltracker: A Fine-Grained NPM Malware Tracker Copiloted by LLM-Enhanced Dataset},
  author = {Zeliang Yu and Ming Wen and Xiaochen Guo and Hai Jin},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680397}
}