With the escalating prevalence of malicious activities exploiting vulnerabilities in blockchain systems, there is an urgent requirement for robust attack detection mechanisms. To address this challenge, this paper presents a novel collaborative learning framework designed to detect attacks in blockchain transactions and smart contracts by analyzing transaction features. Our framework exhibits the capability to classify various types of blockchain attacks, including intricate attacks at the machine code level (e.g., injecting malicious codes to withdraw coins from users unlawfully), which typically necessitate significant time and security expertise to detect. To achieve that, the proposed framework incorporates a unique tool that transforms transaction features into visual representations, facilitating efficient analysis and classification of low-level machine codes. Furthermore, we propose an advanced collaborative learning model to enable real-time detection of diverse attack types at distributed mining nodes. Our model can efficiently detect attacks in smart contracts and transactions for blockchain systems without the need to gather all data from mining nodes into a centralized server. In order to evaluate the performance of our proposed framework, we deploy a pilot system based on a private Ethereum network and conduct multiple attack scenarios to generate a novel dataset. To the best of our knowledge, our dataset is the most comprehensive and diverse collection of transactions and smart contracts synthesized in a laboratory for cyberattack detection in blockchain systems. Our framework achieves a detection accuracy of approximately 94% through extensive simulations and 91% in real-time experiments with a throughput of over 2,150 transactions per second.
翻译:随着利用区块链系统漏洞的恶意活动日益猖獗,对鲁棒攻击检测机制的需求愈发迫切。为应对这一挑战,本文提出一种新颖的协同学习框架,旨在通过分析交易特征来检测区块链交易与智能合约中的攻击行为。本框架能够对多种类型的区块链攻击进行分类,包括机器代码层面的复杂攻击(例如注入恶意代码以非法提取用户代币),这类攻击通常需要大量时间和安全专业知识才能被发现。为实现这一目标,所提框架集成了一种独特工具,可将交易特征转化为可视化表征,从而促进对底层机器代码的高效分析与分类。此外,我们提出一种先进的协同学习模型,以实现分布式挖矿节点对多种攻击类型的实时检测。该模型能够高效检测区块链系统中智能合约与交易的攻击,且无需将所有数据从挖矿节点汇集至中央服务器。为评估所提框架的性能,我们基于私有以太坊网络部署了试点系统,并通过执行多类攻击场景生成了新型数据集。据我们所知,该数据集是当前实验室环境下为区块链系统网络攻击检测所构建的最全面、最多样化的交易与智能合约集合。通过大量仿真实验,本框架实现了约94%的检测准确率;在实时实验中以每秒2,150笔以上的吞吐量达到了91%的准确率。