论文标题

DUALSC:通过变压器和双重学习自动生成和摘要

DualSC: Automatic Generation and Summarization of Shellcode via Transformer and Dual Learning

论文作者

Yang, Guang, Chen, Xiang, Zhou, Yanlin, Yu, Chi

论文摘要

ShellCode是一小部分代码,它被执行以利用软件漏洞,该漏洞允许目标计算机通过代码注入攻击从攻击者执行任意命令。与自动漏洞生成技术的目的类似,壳牌的自动生成可以生成攻击指令,可用于检测漏洞并实施防御措施。尽管ShellCode的自动汇总可以帮助不熟悉ShellCode和网络信息安全性的用户了解ShellCode攻击的意图。在这项研究中,我们提出了一种新型的DualSC来解决自动壳码生成和汇总任务。具体而言,我们将自动壳代码生成和汇总形式化为双重任务,使用浅变压器进行模型构建,并设计一种归一化方法调整QKNORM来适应这些低资源的任务(即训练数据不足)。最后,为了减轻量不足的问题,我们提出了一个基于规则的维修组件,以提高自动壳码生成的性能。在我们的实证研究中,我们选择了高质量的壳代码IA32作为我们的经验主题。该语料库是根据基于逐行粒度的两个现实世界项目收集的。我们首先将DualSc与代码生成和代码摘要域的六个最先进的基线进行比较,从四个绩效指标来看。比较结果表明DualSc的竞争力。然后,我们验证DualSc中组件设置的有效性。最后,我们进行了人类研究,以进一步验证DualSc的有效性。

A shellcode is a small piece of code and it is executed to exploit a software vulnerability, which allows the target computer to execute arbitrary commands from the attacker through a code injection attack. Similar to the purpose of automated vulnerability generation techniques, the automated generation of shellcode can generate attack instructions, which can be used to detect vulnerabilities and implement defensive measures. While the automated summarization of shellcode can help users unfamiliar with shellcode and network information security understand the intent of shellcode attacks. In this study, we propose a novel approach DualSC to solve the automatic shellcode generation and summarization tasks. Specifically, we formalize automatic shellcode generation and summarization as dual tasks, use a shallow Transformer for model construction, and design a normalization method Adjust QKNorm to adapt these low-resource tasks (i.e., insufficient training data). Finally, to alleviate the out-of-vocabulary problem, we propose a rulebased repair component to improve the performance of automatic shellcode generation. In our empirical study, we select a highquality corpus Shellcode IA32 as our empirical subject. This corpus was gathered from two real-world projects based on the line-by-line granularity. We first compare DualSC with six state-of-the-art baselines from the code generation and code summarization domains in terms of four performance measures. The comparison results show the competitiveness of DualSC. Then, we verify the effectiveness of the component setting in DualSC. Finally, we conduct a human study to further verify the effectiveness of DualSC.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源