基于词序嵌入的二进制基本块相似性检测
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:


Binary Basic Block Similarity Detection Based on Word Order Embeddings
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    神经机器翻译技术能够自动翻译多种语言的语义信息, 已被应用于跨指令集架构的二进制代码相似性检测, 并取得了较好的效果. 将汇编指令序列当作文本序列处理时, 指令顺序关系很重要. 进行二进制基本块级别相似性检测时, 神经网络使用位置嵌入来对指令位置进行建模. 然而, 这种位置嵌入未能捕获指令位置之间的邻接、优先等关系. 针对该问题, 本文使用指令位置的连续函数来建模汇编指令的全局绝对位置和顺序关系, 实现对词序嵌入的泛化. 首先使用Transformer训练源指令集架构编码器; 然后使用三元组损失训练目标指令集架构编码器, 并微调源指令集架构编码器; 最后使用嵌入向量之间欧氏距离的映射表示基本块之间的相似程度. 在公开数据集MISA上的实验表明, P@1评价指标达到69.5%, 比对比方法MIRROR提升了4.6%.

    Abstract:

    Neural machine translation technology can translate the semantic information of multiple languages automatically. Therefore, it has been applied to binary code similarity detection of cross-instruction set architecture successfully. When the sequences of assembly instructions are treated as sequences of textual tokens, the order of instructions is important. When binary basic block-level similarity detection is performed, the neural networks model instruction positions with position embeddings, but it failed to reflect the ordered relationships (e.g., adjacency or precedence) between instructions. To address this problem, this study uses a continuous function of instruction positions to model the global absolute positions and ordered relationships of assembly instructions, achieving the generalization of word order embeddings. Firstly, the source instruction set architecture (ISA) encoder is constructed by Transformer. Secondly, the target ISA encoder is trained by triplet loss, and the source ISA encoder is fine-tuned. Finally, the Euclidean distances between embedding vectors are mapped to [0,1], which are used as the similarity metrics between basic blocks. The experimental results on the public dataset MISA show that the evaluation metric P@1 of this study is 69.5%, which is 4.6% higher than the baseline method MIRROR.

    参考文献
    相似文献
    引证文献
引用本文

李涛,王金双,周振吉.基于词序嵌入的二进制基本块相似性检测.计算机系统应用,2023,32(12):253-260

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-05-05
  • 最后修改日期:2023-06-06
  • 录用日期:
  • 在线发布日期: 2023-09-21
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京海淀区中关村南四街4号 中科院软件园区 7号楼305房间,邮政编码:100190
电话:010-62661041 传真: Email:csa (a) iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号