基于ResTextCNN和自注意力机制的二进制代码漏洞检测

BINARY CODE VULNERABILITY DETECTION BASED ON RESTEXT CNN AND SELF-ATTENTION

  • 摘要: 为了提取更复杂的语义特征,并且确定汇编代码段中指令对任务的贡献程度,提出一种基于ResTextCNN和自注意力机制的注意力残差卷积网络(ISA-ResTextCNN)。通过自注意力机制为代码段中指令赋予权重,关注不同指令对任务的影响。使用ResTextCNN在提取更深层次语义特征的同时,充分考虑输入信息,以此提高模型检测性能。在模型训练时,添加最大范数正则化可以较好地解决过拟合问题。实验结果表明,该模型可以提高二进制代码漏洞检测性能,相比较同类基准模型在准确率和F1-score上都得到了提升。

     

    Abstract: In order to automatically extract complex semantic features and determine the contribution degree of instructions in assembly code segment to the task, an attention residual convolutional network (ISA-ResTextCNN) based on ResTextCNN and self-attention mechanism is proposed. The self-attention mechanism was adopted to give weight to each instruction in the code segment, and pay attention to the influence of the instruction on the binary vulnerability detection task. ResTextCNN was used to fully consider the input information while extracting more deeper semantic features, so as to improve the detection performance of the model. During model training, max-norm regularization was added to solve the problem of overfitting. Experimental results show that the proposed model can improve the performance of binary code vulnerability detection, and the accuracy and F1-score are improved compared with similar benchmark models.

     

/

返回文章
返回