Skip to content

shuo-young/lydia

Repository files navigation

Static Badge Static Badge Static Badge Documentation License: Apache GitHub Actions Workflow Status


Logo

Lydia

Table of Contents
  1. About The Project
  2. Prerequisites
  3. Usage
  4. Features
  5. License

About The Project

An Attacker Contract Identification Tool Implemented in Rust based on BlockWatchdog.

Prerequisites

  • rust toolchain

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • gigahorse-toolchain

    Lydia requires Gigahorse (commit da473f3) to be set up for analyzing EVM bytecode. To set up Gigahorse, refer to its repository.

Install

  1. Rust build locally.
cargo build --release
  1. Or you can build or pull the docker image.
docker build -t lydia:local .
docker pull ghcr.io/shuo-young/lydia:latest

Usage

Local

RUST_LOG=info cargo run -- -b ETH -l 0x10C509AA9ab291C76c45414e7CdBd375e1D5AcE8
# or use build bin
./target/release/lydia -b ETH -l 0x10C509AA9ab291C76c45414e7CdBd375e1D5AcE8

Docker

For the docker image, run with the following command.

docker run ghcr.io/shuo-young/lydia:latest -b ETH -l 0x10C509AA9ab291C76c45414e7CdBd375e1D5AcE8

Features

more faster for identifying attackers and contracts with malicious intentions

  • Recover all possible call chains in attacker contract (each public function).
  • Report critical attack semantic, e.g., call in hook functions, selfdestruct, use randomnumer, creation (sole and multi) etc.
  • Locating call sites that could perform reentrancy and possible reentrancy targets.

License

Copyright © 2024 Shuo Yang.
This project is Apache licensed.