GithubHelp home page GithubHelp logo

chriscczhou / erays Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teamnsrg/erays

0.0 0.0 0.0 54 KB

Ethereum smart contract reverse engineering

License: MIT License

Shell 0.17% Python 99.83%

erays's Introduction

Erays

Erays is an Ethereum smart contract reverse engineering tool. Erays is not a decompiler, but looking at Erays output should be better than staring EVM bytecode.

First you need to remember that I have brain damage. Because brain damage, I use graphviz to generate the output. To install graphviz, run the follwoing:

$ sudo apt install graphviz

To run Erays, use the structurer on a file that contains contract hex string, for example:

$ python structurer.py temp/0x61edcdf5bb737adffe5043706e7c5bb1f1a56eea.hex

Now pdf (yes, brain damage) file for each function in the contract will magically appear in the temp directory. The internal functions are labeled starting from 0x0. The external functions are named after the function signature. A more complex example would be:

$ python structurer.py temp/0x61edcdf5bb737adffe5043706e7c5bb1f1a56eea.hex

Now maybe you will know how they manage the 230 M balance.

The tool should work on the given contracts in the temp directory, which includes a trivial contract, the cryptokitty contract, a high value wallet and an arbitrage.

If you run it on something and it failed, try:

$ python aggregator.py something_that_failed.hex -v

If that failed as well, then maybe it's time to give up.

If the complain was:

GARBAGE bytcode encountered

Then its probably because the bytecode is added after this tool was built (or the contract is nonsense).

erays's People

Contributors

jaytoday 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.