Eth2Vec: Learning contract-wide code representations for vulnerability detection on Ethereum smart contracts
Autor: | Naoto Yanai, Jason Paul Cruz, Nami Ashizawa, Shingo Okamura |
---|---|
Rok vydání: | 2022 |
Předmět: |
FOS: Computer and information sciences
Computer Science - Machine Learning Security analysis Computer Science - Cryptography and Security Artificial neural network Smart contract Computer science business.industry Computer Networks and Communications Static program analysis Static analysis Machine learning computer.software_genre Machine Learning (cs.LG) Computer Science Applications Software Engineering (cs.SE) Support vector machine Computer Science - Software Engineering Virtual machine Code (cryptography) Artificial intelligence business Cryptography and Security (cs.CR) computer Information Systems |
Zdroj: | BSCI |
ISSN: | 2096-7209 |
Popis: | Ethereum smart contracts are programs that run on the Ethereum blockchain, and many smart contract vulnerabilities have been discovered in the past decade. Many security analysis tools have been created to detect such vulnerabilities, but their performance decreases drastically when codes to be analyzed are being rewritten. In this paper, we propose Eth2Vec, a machine-learning-based static analysis tool for vulnerability detection in smart contracts. It is also robust against code rewrites, i.e., it can detect vulnerabilities even in rewritten codes. Existing machine-learning-based static analysis tools for vulnerability detection need features, which analysts create manually, as inputs. In contrast, Eth2Vec automatically learns features of vulnerable Ethereum Virtual Machine (EVM) bytecodes with tacit knowledge through a neural network for natural language processing. Therefore, Eth2Vec can detect vulnerabilities in smart contracts by comparing the code similarity between target EVM bytecodes and the EVM bytecodes it already learned. We conducted experiments with existing open databases, such as Etherscan, and our results show that Eth2Vec outperforms a recent model based on support vector machine in terms of well-known metrics, i.e., precision, recall, and F1-score. |
Databáze: | OpenAIRE |
Externí odkaz: |