Skip to content

fseclab-osaka/eth2vec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eth2Vec

Overview

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.

overview_eth2vec

Install Instruction

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.

Install Kam1n0 server

  1. Create clone of Kam1n0 (https://github.com/McGill-DMaS/Kam1n0-Community) onto your local.
  2. Build Kam1n0 from the source code in kam1n0.

Install selector of compiler of Solidity

  1. Install py-solc-x (https://pypi.org/project/py-solc-x/).

Install Eth2Vec

  1. Create clone of Eth2Vec onto your local.
  2. Copy app of Eth2Vec to kam1n0/kam1n0-apps/src/main/java/ca/mcgill/sis/dmas/kam1n0 of Kam1n0.
  3. Copy bin of Eth2Vec to kam1n0/kam1n0-resources of Kam1n0.
  4. Copy DisassemblyFactoryIDA.java in commons of Eth2Vec to kam1n0/kam1n0-commons/src/main/java/ca/mcgill/sis/dmas/kam1n0/impl/disassembly of Kam1n0.
  5. Copy WinUtils.java in commons of Eth2Vec to kam1n0/kam1n0-commons/src/main/java/ca/mcgill/sis/dmas/env of Kam1n0.
  6. Copy js of Eth2Vec to kam1n0/kam1n0-apps/target/classes/static of Kam1n0.
  7. Rebuild Kam1n0 with the copied files of Eth2Vec.
  8. Run a main method in Kam1n0-Community/kam1n0/kam1n0-cli/src/main/java/ca/mcgill/sis/dmas/kam1n0/cli/Main.java with an argment --start.

License

This project is distributed under the Apache License Version 2.0. Please refer to LICENSE.txt for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages