Next Article in Journal
Towards Machine Learning-Based FPGA Backend Flow: Challenges and Opportunities
Previous Article in Journal
Human–Computer Interaction and Participation in Software Crowdsourcing
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

AdVulCode: Generating Adversarial Vulnerable Code against Deep Learning-Based Vulnerability Detectors

School of Cyber Security and Computer, Hebei University, Baoding 071002, China
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(4), 936; https://doi.org/10.3390/electronics12040936
Submission received: 13 January 2023 / Revised: 1 February 2023 / Accepted: 10 February 2023 / Published: 13 February 2023

Abstract

Deep learning-based vulnerability detection models have received widespread attention; however, these models are susceptible to adversarial attack, and adversarial examples are a primary research direction to improve the robustness of the models. There are three main categories of adversarial example generation methods for source code tasks: changing identifier names, adding dead code, and changing code structure. However, these methods cannot be directly applied to vulnerability detection. Therefore, we propose the first study of adversarial attack on vulnerability detection models. Specifically, we utilize equivalent transformations to generate candidate statements and introduce an improved Monte Carlo tree search algorithm to guide the selection of candidate statements to generate adversarial examples. In addition, we devise a black-box approach that can be applied to widespread vulnerability detection models. The experimental results show that our approach achieves attack success rates of 16.48%, 27.92%, and 65.20%, respectively, in three vulnerability detection models with different levels of granularity. Compared with the state-of-the-art source code attack method ALERT, our method can handle models with identifier name mapping, and our attack success rate is 27.59% higher on average than ALERT.
Keywords: vulnerability detection; adversarial examples; code transformation; deep learning vulnerability detection; adversarial examples; code transformation; deep learning

Share and Cite

MDPI and ACS Style

Yu, X.; Li, Z.; Huang, X.; Zhao, S. AdVulCode: Generating Adversarial Vulnerable Code against Deep Learning-Based Vulnerability Detectors. Electronics 2023, 12, 936. https://doi.org/10.3390/electronics12040936

AMA Style

Yu X, Li Z, Huang X, Zhao S. AdVulCode: Generating Adversarial Vulnerable Code against Deep Learning-Based Vulnerability Detectors. Electronics. 2023; 12(4):936. https://doi.org/10.3390/electronics12040936

Chicago/Turabian Style

Yu, Xueqi, Zhen Li, Xiang Huang, and Shasha Zhao. 2023. "AdVulCode: Generating Adversarial Vulnerable Code against Deep Learning-Based Vulnerability Detectors" Electronics 12, no. 4: 936. https://doi.org/10.3390/electronics12040936

APA Style

Yu, X., Li, Z., Huang, X., & Zhao, S. (2023). AdVulCode: Generating Adversarial Vulnerable Code against Deep Learning-Based Vulnerability Detectors. Electronics, 12(4), 936. https://doi.org/10.3390/electronics12040936

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