通信学报 ›› 2023, Vol. 44 ›› Issue (1): 103-117.doi: 10.11959/j.issn.1000-436x.2023018

• 学术论文 • 上一篇    下一篇

基于特征依赖图的源代码漏洞检测方法

杨宏宇1,2, 杨海云2, 张良3, 成翔4,5   

  1. 1 中国民航大学安全科学与工程学院,天津 300300
    2 中国民航大学计算机科学与技术学院,天津 300300
    3 亚利桑那大学信息学院,图森 AZ85721
    4 扬州大学信息工程学院,江苏 扬州 225127
    5 江苏省知识管理与智能服务工程研究中心,江苏 扬州 225127
  • 修回日期:2022-12-03 出版日期:2023-01-25 发布日期:2023-01-01
  • 作者简介:杨宏宇(1969- ),男,吉林长春人,博士,中国民航大学教授,主要研究方向为网络信息安全
    杨海云(1997- ),男,陕西宝鸡人,中国民航大学硕士生,主要研究方向为网络信息安全
    张良(1987- ),男,天津人,博士,美国亚利桑那大学研究员,主要研究方向为强化学习和基于深度学习的信号处理
    成翔(1988- ),男,新疆乌鲁木齐人,博士,扬州大学实验师,主要研究方向为网络与系统安全、网络安全态势感知、APT攻击检测
  • 基金资助:
    国家自然科学基金资助项目(U1833107)

Feature dependence graph based source code loophole detection method

Hongyu YANG1,2, Haiyun YANG2, Liang ZHANG3, Xiang CHENG4,5   

  1. 1 School of Safety Science and Engineering, Civil Aviation University of China, Tianjin 300300, China
    2 School of Computer Science and Technology, Civil Aviation University of China, Tianjin 300300, China
    3 School of Information, University of Arizona, Tucson AZ85721, USA
    4 School of Information Engineering, Yangzhou University, Yangzhou 225127, China
    5 Jiangsu Engineering Research Center for Knowledge Management and Intelligent Service, Yangzhou 225127, China
  • Revised:2022-12-03 Online:2023-01-25 Published:2023-01-01
  • Supported by:
    The National Natural Science Foundation of China(U1833107)

摘要:

针对现有源代码漏洞检测方法未显式维护源代码中与漏洞相关的语义信息,导致漏洞语句特征提取困难和漏洞检测误报率高的问题,提出一种基于特征依赖图的源代码漏洞检测方法。首先,提取函数片中的候选漏洞语句,通过分析候选漏洞语句的控制依赖链和数据依赖链,生成特征依赖图。其次,使用词向量模型生成特征依赖图的节点初始表示向量。最后,构建一种面向特征依赖图的漏洞检测神经网络,由图学习网络学习特征依赖图的异构邻居节点信息,由检测网络提取全局特征并进行漏洞检测。实验结果表明,所提方法的召回率、F1分数分别提高1.50%~22.32%、1.86%~16.69%,优于现有方法。

关键词: 源代码, 漏洞检测, 语义信息, 依赖图, 神经网络

Abstract:

Given the problem that the existing source code loophole detection methods did not explicitly maintain the semantic information related to the loophole in the source code, which led to the difficulty of feature extraction of loo-phole statements and the high false positive rate of loophole detection, a source code loophole detection method based on feature dependency graph was proposed.First, extracted the candidate loophole statements in the function slice, and gen-erated the feature dependency graph by analyzing the control dependency chain and data dependency chain of the candi-date loophole statements.Secondly, the word vector model was used to generate the initial node representation vector of the feature dependency graph.Finally, a loophole detection neural network oriented to feature dependence graph was constructed, in which the graph learning network learned the heterogeneous neighbor node information of the feature de-pendency graph and the detection network extracted global features and performed loophole detection.The experimental results show that the recall rate and F1 score of the proposed method are improved by 1.50%~22.32% and 1.86%~16.69% respectively, which is superior to the existing method.

Key words: source code, loophole detection, semantic information, dependence graph, neural network

中图分类号: 

No Suggested Reading articles found!