Chinese Journal of Network and Information Security ›› 2023, Vol. 9 ›› Issue (6): 86-101.doi: 10.11959/j.issn.2096-109x.2023085

• Papers • Previous Articles    

Deep learning vulnerability detection method based on optimized inter-procedural semantics of programs

Yan LI1,2,3, Weizhong QIANG1,2,3, Zhen LI1,2,3, Deqing ZOU1,2,3, Hai JIN1,4   

  1. 1 Services Computing Technology and System Lab, National Engineering Research Center for Big Data Technology, Wuhan 430074, China
    2 Hubei Key Laboratory of Distributed System Security, Wuhan 430074, China
    3 School of Cyber Science and Engineering, Huazhong University of Science and Technology, Wuhan 430074, China
    4 School of Computer Science and Engineering, Huazhong University of Science and Technology, Wuhan 430074, China
  • Revised:2023-07-28 Online:2023-12-01 Published:2023-12-01
  • Supported by:
    The National Natural Science Foundation of China(62272187);The Joint Funds of the National Natural Science Foundation of China(U1936211)

Abstract:

In recent years, software vulnerabilities have been causing a multitude of security incidents, and the early discovery and patching of vulnerabilities can effectively reduce losses.Traditional rule-based vulnerability detection methods, relying upon rules defined by experts, suffer from a high false negative rate.Deep learning-based methods have the capability to automatically learn potential features of vulnerable programs.However, as software complexity increases, the precision of these methods decreases.On one hand, current methods mostly operate at the function level, thus unable to handle inter-procedural vulnerability samples.On the other hand, models such as BGRU and BLSTM exhibit performance degradation when confronted with long input sequences, and are not adept at capturing long-term dependencies in program statements.To address the aforementioned issues, the existing program slicing method has been optimized, enabling a comprehensive contextual analysis of vulnerabilities triggered across functions through the combination of intra-procedural and inter-procedural slicing.This facilitated the capture of the complete causal relationship of vulnerability triggers.Furthermore, a vulnerability detection task was conducted using a Transformer neural network architecture equipped with a multi-head attention mechanism.This architecture collectively focused on information from different representation subspaces, allowing for the extraction of deep features from nodes.Unlike recurrent neural networks, this approach resolved the issue of information decay and effectively learned the syntax and semantic information of the source program.Experimental results demonstrate that this method achieves an F1 score of 73.4% on a real software dataset.Compared to the comparative methods, it shows an improvement of 13.6% to 40.8%.Furthermore, it successfully detects several vulnerabilities in open-source software, confirming its effectiveness and applicability.

Key words: vulnerability detection, program slice, deep learning, attention mechanism

CLC Number: 

No Suggested Reading articles found!