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 a customized collaborative learning model to enable real-time detection of diverse attack types at distributed mining nodes. In order to create a comprehensive dataset, we deploy a pilot system based on a private Ethereum network and conduct multiple attack scenarios. 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 real-time experiments with a throughput of over 2,150 transactions per second. These compelling results validate the efficacy of our framework and showcase its adaptability in addressing real-world cyberattack scenarios.
翻译:随着恶意活动利用区块链系统漏洞的日益猖獗,迫切需要稳健的攻击检测机制。针对这一挑战,本文提出了一种新型协同学习框架,通过分析交易特征来检测区块链交易与智能合约中的攻击。该框架能够分类多种区块链攻击类型,包括机器码级别的复杂攻击(例如,注入恶意代码非法窃取用户数字货币),这类攻击通常需要耗费大量时间与安全专业知识才能发现。为实现此目标,所提框架集成了一项独特工具,可将交易特征转化为可视化表示,从而促进低层级机器码的高效分析与分类。此外,我们设计了一种定制化协同学习模型,使得分布式挖矿节点能够实时检测多种攻击类型。为构建全面的数据集,我们基于私有以太坊网络部署了一个试点系统,并实施了多种攻击场景。据我们所知,该数据集是在实验室环境中为区块链系统网络攻击检测所合成的最全面且多样化的交易与智能合约集合。通过大规模仿真与实时实验,我们的框架实现了约94%的检测准确率,且吞吐量超过每秒2150笔交易。这些令人信服的结果验证了框架的有效性,并展示了其在应对真实网络攻击场景中的适应性。