EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detection
Shigang Liu, Di Cao, Junae Kim, Tamas Abraham, Paul Montague, Seyit Camtepe, Jun Zhang, Yang Xiang
TL;DR
EaTVul addresses the vulnerability of ML-based software vulnerability detectors to adversarial evasion by presenting a black-box attack that combines SVM-driven important-sample identification, attention-based feature extraction, ChatGPT-generated adversarial data, and a fuzzy genetic algorithm for seed selection. The two-phase framework first generates adversarial data and then learns to insert optimized snippets into vulnerable samples to flip predictions, achieving high attack success rates across multiple datasets and languages, with data optimization further boosting effectiveness. Key contributions include a novel two-phase EaTVul pipeline, a reproducible adversarial data generation process using ChatGPT, and a fuzzy GA strategy for seed selection that outperforms random baselines. These findings highlight the need for robust defenses against adversarial manipulation in software vulnerability detection and motivate future work on defense mechanisms and cross-language resilience.
Abstract
Recently, deep learning has demonstrated promising results in enhancing the accuracy of vulnerability detection and identifying vulnerabilities in software. However, these techniques are still vulnerable to attacks. Adversarial examples can exploit vulnerabilities within deep neural networks, posing a significant threat to system security. This study showcases the susceptibility of deep learning models to adversarial attacks, which can achieve 100% attack success rate (refer to Table 5). The proposed method, EaTVul, encompasses six stages: identification of important samples using support vector machines, identification of important features using the attention mechanism, generation of adversarial data based on these features using ChatGPT, preparation of an adversarial attack pool, selection of seed data using a fuzzy genetic algorithm, and the execution of an evasion attack. Extensive experiments demonstrate the effectiveness of EaTVul, achieving an attack success rate of more than 83% when the snippet size is greater than 2. Furthermore, in most cases with a snippet size of 4, EaTVul achieves a 100% attack success rate. The findings of this research emphasize the necessity of robust defenses against adversarial attacks in software vulnerability detection.
