Next Article in Journal
Automated Classification and Segmentation and Feature Extraction from Breast Imaging Data
Previous Article in Journal
MSNet: A Multistage Network for Lightweight Image Dehazing with Content-Guided Attention and Adaptive Encoding
Previous Article in Special Issue
Jamming Analysis between Non-Cooperative Mega-Constellations Based on Satellite Network Capacity
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Article

TACSan: Enhancing Vulnerability Detection with Graph Neural Network

1
Institute of Graduate, Space Engineering University, Beijing 101416, China
2
Institute of Aerospace Information, Space Engineering University, Beijing 101416, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Electronics 2024, 13(19), 3813; https://doi.org/10.3390/electronics13193813
Submission received: 22 August 2024 / Revised: 23 September 2024 / Accepted: 24 September 2024 / Published: 26 September 2024

Abstract

With the increasing scale and complexity of software, the advantages of using neural networks for static vulnerability detection are becoming increasingly prominent. Before inputting into a neural network, the source code needs to undergo word embedding, transforming discrete high-dimensional text data into low-dimensional continuous vectors suitable for training in neural networks. However, analysis has revealed that different implementation ideas by code writers for the same functionality can lead to varied code implementation methods. Embedding different code texts into vectors results in distinctions that can reduce the robustness of a model. To address this issue, this paper explores the impact of converting source code into different forms on word embedding and finds that a TAC (Three-Address Code) can significantly eliminate noise caused by different code implementation approaches. Given the excellent capability of a GNN (Graph Neural Network) in handling non-Euclidean space data and complex features, this paper subsequently employs a GNN to learn and classify vulnerabilities by capturing the implicit syntactic structure information in a TAC. Based on this, this paper introduces TACSan, a novel static vulnerability detection system based on a GNN designed to detect vulnerabilities in C/C++ programs. TACSan transforms the preprocessed source code into a TAC representation, adds control and data edges to create a graph structure, and then inputs it into the GNN for training. Comparative testing and evaluation of TACSan against other renowned static analysis tools, such as VulDeePecker and Devign, demonstrate that TACSan’s detection capabilities not only exceed those methods but also achieve substantial enhancements in accuracy and F1 score.
Keywords: static analysis; graph neural network; intermediate representation; vulnerability detection; software security static analysis; graph neural network; intermediate representation; vulnerability detection; software security

Share and Cite

MDPI and ACS Style

Zeng, Q.; Xiong, D.; Wu, Z.; Qian, K.; Wang, Y.; Su, Y. TACSan: Enhancing Vulnerability Detection with Graph Neural Network. Electronics 2024, 13, 3813. https://doi.org/10.3390/electronics13193813

AMA Style

Zeng Q, Xiong D, Wu Z, Qian K, Wang Y, Su Y. TACSan: Enhancing Vulnerability Detection with Graph Neural Network. Electronics. 2024; 13(19):3813. https://doi.org/10.3390/electronics13193813

Chicago/Turabian Style

Zeng, Qingyao, Dapeng Xiong, Zhongwang Wu, Kechang Qian, Yu Wang, and Yinghao Su. 2024. "TACSan: Enhancing Vulnerability Detection with Graph Neural Network" Electronics 13, no. 19: 3813. https://doi.org/10.3390/electronics13193813

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop