Source-linked AI summary
The Art of The Scam: Demystifying Honeypots in Ethereum Smart Contracts
Christof Ferreira Torres, Mathis Steichen, Radu State
TL;DR
The paper addresses limited systematic evidence about honeypots, a proactive Ethereum fraud in which seemingly vulnerable contracts lure victims. It develops HONEYBADGER with symbolic execution and heuristics, then analyzes honeypots at scale. The study reports hundreds of honeypots and victims, substantial attacker profit, and a bytecode-level detection boundary.
Problem
The paper investigates the prevalence, behavior, and impact of honeypot smart contracts, an emerging proactive fraud in Ethereum.
Method
The paper combines a taxonomy of honeypot techniques with HONEYBADGER, which uses symbolic execution and precise heuristics for automated detection.
Results
HONEYBADGER identified 460 honeypots among 151,935 unique Ethereum smart contracts; transactions from 282 honeypots revealed 240 victims and more than $90,000 in profit.
Takeaways & Limitations
HONEYBADGER may help users detect honeypots before they cause harm, while the reported counts provide a lower bound on their prevalence and impact.
Takeaways & Limitations
Bytecode-level detection is difficult for techniques whose information is lost during compilation, such as inheritance disorder.
Abstract
from arXiv · showhide
Modern blockchains, such as Ethereum, enable the execution of so-called smart contracts - programs that are executed across a decentralised network of nodes. As smart contracts become more popular and carry more value, they become more of an interesting target for attackers. In the past few years, several smart contracts have been exploited by attackers. However, a new trend towards a more proactive approach seems to be on the rise, where attackers do not search for vulnerable contracts anymore. Instead, they try to lure their victims into traps by deploying seemingly vulnerable contracts that contain hidden traps. This new type of contracts is commonly referred to as honeypots. In this paper, we present the first systematic analysis of honeypot smart contracts, by investigating their prevalence, behaviour and impact on the Ethereum blockchain. We develop a taxonomy of honeypot techniques and use this to build HoneyBadger - a tool that employs symbolic execution and well defined heuristics to expose honeypots. We perform a large-scale analysis on more than 2 million smart contracts and show that our tool not only achieves high precision, but is also highly efficient. We identify 690 honeypot smart contracts as well as 240 victims in the wild, with an accumulated profit of more than $90,000 for the honeypot creators. Our manual validation shows that 87% of the reported contracts are indeed honeypots.
1 Introduction
Ethereum’s growing value and prior attacks motivate studying honeypots, which proactively lure users with contracts that appear exploitable. The paper introduces HONEYBADGER and systematically analyzes honeypot techniques and prevalence.
- Motivation: Ethereum’s rising value and major attacks increased incentives to exploit vulnerable smart contracts.The DAO and Parity Wallet hacks together caused losses exceeding $400 million.
- Motivation: Existing vulnerability scanners can help attackers find exploitable contracts, enabling a reactive attack strategy.The paper contrasts this with proactively luring victims into traps.
- Honeypots: Honeypots appear to contain flaws that let users drain ether after depositing funds, but hide traps that prevent exploitation.This design reverses the usual search for vulnerable victims by attracting them to the contract.
- Contributions: HONEYBADGER automatically detects Ethereum honeypots using symbolic execution and precise heuristics.The paper presents the tool as part of its systematic investigation of honeypot prevalence and behavior.
- Contributions: The study conducts the first systematic analysis of Ethereum honeypots and organizes their techniques into a taxonomy.The taxonomy is presented as a reference for users and a guide for developing detection methods.
- Results: 151,935 unique smart contracts yielded at least 282 unique honeypots in the study.This is the reported prevalence result from the large-scale analysis.
2 Background
The background introduces Ethereum’s decentralized execution environment, immutable smart contracts, and the EVM. It also identifies Etherscan as a source of blockchain, contract, and published-source information.
- Ethereum Virtual Machine: The EVM is a stack-based virtual machine with a Turing-complete instruction set of opcodes.Execution terminates and reverses effects when a transaction exceeds its assigned gas.
- Ethereum Network: Ethereum uses mutually distrusting nodes and miners to maintain a decentralized public ledger and process contract transactions.Miners execute smart contracts during block verification using the EVM.
- Etherscan: Etherscan lets users inspect blocks, transactions, and smart contracts, while creators can publish and verify contract source code.The platform also supports comments on smart contracts.
3 Ethereum Honeypots
Honeypots are smart contracts that appear to offer exploitable funds but trap the additional funds supplied by victims. The paper defines a taxonomy of techniques and illustrates how EVM behavior, compiler issues, and blockchain-explorer presentation can support these traps.
- 3.1 Honeypots: A honeypot pretends to leak funds to an arbitrary user who sends additional funds, but traps the user’s contribution for the creator.
- 3.1 Honeypots: The attack proceeds through deployment of a seemingly vulnerable contract with bait, a failed victim exploit attempt, and attacker withdrawal of the bait and lost funds.
- 3.1 Honeypots: Attackers need only ordinary Ethereum-user capabilities, plus funds to deploy the contract and place bait.
- 3.2 Taxonomy of Honeypots: The taxonomy distills 8 honeypot techniques from 24 collected examples, serving users and researchers as a reference for avoidance and detection.
- 3.2.1 Ethereum Virtual Machine: Balance disorder exploits transaction-value accounting: the contract balance already includes msg.value, so the apparent transfer condition fails for nonzero balances.
- 3.2.2 Solidity Compiler: Compiler-related traps include inheritance disorder, skipped empty-string arguments, type-deduction overflow, and uninitialised structs, while hidden state updates exploit Etherscan filtering.
4 HONEYBADGER
HONEYBADGER analyzes EVM bytecode through symbolic, cash-flow, and honeypot-specific analyses to detect multiple honeypot techniques. Its heuristics identify technique-specific patterns and can be extended with additional components.
- Pipeline: HONEYBADGER takes EVM bytecode as input and returns a report of detected honeypot techniques.Its pipeline comprises symbolic analysis, cash flow analysis, and honeypot analysis.
- Symbolic analysis: Symbolic analysis constructs a control-flow graph and symbolically executes its possible paths.The engine explores branches with depth-first search and uses Z3 to assess path feasibility.
- Cash-flow analysis: Cash-flow analysis discards contracts that cannot both receive and transfer funds.This improves performance by filtering contracts that cannot satisfy the honeypot definition.
- Honeypot analysis: Honeypot analysis uses separate heuristic sub-components to detect particular techniques.The design can be extended by implementing new sub-components.
- Detected techniques: The heuristics detect patterns including balance disorder, inheritance disorder, hidden state updates, hidden transfers, and type deduction overflow.Other covered patterns include skip empty string literals, uninitialised structs, and straw man contracts.
5 Evaluation
The evaluation measures HONEYBADGER’s reliability, efficiency, and honeypot prevalence on Ethereum bytecode. Across 151,935 analyzed contracts, the tool achieved broad coverage and identified hundreds of honeypots.
- Dataset: 2,019,434 smart-contract bytecodes were collected from the first 6,500,000 Ethereum blocks.The dataset spans contracts deployed from August 7, 2015 to October 12, 2018.
- Performance: 151,935 unique smart contracts were analyzed, with 98% completed within the 30-minute limit.Average analysis time was 142 seconds, the median was 31 seconds, and average code coverage was about 91%.
- Results: 48,487 contracts, or 32% of those analyzed, were flagged as capable of receiving and sending funds.These contracts were classified as cash-flow contracts before honeypot detection.
- Results: 690 contracts were identified as honeypots after correlating detections with bytecode across roughly 2 million deployed contracts.The tool initially detected 460 unique honeypots and found 436 new honeypots beyond the initial dataset.
- Technique prevalence: The detected techniques included 382 hidden state updates, 101 straw man contracts, 80 uninitialised structs, and 75 inheritance disorders.The remaining counts were 22 balance disorders, 11 skip empty string literals, 5 type deduction overflows, and 14 hidden transfers.
- Validation: Manual verification used source code for 323 flagged contracts and assessed true positives, false positives, and precision.The reported results showed very high precision and a very low false-positive rate.
6 Analysis
The analysis examines honeypot effectiveness, persistence, victim and attacker behavior, code diversity, and profitability. Honeypots often act quickly, usually trap few victims, and generated substantial aggregate profit.
- Effectiveness: 37% of honeypots succeeded, 54% were aborted, and 10% remained active at the time of analysis.Skip empty string literal was most effective at roughly 78% success, while hidden transfer was least effective at 33%.
- Effectiveness: 55% of honeypots were exploited during their first 24 hours after deployment.The peak deployment month was February 2018, with 66 honeypots deployed.
- Liveness: Honeypot lifespans ranged from 5 minutes 25 seconds to about 322 days, with an average of roughly 28 days and median of roughly 3 days.Around 32% lasted only one day, while attackers usually withdrew funds within one day of a victim’s failed exploitation attempt.
- Behaviour: 240 addresses were classified as victims, and 71% of honeypots trapped only one victim.One honeypot trapped 97 victims, while eight addresses fell for more than one honeypot.
- Diversity: Bytecode similarity varied substantially across instances of nearly every technique except type deduction overflow.Hidden state update honeypots ranged from 11% to 98% similarity.
- Profitability: Honeypots generated 257.25 ether in total profit, including 171.22 ether from hidden state updates.Straw man contracts had the highest average profitability at 1.76 ether, while uninitialised structs averaged 0.46 ether.
7 Discussion
The discussion connects honeypot outcomes with user behavior, source-code availability, detection difficulty, and ethical ambiguity. It emphasizes bytecode-level analysis while recognizing scope and interpretation limits.
- Key insights: Most honeypots trapped only one victim, suggesting users may inspect prior transactions before submitting funds.Honeypots with comments had lower success, suggesting users may also check Etherscan comments.
- Challenges and limitations: Only about 50,000 contracts had source code available on Etherscan, making bytecode-level detection necessary.Inheritance disorder is difficult to detect from bytecode because compilation removes inheritance information, reducing precision and introducing false positives.
- Challenges and limitations: HONEYBADGER is limited to the eight honeypot techniques described in the paper.Other honeypot techniques are outside the tool’s current detection scope.
- Ethical considerations: Honeypot creators and users cannot always be classified as malicious or benign because intentions depend on the specific case.The paper contrasts deliberate exploitation attempts with users who lose funds believing they are participating in a fair lottery.
8 Related Work
Prior work used manual analysis, pseudocode generation, fuzzing, static analysis, and symbolic execution to detect smart-contract fraud or vulnerabilities. This paper builds on symbolic execution because it can reason over execution paths and bytecode, supporting large-scale honeypot analysis.
- Existing approaches: Prior approaches include manual source-code analysis, bytecode-to-pseudocode generation, fuzzing, static analysis, and symbolic execution.These methods target fraud, security vulnerabilities, gas-related issues, or misbehaving contracts.
- Existing approaches: Fuzzing may fail to generate inputs that enter specific execution paths, while some static-analysis tools require manual interaction or predefined patterns.
- Symbolic execution: Symbolic execution reasons about all possible execution paths and states, enabling precise heuristics and a low false-positive rate.
- Symbolic execution: Bytecode-level symbolic execution suits analysis of more than 2 million contracts whose source code is largely unavailable.The paper notes that smart contracts are generally short and constrained by Ethereum’s gas limit, reducing the practical impact of path explosion.
- This paper: This paper presents the first discussion of honeypot smart contracts together with a taxonomy and an automated symbolic-execution-based detection tool.
9 Conclusion
The conclusion presents a taxonomy and an automated symbolic-execution-and-heuristics methodology for detecting Ethereum honeypots. HONEYBADGER detected honeypots in a large-scale study, found victims and creator profits, and may help users identify traps before harm occurs.
- Contributions: HONEYBADGER combines symbolic execution and heuristics to automate honeypot detection.
- Contributions: The paper presents a taxonomy of honeypot techniques and investigates honeypots as an emerging type of Ethereum fraud.
- Findings: The study analysed 151,935 unique Ethereum smart contracts and identified 460 honeypots.
- Findings: Transactions involving a subset of 282 honeypots showed that 240 users became victims and attackers earned more than 90,000 USD.The reported counts and profit are lower bounds.
- Implications: The authors state that HONEYBADGER may help users detect honeypots before they cause harm.
A List of Honeypots
Table 5 lists 24 honeypots collected from public Internet sources. The listed fields are contract name, contract address, and honeypot technique.
- Table 5: Table 5 contains 24 honeypots collected from publicly available Internet sources.
- Table 5: The table identifies each entry by contract name, contract address, and technique.
Ethereum Virtual Machine
The supplied passage lists contract names, addresses, and techniques for two honeypots. Both listed examples use the Balance Disorder technique.
- Entries: The passage presents contract name, contract address, and technique fields.
- Entries: MultiplicatorX3 has address 0x5aa88d2901c68fda244f1d0584400368d2c8e739 and uses Balance Disorder.
- Entries: PinCodeEtherStorage has address 0x35c3034556b81132e682db2f879e6f30721b847c and uses Balance Disorder.
Solidity Compiler
The section lists publicly available honeypot contracts and identifies several entries as using the “Inheritance Disorder” pattern.
- The listed contracts include TestBank, KingOfTheHill, RichestTakeAll, ICO Hold, TerrionFund, and DividendDistributorv3.
- Six listed contracts are labeled with the “Inheritance Disorder” technique.
- Table 5 lists publicly available honeypots found on the Internet.