Netinfo Security ›› 2025, Vol. 25 ›› Issue (9): 1397-1406.doi: 10.3969/j.issn.1671-1122.2025.09.008

Previous Articles     Next Articles

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

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

CLC Number: