信息网络安全 ›› 2025, Vol. 25 ›› Issue (9): 1397-1406.doi: 10.3969/j.issn.1671-1122.2025.09.008

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

基于硬件性能计数器的勒索软件检测技术研究与实现

赵文宇1, 党晨曦2,3, 杜振华4, 张健2,3()   

  1. 1.天津航海仪器研究所,天津 300131
    2.南开大学密码与网络空间安全学院,天津 300350
    3.天津市网络与数据安全技术重点实验室,天津 300350
    4.国家计算机病毒应急处理中心,天津 300392
  • 收稿日期:2025-06-15 出版日期:2025-09-10 发布日期:2025-09-18
  • 通讯作者: 张健 zhang.jian@nankai.edu.cn
  • 作者简介:赵文宇(1989—),男,安徽,高级工程师,硕士,主要研究方向为数据安全、网络安全|党晨曦(2003—),男,河南,硕士研究生,主要研究方向为云安全、网络安全|杜振华(1982—),男,黑龙江,正高级工程师,硕士,主要研究方向为网络安全、恶意软件防治|张健(1968—),男,天津,教授,博士,CCF高级会员,主要研究方向为云安全、网络安全、恶意软件分析和系统安全
  • 基金资助:
    国家重点研发计划(2022YFB3103202)

Research and Implementation of Ransomware Detection Technology Based on Hardware Performance Counters

ZHAO Wenyu1, DANG Chenxi2,3, DU Zhenhua4, ZHANG Jian2,3()   

  1. 1. Tianjin Institute of Navigational Instruments, Tianjin 300131, China
    2. College of Cryptology and Cyber Science, Nankai University, Tianjin 300350, China
    3. Tianjin Key Laboratory of Network and Data Security Technology, Tianjin 300350, China
    4. National Computer Virus Emergency Response Center, Tianjin 300392, China
  • Received:2025-06-15 Online:2025-09-10 Published:2025-09-18

摘要:

针对当前勒索软件广泛采用代码混淆、动态加解密及进程拆分等对抗性技术以规避检测并隐藏自身特征,导致传统基于软件行为分析的方法难以有效识别此类复杂恶意样本、检测性能显著下降的问题,文章提出一种基于硬件性能计数器HPCs与Transformer架构的勒索软件检测方法。该方法首先在KVM虚拟化环境中采集样本运行过程中的HPCs时序数据,提取其微架构层面的运行特征;然后,利用多头注意力机制对HPCs序列进行分层建模,并结合位置嵌入机制增强时序依赖建模能力,有效克服传统方法在动态行为分析中的局限性。实验采集9900个勒索软件样本与9900个良性软件样本,经过特征筛选,最终选取5个与勒索行为高度相关的HPCs事件作为输入。实验结果表明,该方法在500 ms时间窗口内的检测准确率达到99.36%,为勒索软件的高效识别与防御提供了有力支持。

关键词: 硬件性能计数器, Transformer架构, 勒索软件检测, 时序特征提取

Abstract:

To address the challenge posed by modern ransomware techniques—such as code obfuscation, dynamic encryption/decryption, and process splitting—which aim to evade detection by concealing behavioral features and thereby render traditional behavior-based detection methods ineffective, this paper proposed a ransomware detection approach based on Hardware Performance Counters (HPCs) and a transformer architecture. The method first collected time-series HPCs data from program executions within a KVM virtualized environment to extract microarchitectural features. Then, it applied a multi-head attention mechanism for hierarchical modeling of the HPCs sequences, combined with positional encoding to enhance the model’s ability to capture temporal dependencies, thereby overcoming the limitations of traditional dynamic behavior analysis. A dataset comprising 9,900 ransomware samples and 9,900 benign software samples was collected. After feature selection, five HPCs events strongly associated with ransomware behavior were used as inputs. Experimental results show that the proposed method achieves an accuracy of 99.36% within a 500 ms time window, offering strong support for the efficient identification and defense against ransomware.

Key words: hardware performance counters, transformer architecture, ransomware detection, time series feature extraction

中图分类号: