信息网络安全 ›› 2026, Vol. 26 ›› Issue (9): 1383-1390.doi: 10.3969/j.issn.1671-1122.2026.09.005
收稿日期:2026-05-30
出版日期:2026-09-10
发布日期:2026-09-30
通讯作者:
张健
E-mail:zhang.jian@nankai.edu.cn
作者简介:张健(1968—),男,天津,教授,博士,CCF高级会员,主要研究方向为云安全、网络安全、恶意代码分析、系统安全|蔡鸿(2004—),男,江西,本科,主要研究方向为网络安全|王柏韬(1999—),男,山西,硕士研究生,主要研究方向为云原生安全
基金资助:
Zhang Jian1,2(
), Cai Hong1, Wang Botao2,3
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%,且性能变异系数低于对比方法,展现出良好的检测精度与跨窗口稳定性。上述互补机制有效提升了分类边界的稳健性,为基于微架构行为分析的恶意软件检测提供了一种兼顾表征能力与泛化性能的检测方法。
中图分类号:
张健, 蔡鸿, 王柏韬. 基于硬件性能计数器的恶意软件检测方法研究[J]. 信息网络安全, 2026, 26(9): 1383-1390.
Zhang Jian, Cai Hong, Wang Botao. Research of malware detection method based on hardware performance counter[J]. Netinfo Security, 2026, 26(9): 1383-1390.
表3
非时序模型在3种采样窗口下的检测性能
| 采样窗口配置 | 模型 | 准确率 | 精确率 | 召回率 | F1分数 |
|---|---|---|---|---|---|
| 10 s_100 ms | RF | 95.42% | 91.76% | 100% | 0.9571 |
| XGB | 94.12% | 89.66% | 100% | 0.9455 | |
| DT | 92.81% | 88.51% | 98.72% | 0.9333 | |
| SVM | 81.05% | 72.90% | 100% | 0.8432 | |
| 20 s_200 ms | RF | 94.77% | 92.68% | 97.44% | 0.9500 |
| XGB | 95.42% | 92.77% | 98.72% | 0.9565 | |
| DT | 94.77% | 91.67% | 98.72% | 0.9506 | |
| SVM | 82.35% | 74.29% | 100% | 0.8525 | |
| 30 s_300 ms | RF | 92.81% | 91.36% | 94.87% | 0.9308 |
| XGB | 94.77% | 94.87% | 94.87% | 0.9487 | |
| DT | 94.12% | 93.67% | 94.87% | 0.9427 | |
| SVM | 88.89% | 82.80% | 98.72% | 0.9006 |
表4
深度时序模型在3种采样窗口下的检测性能
| 采样配置 | 模型 | 准确率 | 精确率 | 召回率 | F1分数 |
|---|---|---|---|---|---|
| 10 s_100 ms | LSTM | 92.16% | 87.50% | 98.72% | 0.9277 |
| BiLSTM | 93.46% | 91.46% | 96.15% | 0.9375 | |
| BiLSTM_Attn | 91.50% | 86.52% | 98.72% | 0.9222 | |
| TCN | 92.81% | 87.64% | 100% | 0.9341 | |
| Transformer | 92.81% | 90.36% | 96.15% | 0.9317 | |
| 20 s_200 ms | LSTM | 92.81% | 87.64% | 100% | 0.9341 |
| BiLSTM | 93.46% | 88.64% | 100% | 0.9398 | |
| BiLSTM_Attn | 94.12% | 89.66% | 100% | 0.9455 | |
| TCN | 92.81% | 87.64% | 100% | 0.9341 | |
| Transformer | 94.77% | 93.75% | 96.15% | 0.9494 | |
| 30 s_300 ms | LSTM | 94.12% | 89.66% | 100% | 0.9455 |
| BiLSTM | 91.50% | 85.71% | 100% | 0.9231 | |
| BiLSTM_Attn | 94.77% | 92.68% | 97.44% | 0.9500 | |
| TCN | 93.46% | 88.64% | 100% | 0.9398 | |
| Transformer | 95.10% | 92.77% | 98.72% | 0.9530 |
表5
与已有方法的部分性能对比
| 方法 | 10 s_100 ms | 20 s_200 ms | 30 s_300 ms | 平均值 | ||||
|---|---|---|---|---|---|---|---|---|
| 准确率 | F1分数 | 准确率 | F1分数 | 准确率 | F1分数 | 准确率 | F1分数 | |
| 文献[ | 92.16% | 0.9125 | 92.81% | 0.9183 | 93.46% | 0.9210 | 92.81% | 0.9173 |
| 文献[ | 93.46% | 0.9289 | 94.12% | 0.9367 | 94.77% | 0.9412 | 94.12% | 0.9356 |
| 文献[ | 94.77% | 0.9458 | 94.77% | 0.9462 | 94.12% | 0.9437 | 94.55% | 0.9452 |
| 本文方法 | 95.98% | 0.9612 | 95.72% | 0.9581 | 95.37% | 0.9533 | 95.69% | 0.9575 |
| [1] | Skoudis E, Zeltser L. Malware: fighting malicious code[M]. Upper Saddle River: Prentice Hall Professional, 2004. |
| [2] | Sikorski M, Honig A. Practical malware analysis: the hands-on guide to dissecting malicious software[M]. San Francisco: No Starch Press, 2012. |
| [3] | Chandran S, Syam S R, Sankaran S, et al. From static to AI-driven detection: a comprehensive review of obfuscated malware techniques[J]. IEEE Access, 2025(13): 74335-74358. |
| [4] | Malone C, Zahran M, Karri R. Are hardware performance counters a cost effective way for integrity checking of programs[C]// The 6th ACM Workshop on Scalable Trusted Computing. New York: ACM, 2011: 71-76. |
| [5] | Raff E, Barker J, Sylvester J, et al. Malware detection by eating a whole EXE[C]// The Workshops of the 32nd AAAI Conference on Artificial Intelligence. Menlo Park: AAAI, 2018: 268-276. |
| [6] | Jeong Y S, Woo J, Kang A R. Malware detection on byte streams of PDF files using convolutional neural networks[EB/OL]. (2019-04-03)[2026-03-13]. https://onlinelibrary.wiley.com/doi/epdf/10.1155/2019/8485365. |
| [7] | Ling Xiang, Wu Lingfei, Deng Wei, et al. MalGraph: hierarchical graph neural networks for robust windows malware detection[C]// IEEE INFOCOM 2022-IEEE Conference on Computer Communications. New York: IEEE, 2022: 1998-2007. |
| [8] | Kolosnjaji B, Zarras A, Webster G, et al. Deep learning for classification of malware system call sequences[C]// The 29th Australasian Joint Conference on Artificial Intelligence (AI 2016). Heidelberg: Springer, 2016: 137-149. |
| [9] |
Gibert D, Mateu C, Planes J, et al. Using convolutional neural networks for classification of malware represented as images[J]. Journal of Computer Virology and Hacking Techniques, 2019, 15(1): 15-28.
doi: 10.1007/s11416-018-0323-0 |
| [10] | Wong G W, Huang Yiting, Guo Yingren, et al. Attention-based API locating for malware techniques[J]. IEEE Transactions on Information Forensics and Security, 2024(19): 1199-1212. |
| [11] | Demme J, Maycock M, Schmitz J, et al. On the feasibility of online malware detection with performance counters[C]// The 40th Annual International Symposium on Computer Architecture (ISCA). New York: ACM, 2013: 559-570. |
| [12] | Tang A, Sethumadhavan S, Stolfo S J. Unsupervised anomaly-based malware detection using hardware features[C]// International Workshop on Recent Advances in Intrusion Detection (RAID 2014). Heidelberg: Springer, 2014: 109-129. |
| [13] | Ozsoy M, Donovick C, Gorelik I, et al. Malware-aware processors: a framework for efficient online malware detection[C]// 2015 IEEE 21st International Symposium on High Performance Computer Architecture (HPCA). New York: IEEE, 2015: 651-661. |
| [14] | 严飞, 彭慧容, 何凡, 等. HBROP: 基于硬件性能计数器的函数级ROP检测[J]. 武汉大学学报(理学版), 2017, 63(2): 109-116. |
| [15] | 邢凌凯, 张健. 基于HPC的虚拟化平台异常检测技术研究与实现[J]. 信息网络安全, 2023, 23(10): 64-69. |
| [16] |
Wang Xueyang, Karri R. Reusing hardware performance counters to detect and identify kernel control-flow modifying rootkits[J]. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2016, 35(3): 485-498.
doi: 10.1109/TCAD.2015.2474374 URL |
| [17] | Sayadi H, Makrani H M, Pudukotai D S M, et al. 2SMaRT: a two-stage machine learning-based approach for run-time specialized hardware-assisted malware detection[C]// 2019 Design, Automation & Test in Europe Conference & Exhibition (DATE). New York: IEEE, 2019: 728-733. |
| [18] |
Elnaggar R, Servadei L, Mathur S, et al. Accurate and robust malware detection: running XGBoost on runtime data from performance counters[J]. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2022, 41(7): 2066-2079.
doi: 10.1109/TCAD.2021.3102007 URL |
| [19] |
Kuruvila A P, Meng Xingyu, Kundu S, et al. Explainable machine learning for intrusion detection via hardware performance counters[J]. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2022, 41(11): 4952-4964.
doi: 10.1109/TCAD.2022.3149745 URL |
| [20] | He Zhangying, Miari T, Makrani H M, et al. When machine learning meets hardware cybersecurity: delving into accurate zero-day malware detection[C]// 2021 22nd International Symposium on Quality Electronic Design (ISQED). New York: IEEE, 2021: 85-90. |
| [21] | Zhou Boyou, Gupta A, Jahanshahi R, et al. Hardware performance counters can detect malware: myth or fact?[C]// The 2018 on Asia Conference on Computer and Communications Security. New York: ACM, 2018: 457-468. |
| [22] | Weaver V M. Self-monitoring overhead of the Linux perf_event performance counter interface[C]// 2015 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS). New York: IEEE, 2015: 102-111. |
| [1] | 黄佳欣, 刘睿远, 段荣成, 田野, 孙建国. 基于交易序列与图结构的以太坊欺诈检测方法[J]. 信息网络安全, 2026, 26(9): 1481-1492. |
| [2] | 张宏涛, 王清涛, 张连成, 王吉昌. Argus6:一种IPv6 DDoS威胁检测模型[J]. 信息网络安全, 2026, 26(8): 1264-1276. |
| [3] | 寇亮, 屠国炫, 潘晓晨, 张纪林. 基于多视图敏感度挖掘与特征调制的恶意软件检测[J]. 信息网络安全, 2026, 26(7): 1028-1043. |
| [4] | 郑天明, 刘尚东, 李海天, 李华. 一种基于交互式卷积和Transformer的异常检测算法[J]. 信息网络安全, 2026, 26(7): 1077-1086. |
| [5] | 李海龙, 张运豪, 沈燮阳, 邢宇航, 崔治安. 基于机器学习的恶意软件检测方法综述[J]. 信息网络安全, 2026, 26(4): 521-541. |
| [6] | 陈宇琪, 钱汉伟, 夏玲玲, 王群. FEViT:一种基于频域增强ViT的深度伪造检测模型[J]. 信息网络安全, 2026, 26(3): 432-441. |
| [7] | 赵文宇, 党晨曦, 杜振华, 张健. 基于硬件性能计数器的勒索软件检测技术研究与实现[J]. 信息网络安全, 2025, 25(9): 1397-1406. |
| [8] | 孙剑文, 张斌, 司念文, 樊莹. 基于知识蒸馏的轻量化恶意流量检测方法[J]. 信息网络安全, 2025, 25(6): 859-871. |
| [9] | 魏松杰, 吴琴琴, 袁军翼. 基于运行参数增强API序列的勒索软件动态检测方法研究[J]. 信息网络安全, 2025, 25(5): 713-721. |
| [10] | 韦超仁, 夏万煦, 屈刚, 白万荣, 杨立群. 面向智能系统开源模糊测试框架优化技术研究[J]. 信息网络安全, 2025, 25(4): 587-597. |
| [11] | 张新有, 高志超, 冯力, 邢焕来. 基于FFT-iTransformer的网络安全态势特征插补与预测[J]. 信息网络安全, 2025, 25(2): 228-239. |
| [12] | 刘强, 王坚, 王亚男, 王珊. 基于集成学习的恶意代码动态检测方法[J]. 信息网络安全, 2025, 25(1): 159-172. |
| [13] | 徐茹枝, 张凝, 李敏, 李梓轩. 针对恶意软件的高鲁棒性检测模型研究[J]. 信息网络安全, 2024, 24(8): 1184-1195. |
| [14] | 文伟平, 张世琛, 王晗, 时林. 基于虚拟机自省的Linux恶意软件检测方案[J]. 信息网络安全, 2024, 24(5): 657-666. |
| [15] | 王宇, 吕良双, 夏春和. 基于语义分析的Windows恶意软件检测方法[J]. 信息网络安全, 2023, 23(10): 58-63. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||