Giter VIP home page Giter VIP logo

horus's Introduction

Horus

A framework to detect attacks and trace stolen assets across Ethereum. Our paper can be found here.

Quick Start

A container with the dependencies set up can be found here.

To open the container, install docker and run:

docker pull christoftorres/horus && docker run -i -t christoftorres/horus

To evaluate a transaction inside the container, run:

cd horus
python3 horus.py -e -tx 0x0ec3f2488a93839524add10ea229e773f6bc891b4eb4794c3337d4495263790b --host <RPC_HOST> --port <RPC_PORT>
python3 horus.py -a

and you are done!

Custom Docker image build

docker build -t horus .
docker run -it horus:latest

Installation Instructions

1. Install Soufflé

MacOS
brew install souffle-lang/souffle/souffle

For other operating systems follow the installation instructions on souffle-lang.github.io.

2. Install Python Dependencies

cd horus
pip3 install -r requirements.txt

3. Install Neo4j

Download and install Neo4j from neo4j.com.

Running Instructions

⚠️ Horus requires a connection to a fully synced Go-Ethereum (Geth) archive node.

More information on how to run an archive node can be found here.

  1. Run the extractor on a transaction (-tx), block (-b) or contract (-c):
cd horus
python3 horus.py -e -tx 0x0ec3f2488a93839524add10ea229e773f6bc891b4eb4794c3337d4495263790b --host <RPC_HOST> --port <RPC_PORT> -f <FACTS_FOLDER>
  1. Run the analyzer on the extracted Datalog facts:
cd horus
python3 horus.py -a -f <FACTS_FOLDER> -r <RESULTS_FOLDER> -d <DATALOG_FILE>
  1. Run the tracer on the Datalog results:
cd horus
python3 horus.py -t -r <RESULTS_FOLDER> --type <TYPE> --direction <DIRECTION> --hops <HOPS> --neo4j-connection <NEO4J_CONNECTION> --neo4j-user <NEO4J_USER> --neo4j-password <NEO4J_PASSWORD>

Run python3 horus.py --help for a complete list of options.

horus's People

Contributors

christoftorres avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.