应用科学学报 ›› 2024, Vol. 42 ›› Issue (4): 585-597.doi: 10.3969/j.issn.0255-8297.2024.04.003

• 区块链 • 上一篇    

一种基于领域自适应的智能合约安全分析框架

王娜1, 朱会娟1, 宋香梅1, 冯霞2   

  1. 1. 江苏大学 计算机科学与通信工程学院, 江苏 镇江 212013;
    2. 江苏大学 汽车与交通工程学院, 江苏 镇江 212013
  • 收稿日期:2024-01-02 发布日期:2024-08-01
  • 通信作者: 朱会娟,副教授,博导,研究方向为软件安全、区块链安全、深度学习等。E-mail:huijuanzhu@ujs.edu.cn E-mail:huijuanzhu@ujs.edu.cn
  • 基金资助:
    国家自然科学基金(No.62272204)资助

A Domain Adaptive Security Analysis Framework for Smart Contracts

WANG Na1, ZHU Huijuan1, SONG Xiangmei1, FENG Xia2   

  1. 1. School of Computer and Communication Engineering, Jiangsu University, Zhenjiang 212013, Jiangsu, China;
    2. School of Automotive and Transportation Engineering, Jiangsu University, Zhenjiang 212013, Jiangsu, China
  • Received:2024-01-02 Published:2024-08-01

摘要: 现有智能合约漏洞检测方案很大程度上依赖于缜密的专家规则或先验知识,不仅缺乏灵活性且难以应对新型未知漏洞检测,为此提出一种基于领域自适应的智能合约安全分析框架(domain adaptive security analysis framework,DASAF)。首先,在DASAF中,智能合约操作码执行逻辑被获取并被转化为序列特征。其次,为了解决深度学习模型中固有的数据偏移现象引起的模型老化,以及新型未知漏洞有标签样本不足导致的难以获得强泛化性能的问题,在DASAF中引入了生成对抗网络结构和领域自适应技术。最后,在一个公开基准数据集上详细评估了DASAF在智能合约漏洞分析领域的有效性,并与同类方案进行了对比,实验结果表明,本文提出的DASAF优于同类方案。

关键词: 智能合约, 领域自适应技术, 生成对抗网络, 漏洞检测, 深度学习

Abstract: The available smart contract vulnerability detection schemes mostly rely on expert-defined rules, which lack flexibility and struggle with new unknown vulnerabilities. To address this challenge, we present a novel framework called domain adaptive security analysis framework (DASAF). Firstly, we obtain the execution logic of smart contract opcodes and convert them into meaningful sequential features. Secondly, to overcome the inherent data bias in deep learning models, which leads to model aging and difficulty in achieving strong generalization performance due to insufficient labeled samples in new unknown vulnerabilities, the DASAF framework introduces adversarial generative network structure and domain adaptation techniques. Finally, we evaluate the effectiveness of the DASAF framework in the field of smart contract vulnerability analysis and detection using a public benchmark dataset, and compare it with similar schemes. The experimental results demonstrate the superiority of the DASAF framework over comparable approaches.

Key words: smart contract, domain adaptation techniques, generative adversarial network, vulnerability detection, deep learning

中图分类号: