信息网络安全 ›› 2026, Vol. 26 ›› Issue (9): 1383-1390.doi: 10.3969/j.issn.1671-1122.2026.09.005

• 入选论文 • 上一篇    下一篇

基于硬件性能计数器的恶意软件检测方法研究

张健1,2(), 蔡鸿1, 王柏韬2,3   

  1. 1 南开大学密码与网络空间安全学院, 天津 300350
    2 天津市网络与数据安全技术重点实验室, 天津 300350
    3 南开大学计算机学院, 天津 300350
  • 收稿日期:2026-05-30 出版日期:2026-09-10 发布日期:2026-09-30
  • 通讯作者: 张健 E-mail:zhang.jian@nankai.edu.cn
  • 作者简介:张健(1968—),男,天津,教授,博士,CCF高级会员,主要研究方向为云安全、网络安全、恶意代码分析、系统安全|蔡鸿(2004—),男,江西,本科,主要研究方向为网络安全|王柏韬(1999—),男,山西,硕士研究生,主要研究方向为云原生安全
  • 基金资助:
    国家重点研发计划(2022YFB3103202)

Research of malware detection method based on hardware performance counter

Zhang Jian1,2(), Cai Hong1, Wang Botao2,3   

  1. 1 College of Cryptology and Cyber Science, Nankai University, Tianjin 300350, China
    2 Tianjin Key Laboratory of Network and Data Security Technology, Tianjin 300350, China
    3 College of Computer Science, Nankai University, Tianjin 300350, China
  • Received:2026-05-30 Online:2026-09-10 Published:2026-09-30
  • Contact: Zhang Jian E-mail:zhang.jian@nankai.edu.cn

摘要:

针对传统恶意软件检测方法在应对加壳、混淆等对抗技术时能力不足的问题,文章提出一种基于硬件性能计数器的恶意软件检测方法。该方法利用Transformer编码器对硬件性能计数器的时序数据进行全局建模,提取表征微架构行为动态演化模式的深度时序特征,进而由XGBoost分类器基于该特征执行最终分类决策,实现时序归纳偏置与结构化归纳偏置的互补。为验证文章所提方法,实验采集了516个恶意样本与500个良性样本在短、中、长3种观测窗口下硬件性能计数器的时序数据进行分析。实验结果表明,该方法在3种窗口下的检测准确率均超过95%,且性能变异系数低于对比方法,展现出良好的检测精度与跨窗口稳定性。上述互补机制有效提升了分类边界的稳健性,为基于微架构行为分析的恶意软件检测提供了一种兼顾表征能力与泛化性能的检测方法。

关键词: 硬件性能计数器, 恶意软件检测, Transformer, XGBoost

Abstract:

To address the limited capability of traditional malware detection methods against evasion techniques such as packing and obfuscation, this paper proposed a malware detection method based on hardware performance counter. The method employed a Transformer encoder to perform global modeling on hardware performance counter time-series data, extracting deep temporal features that capture the dynamic evolution patterns of microarchitectural behaviors. An XGBoost classifier then performed the final classification decision based on these features, achieving a complementary integration of temporal inductive bias and structured inductive bias. Experiments were conducted on hardware performance counter time-series data collected from 516 malicious samples and 500 benign samples under short, medium, and long observation windows respectively to evaluate the proposed method. The results demonstrate that the framework achieves detection accuracy exceeding 95% across all three window configurations, and the performance coefficient of variation is lower than that of the comparison method, exhibiting favorable detection precision and cross-window stability. The above complementary mechanism effectively enhances the robustness of the classification boundary, offering a detection method that balances representational capacity and generalization performance for malware detection based on microarchitectural behavior analysis.

Key words: hardware performance counter, malware detection, Transformer, XGBoost

中图分类号: