Enhancing Robustness of AI Offensive Code Generators via Data Augmentation

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Improta, Cristina, Liguori, Pietro, Natella, Roberto, Cukic, Bojan, Cotroneo, Domenico
Formato: Preprint
Publicado: 2023
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866929550542241792
author Improta, Cristina
Liguori, Pietro
Natella, Roberto
Cukic, Bojan
Cotroneo, Domenico
author_facet Improta, Cristina
Liguori, Pietro
Natella, Roberto
Cukic, Bojan
Cotroneo, Domenico
contents Since manually writing software exploits for offensive security is time-consuming and requires expert knowledge, AI-base code generators are an attractive solution to enhance security analysts' productivity by automatically crafting exploits for security testing. However, the variability in the natural language and technical skills used to describe offensive code poses unique challenges to their robustness and applicability. In this work, we present a method to add perturbations to the code descriptions to create new inputs in natural language (NL) from well-intentioned developers that diverge from the original ones due to the use of new words or because they miss part of them. The goal is to analyze how and to what extent perturbations affect the performance of AI code generators in the context of offensive code. First, we show that perturbed descriptions preserve the semantics of the original, non-perturbed ones. Then, we use the method to assess the robustness of three state-of-the-art code generators against the newly perturbed inputs, showing that the performance of these AI-based solutions is highly affected by perturbations in the NL descriptions. To enhance their robustness, we use the method to perform data augmentation, i.e., to increase the variability and diversity of the NL descriptions in the training data, proving its effectiveness against both perturbed and non-perturbed code descriptions.
format Preprint
id arxiv_https___arxiv_org_abs_2306_05079
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Enhancing Robustness of AI Offensive Code Generators via Data Augmentation
Improta, Cristina
Liguori, Pietro
Natella, Roberto
Cukic, Bojan
Cotroneo, Domenico
Machine Learning
Computation and Language
Cryptography and Security
Since manually writing software exploits for offensive security is time-consuming and requires expert knowledge, AI-base code generators are an attractive solution to enhance security analysts' productivity by automatically crafting exploits for security testing. However, the variability in the natural language and technical skills used to describe offensive code poses unique challenges to their robustness and applicability. In this work, we present a method to add perturbations to the code descriptions to create new inputs in natural language (NL) from well-intentioned developers that diverge from the original ones due to the use of new words or because they miss part of them. The goal is to analyze how and to what extent perturbations affect the performance of AI code generators in the context of offensive code. First, we show that perturbed descriptions preserve the semantics of the original, non-perturbed ones. Then, we use the method to assess the robustness of three state-of-the-art code generators against the newly perturbed inputs, showing that the performance of these AI-based solutions is highly affected by perturbations in the NL descriptions. To enhance their robustness, we use the method to perform data augmentation, i.e., to increase the variability and diversity of the NL descriptions in the training data, proving its effectiveness against both perturbed and non-perturbed code descriptions.
title Enhancing Robustness of AI Offensive Code Generators via Data Augmentation
topic Machine Learning
Computation and Language
Cryptography and Security
url https://arxiv.org/abs/2306.05079