Hobor, Aquinas;
Abdelaziz, Tamer;
(2023)
Smart Learning to Find Dumb Contracts.
In:
Proceedings of the 32nd USENIX Security Symposium (USENIX 2023).
(pp. pp. 1775-1792).
USENIX Association: Anaheim, CA, USA.
Preview |
Text
DLVA Camera Ready (USENIX Security).pdf - Published Version Download (1MB) | Preview |
Preview |
Text
DLVA Extended Version (arXiv).pdf - Supplemental Material Download (2MB) | Preview |
Abstract
We introduce Deep Learning Vulnerability Analyzer (DLVA), a vulnerability detection tool for Ethereum smart contracts based on powerful deep learning techniques for sequential data adapted for bytecode. We train DLVA to judge bytecode even though the supervising oracle, Slither, can only judge source code. DLVA’s training algorithm is general: we “extend” a source code analysis to bytecode without any manual feature engineering, predefined patterns, or expert rules. DLVA’s training algorithm is also robust: it overcame a 1.25% error rate mislabeled contracts, and—the student surpassing the teacher—found vulnerable contracts that Slither mislabeled. In addition to extending a source code analyzer to bytecode, DLVA is much faster than conventional tools for smart contract vulnerability detection based on formal methods: DLVA checks contracts for 29 vulnerabilities in 0.2 seconds, a 10–1,000x speedup compared to traditional tools. DLVA has three key components. First, Smart Contract to Vector (SC2V) uses neural networks to map arbitrary smart contract bytecode to an high-dimensional floating-point vector. We benchmark SC2V against 4 state-of-the-art graph neural networks and show that it improves model differentiation by an average of 2.2%. Second, Sibling Detector (SD) classifies contracts when a target contract’s vector is Euclidianclose to a labeled contract’s vector in a training set; although only able to judge 55.7% of the contracts in our test set, it has an average Slither-predictive accuracy of 97.4% with a false positive rate of only 0.1%. Third, Core Classifier (CC) uses neural networks to infer vulnerable contracts regardless of vector distance. We benchmark DLVA’s CC with 10 “offthe-shelf” machine learning techniques and show that the CC improves average accuracy by 11.3%. Overall, DLVA predicts Slither’s labels with an overall accuracy of 92.7% and associated false positive rate of 7.2%. Lastly, we benchmark DLVA against nine well-known smart contract analysis tools. Despite using much less analysis time, DLVA completed every query, leading the pack with an average accuracy of 99.7%, pleasingly balancing high true positive rates with low false positive rates.
Type: | Proceedings paper |
---|---|
Title: | Smart Learning to Find Dumb Contracts |
Event: | The 32nd USENIX Security Symposium (USENIX 2023) |
Location: | Anaheim, CA, USA |
Dates: | 9 Aug 2023 - 11 Aug 2023 |
ISBN-13: | 978-1-939133-37-3 |
Open access status: | An open access version is available from UCL Discovery |
Publisher version: | https://2459d6dc103cb5933875-c0245c5c937c5dedcca3f... |
Language: | English |
Additional information: | This version is the author accepted manuscript. For information on re-use, please refer to the publisher’s terms and conditions. |
UCL classification: | UCL UCL > Provost and Vice Provost Offices > UCL BEAMS UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science > Dept of Computer Science |
URI: | https://discovery-pp.ucl.ac.uk/id/eprint/10172221 |
Archive Staff Only
![]() |
View Item |