arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.05079cs.LGcs.CLcs.CR
收藏

通过数据增强提升AI攻击性代码生成器的鲁棒性

Enhancing Robustness of AI Offensive Code Generators via Data Augmentation

University of Naples Federico II(那不勒斯费德里科二世大学);University of North Carolina at Charlotte(北卡罗来纳大学夏洛特分校)

Cristina Improta, Pietro Liguori, Roberto Natella, Bojan Cukic, Domenico Cotroneo

AI总结:

本文提出对攻击性代码的自然语言描述添加扰动并用于数据增强,评估并提升了三种先进AI代码生成器在扰动输入下的鲁棒性。

摘要:

由于手动编写用于攻击性安全的软件漏洞利用程序耗时且需要专业知识,基于AI的代码生成器成为一种有吸引力的解决方案,可通过自动生成用于安全测试的漏洞利用代码来提高安全分析师的工作效率。然而,用于描述攻击性代码的自然语言和技术技能的差异性给其鲁棒性和适用性带来了独特挑战。在本工作中,我们提出了一种方法,对代码描述添加扰动,以从善意开发者处生成新的自然语言(NL)输入,这些输入因使用新词或遗漏部分词语而偏离原始描述。目标是分析扰动如何以及在多大程度上影响AI代码生成器在攻击性代码情境下的性能。首先,我们证明扰动后的描述保留了原始未扰动描述的语义。然后,我们使用该方法评估三种最先进的代码生成器在面对新扰动输入时的鲁棒性,结果表明这些基于AI的解决方案的性能受到自然语言描述中扰动的显著影响。为增强其鲁棒性,我们使用该方法进行数据增强,即增加训练数据中自然语言描述的变异性和多样性,证明其对扰动和未扰动的代码描述均有效。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑