Skip to content

SoftSec-KAIST/EVMpress-artifact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EVMpress-artifact

An artifact repository for EVM decompilation research.

  • EVMpress: Precise Type Inference for Next-Generation EVM Decompilation: (link)

Datasets

We open-source our dataset to facilitate research in EVM decompilation (link). This includes:

  • Compiled bytecode for each contract.
  • Metadata about each contract, including its bytecode and compilation details
  • Ground truth mappings between source code and bytecode, including function and type information.

We do not include the collected source codes due to licensing restrictions and they are available via the collection step.

Requirements

  • Ubuntu 22.04+
  • Dotnet 9+
  • Python 3.8+

How to reproduce

First, you can clone the repository using

git clone https://github.com/SoftSec-KAIST/EVMpress-artifact.git --recurse-submodules

1. Source Code Collection

💡 You can skip this step if you already have collected the source codes.

To build the dataset, you need to collect the contract source codes. We provide a script to automate this process, which downloads the codes from Etherscan. See this directory.

2. Ground Truth Generation

💡 You can skip this step if you already have downloaded the dataset.

Using the downloaded codes, you can compile the source codes and generate the ground truth mappings.

2-1. Compilation

We provide a script to compile the Solidity compilers, which will modify the compilers to output the necessary information for ground truth generation (link). You can use this docker file to collect and compile the compiler source codes.

After compiling the compilers, you can use the provided scripts to compile the collected contract codes to generate the bytecode and the necessary information for ground truth generation. See this file.

2-2. Ground Truth Extraction

After compiling the codes, you can use the provided scripts to generate the ground truth mappings. See this directory.

3. Model Evaluation

We provide evaluation scripts for the generated ground truth mappings. We compare EVMpress against other state-of-the-art decompilation tools such as Gigahorse and VarLifter.

For reproducibility, we use the commit 18ce2685 for Gigahorse, and the commit 47f9e681 for VarLifter. Especially, VarLifter has no support for executing multiple instances at once, so we provide its modified version that allows for parallel execution.

3-1. EVMpress

To run EVMpress, you can find this file.

To evaluate its result, you can find this file.

3-2. Gigahorse

To run Gigahorse, you can use the following instruction:

python3 ./Implementation/Gigahorse/gigahorse.py --disable-inline -w {{output_dir}} {{hex_dir}}

To evaluate Gigahorse, you can find this file.

3-3. VarLifter

To run VarLifter, you can find this file.

To evaluate VarLifter, you can find this file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages