Eth2Vec is an analysis tool based on a neural network for natural language processing, and it outputs the existence and kind of vulnerabilities in a target smart contract code by only taking the code as input. Using Eth2Vec, you can analyze code of smart contracts quickly even without expert knowledge on smart contract vulnerabilities. The paper of Eth2Vec is published on https://arxiv.org/abs/2101.02377.
We implemented Eth2Vec by utilizing Kam1n0 version 2.0.0 (https://github.com/McGill-DMaS/Kam1n0-Community) and py-solc-x (https://pypi.org/project/py-solc-x/). You need to install Kam1n0 server before installing Eth2Vec.
- Create clone of Kam1n0 (https://github.com/McGill-DMaS/Kam1n0-Community) onto your local.
- Build Kam1n0 from the source code in
kam1n0.
- Install py-solc-x (https://pypi.org/project/py-solc-x/).
- Create clone of Eth2Vec onto your local.
- Copy
appof Eth2Vec tokam1n0/kam1n0-apps/src/main/java/ca/mcgill/sis/dmas/kam1n0of Kam1n0. - Copy
binof Eth2Vec tokam1n0/kam1n0-resourcesof Kam1n0. - Copy
DisassemblyFactoryIDA.javaincommonsof Eth2Vec tokam1n0/kam1n0-commons/src/main/java/ca/mcgill/sis/dmas/kam1n0/impl/disassemblyof Kam1n0. - Copy
WinUtils.javaincommonsof Eth2Vec tokam1n0/kam1n0-commons/src/main/java/ca/mcgill/sis/dmas/envof Kam1n0. - Copy
jsof Eth2Vec tokam1n0/kam1n0-apps/target/classes/staticof Kam1n0. - Rebuild Kam1n0 with the copied files of Eth2Vec.
- Run a main method in
Kam1n0-Community/kam1n0/kam1n0-cli/src/main/java/ca/mcgill/sis/dmas/kam1n0/cli/Main.javawith an argment--start.
This project is distributed under the Apache License Version 2.0. Please refer to LICENSE.txt for details.
