Skip to main content
QUICK REVIEW

[论文解读] A Data Science Approach for Honeypot Detection in Ethereum

Ramiro Daniel Camino, Christof Ferreira Torres|arXiv (Cornell University)|Oct 3, 2019
Blockchain Technology Applications and Security参考文献 19被引用 9
一句话总结

本文提出一种数据科学方法,通过分析交易行为、资金流动模式以及合约特征(如源代码长度和编译信息)来检测以太坊蜜罐。利用基于HoneyBadger标注数据训练的机器学习模型,该方法识别出已知及此前未知的蜜罐技术——包括两种新型技术——在泛化能力和新发现能力方面优于仅基于字节码的分析方法。

ABSTRACT

Ethereum smart contracts have recently drawn a considerable amount of attention from the media, the financial industry and academia. With the increase in popularity, malicious users found new opportunities to profit by deceiving newcomers. Consequently, attackers started luring other attackers into contracts that seem to have exploitable flaws, but that actually contain a complex hidden trap that in the end benefits the contract creator. In the blockchain community, these contracts are known as honeypots. A recent study presented a tool called HONEYBADGER that uses symbolic execution to detect honeypots by analyzing contract bytecode. In this paper, we present a data science detection approach based foremost on the contract transaction behavior. We create a partition of all the possible cases of fund movements between the contract creator, the contract, the transaction sender and other participants. To this end, we add transaction aggregated features, such as the number of transactions and the corresponding mean value and other contract features, for example compilation information and source code length. We find that all aforementioned categories of features contain useful information for the detection of honeypots. Moreover, our approach allows us to detect new, previously undetected honeypots of already known techniques. We furthermore employ our method to test the detection of unknown honeypot techniques by sequentially removing one technique from the training set. We show that our method is capable of discovering the removed honeypot techniques. Finally, we discovered two new techniques that were previously not known.

研究动机与目标

  • 开发一种数据驱动的方法,用于检测以太坊蜜罐,以补充现有的字节码分析工具。
  • 探究交易行为和资金流动模式是否包含可用于蜜罐检测的区分性信号。
  • 通过机器学习识别并验证新的、此前未知的蜜罐技术。
  • 通过从训练集中移除已知蜜罐技术并测试其检测能力,评估模型的泛化性能。

提出的方法

  • 作者构建了一个综合特征集,结合了源代码元数据(如源代码长度、编译信息)、交易级别聚合特征(如交易数量、平均金额)以及资金流动行为。
  • 他们定义了资金流动在合约创建者、合约本身、发送方及其他参与方之间的分配模式,以建模财务交互行为。
  • 使用HoneyBadger工具提供的标签训练机器学习分类器,该工具通过符号执行识别已知蜜罐技术。
  • 采用留一技术策略进行模型评估,即依次将每种已知蜜罐技术从训练集中移除,以测试对未见过技术的检测能力。
  • 该方法利用交易数据和资金流动序列,检测指示蜜罐行为异常的模式。
  • 研究采用逐步推进的方法,对真实以太坊智能合约数据进行数据收集、特征工程和模型评估。

实验结果

研究问题

  • RQ1交易行为和资金流动模式是否能有效区分蜜罐与合法智能合约?
  • RQ2在已知蜜罐实例上训练的数据科学模型,是否能在无需人工规则更新的情况下检测此前未见过的蜜罐技术?
  • RQ3当从训练集中排除一种蜜罐技术时,模型的泛化能力在多大程度上保持?
  • RQ4哪些特定合约特征(源代码、交易、资金流动)对蜜罐检测贡献最大?
  • RQ5是否存在通过HoneyBadger等基于字节码的工具无法检测,但可通过行为分析识别出的新型蜜罐技术?

主要发现

  • 该模型成功检测出所有已知蜜罐技术,包括HoneyBadger先前识别出的类型,展现出强大的泛化能力。
  • 该模型识别出两种此前未知的蜜罐技术——特别是“映射键编码技巧”(Map Key Encoding Trick, MKET)——这些技术仅靠字节码分析无法被检测到。
  • 即使从训练集中完全移除某一类蜜罐技术的所有合约,模型在测试中仍能保持对该技术的检测能力,证明其具备稳健的泛化性能。
  • 所有特征类别——源代码、交易统计和资金流动行为——均对蜜罐检测提供了有意义的信息。
  • 该模型在检测新型和演化的蜜罐模式方面优于HoneyBadger,因其不依赖于人工构建的规则。
  • 研究证实,即使在字节码分析失效的情况下,交易中的行为和财务模式仍是蜜罐合约的强有力指标。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。