All Projects → meyer9 → ethdasm

meyer9 / ethdasm

Licence: other
Tool for auditing Ethereum contracts

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ethdasm

SDA
SDA is a rich cross-platform tool for reverse engineering that focused firstly on analysis of computer games. I'm trying to create a mix of the Ghidra, Cheat Engine and x64dbg. My tool will combine static and dynamic analysis of programs. Now SDA is being developed.
Stars: ✭ 98 (+88.46%)
Mutual labels:  decompiler, disassembler
Rz Ghidra
Deep ghidra decompiler and sleigh disassembler integration for rizin
Stars: ✭ 478 (+819.23%)
Mutual labels:  decompiler, disassembler
BEFA-Library
High-level library for executable binary file analysis
Stars: ✭ 14 (-73.08%)
Mutual labels:  decompiler, disassembler
Vdexextractor
Tool to decompile & extract Android Dex bytecode from Vdex files
Stars: ✭ 691 (+1228.85%)
Mutual labels:  decompiler, disassembler
Reko
Reko is a binary decompiler.
Stars: ✭ 942 (+1711.54%)
Mutual labels:  decompiler, disassembler
Il2cppspy
Unity IL2CPP Disassembler (for apk)
Stars: ✭ 213 (+309.62%)
Mutual labels:  decompiler, disassembler
MBBSDASM
MBBSDASM is an x86 Disassembler for 16-bit DOS / Windows 3.0 Segmented Executable (NE) EXE/DLL File Format with special features related to The MajorBBS & Worldgroup Modules
Stars: ✭ 34 (-34.62%)
Mutual labels:  decompiler, disassembler
Pycdc
C++ python bytecode disassembler and decompiler
Stars: ✭ 842 (+1519.23%)
Mutual labels:  decompiler, disassembler
Befa Library
High-level library for executable binary file analysis
Stars: ✭ 12 (-76.92%)
Mutual labels:  decompiler, disassembler
Replica
Ghidra Analysis Enhancer 🐉
Stars: ✭ 194 (+273.08%)
Mutual labels:  decompiler, disassembler
sleigh
Unofficial CMake build for Ghidra SLEIGH
Stars: ✭ 54 (+3.85%)
Mutual labels:  decompiler, disassembler
gdt helper
Ghidra Data Type (GDT) Helper
Stars: ✭ 24 (-53.85%)
Mutual labels:  disassembler
ghidra2dwarf
🐉 Export ghidra decompiled code to dwarf sections inside ELF binary
Stars: ✭ 135 (+159.62%)
Mutual labels:  decompiler
java-class-tools
Read and write java class files in Node.js or in the browser.
Stars: ✭ 27 (-48.08%)
Mutual labels:  disassembler
bmod
bmod parses binaries for modification/patching and disassembles machine code sections.
Stars: ✭ 12 (-76.92%)
Mutual labels:  disassembler
ghidra-r2web
Ghidra plugin to start an r2 webserver to let r2 interact with it
Stars: ✭ 38 (-26.92%)
Mutual labels:  decompiler
libmem
Advanced Game Hacking Library for C/C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External)
Stars: ✭ 336 (+546.15%)
Mutual labels:  disassembler
asm2cfg
Python command-line tool and GDB extension to view and save x86, ARM and objdump assembly files as control-flow graph (CFG) pdf files
Stars: ✭ 42 (-19.23%)
Mutual labels:  disassembler
windfish
A tracing disassembler & UI for Gameboy ROMs — integrated with Sameboy for emulation & debugging.
Stars: ✭ 68 (+30.77%)
Mutual labels:  disassembler
ida-bpf-processor
BPF Processor for IDA Python
Stars: ✭ 41 (-21.15%)
Mutual labels:  disassembler

ethdasm

Build Status Coverage Status

ethdasm aims to be a disassembler tool for the EVM. It will feature symbol detection and math simplification. I wrote this for fun and it possibly has some bugs. If you think this is neat, send some ether. If you develop a feature, send a PR. If you find a bug, submit an issue. If you want to talk, my email is my first name, my last name, plus [email protected].

ETH: 0x56489eCd3A53bF6407438c28112Ae6956BB5b1EA

Thank you so much for the donations!

Prerequisites

  • Python 3.5 or greater

Usage

usage: ethdasm.py [-h] [--decompile] [--disassemble] [--out OUT] input

positional arguments:
  input          input hex file to parse

optional arguments:
  -h, --help     show this help message and exit
  --decompile    decompiles the contract into a python-like pseudo-code
  --disassemble  disassembly contract into simplified op-codes
  --out OUT      outputs to a file; outputs to STDOUT if not specified

Symbol identifier

One thing that makes ethdasm very powerful is it's ability to identify symbols in the code. For example, a smart contract header looks something like this:

; Procedure 0x4
[     0x4] | MSTORE               | ['40', '60']
[     0x5] | CALLDATASIZE         | None
[     0x6] | ISZERO               | None
[     0x7] | PUSH2                | ['002a']
[     0xa] | JUMPI                | None
[     0xf] | PUSH29               | ['100000000000000000000000000000000000000000000000000000000']
[    0x12] | CALLDATALOAD         | ['00']
[    0x13] | DIV                  | None
[    0x14] | PUSH4                | ['41c0e1b5']
[    0x19] | DUP2                 | None
[    0x1a] | EQ                   | None
[    0x1b] | PUSH2                | ['0070']
[    0x1e] | JUMPI                | None
[    0x1f] | DUP1                 | None
[    0x20] | PUSH4                | ['f3fef3a3']
[    0x25] | EQ                   | None
[    0x26] | PUSH2                | ['009f']
[    0x29] | JUMPI                | None

We can also resolve this into a python-like pseudo-code.

def main():
	MSTORE(40, 60)
	var1 = CALLDATASIZE()
	var2 = ISZERO(var1)
	if var2: func1()
	var3 = CALLDATALOAD(00)
	var4 = var3 // 100000000000000000000000000000000000000000000000000000000
	var5 = var4 == 41c0e1b5
	if var5: func2()
	var6 = f3fef3a3 == var4
	if var6: func3()

There is also a complete contract source, bytecode, disassembled bytecode and decompiled bytecode example in the example directory of the repository.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].