Skip to content
fuzzerscPublic

About

Unlocking Underexplored States: LLM-Enhanced Smart Contract Fuzzing with Retrieval-Augmented Generation

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

LARA

This repository contains official implementation of our paper "Unlocking Underexplored States: LLM-Enhanced Smart Contract Fuzzing with Retrieval-Augmented Generation".


If you want to use a locally deployed LLM to run our framework, see LLM/README.md for details.

For information about our tool's dependencies, how to install them, and how to install, initialize and use our framework, you can see fuzzer/README.md

Inital

Our framework is implemented based on previous work IR-Fuzz, so we will install it first.

git clone https://github.com/Messi-Q/IR-Fuzz.git

then, please install the dependencies:

sudo apt update
sudo apt install -y cmake golang-go libleveldb-dev libcrypto++-dev software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt update
sudo apt install -y build-essential git libssl-dev libgmp-dev libboost-all-dev ethereum libjsoncpp-dev
pip3 install -r requirements.txt

Next, we install the Solidity compiler solc. If it is already installed, you can ignore it. We use the integrated tool solc-select to achieve this.

pip3 install numpy solc-select
solc-select use 0.4.26 --always-install

Sometimes, the default Go module proxy server may experience network issues. In this case, you may need to switch to a more stable proxy, such as GOPROXY. Set the GOPROXY environment variable to https://goproxy.io or https://proxy.golang.org

or you can exec:

export GOPROXY=https://goproxy.io

Check it works:

cmake --version
go version
geth version
solc --version

Check go in bran works:

cd bran
go mod init
cd ..

initial LARA

you can initial LARA by following script: (in dir fuzzer)

sh initial_LARA.sh

Usage

You can run LARA by executable file run_lara.sh

./run_lara.sh $DURATION $ROUND $MODEL_NAME
  • Use LLM: (We have integrated DeepBrick's API call method.)
export DB_API_KEY=[your_deepbricks_api_key]
  • If you want to use LARA in local system with ollama, you can see LLM/README.md.

About

Unlocking Underexplored States: LLM-Enhanced Smart Contract Fuzzing with Retrieval-Augmented Generation

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages