How thorkill/eresi works
ERESI is a suite of ELF reverse-engineering tools, centered on ELFsh, with related debuggers, tracing and kernel utilities, and analysis libraries. The main workflow is to invoke ELFsh interactively, from a script, or on the command line; its runtime parses commands and operates on ELF objects for inspection, modification, injection, and saving. The README documents additional debugging, tracing, disassembly, control-flow, and network capabilities. The supplied excerpts show entry-point setup and selected library dependencies, but not most command implementations, so undocumented internal call paths are omitted.
Main entry points: parser.c Command runtime · elfsh/main.c ELFsh shell · libelfsh.h ELF manipulation · e2dbg/main.c Embedded debugger
Components 21
User tools
- ELFsh shell
elfsh/main.c - Embedded debugger
e2dbg/main.c - Function tracer
etrace/main.c - Static analyzer
evarista/main.c - Kernel shell
kernsh/main.c - Kernel debugger
kedbg/main.c
Runtime and commands
- Command runtime
librevm/lang/parser.c - ELF commands
libstderesi/cmd/init.c
Binary analysis
- ELF object operations
libstderesi/elf/data.c - ELF manipulation
libelfsh/include/libelfsh.h - Disassembly
libasm/include/libasm.h - Control-flow analysis
libstderesi/analysis/graph.c - Debug formats
libedfmt/stabs.c - ELF injection modules
modules/modremap.c
Debug and trace
- Debugger support
libe2dbg/common/dbghooks.c - GDB protocol wrapper
libgdbwrap/client.c - Kernel access
libkernsh/user/kvirtm.c
Supporting libraries
- Distributed dump
libdump/dump.c - Shared data structures
libaspect/include/libaspect.h - Network commands
librevm/io/network.c
Other components
- Engineer or script
Connections 28
- Engineer or script → ELFsh shell: invokes
- ELFsh shell → Command runtime: starts runtime
elfsh/main.c - Command runtime → ELF commands: dispatches commands
- ELF commands → ELF object operations: operates on ELF
- ELF object operations → ELF manipulation: uses ELF API
- ELFsh shell → ELF injection modules: loads modules
- ELF manipulation → Disassembly: supports disassembly
- ELFsh shell → Control-flow analysis: offers graph analysis
- ELF manipulation → Debug formats: provides debug data
- Engineer or script → Embedded debugger: starts debugging
- Embedded debugger → Debugger support: uses debugger hooks
- Embedded debugger → Command runtime: uses runtime
- Engineer or script → Function tracer: starts tracing
- Function tracer → Command runtime: runs commands
etrace/main.c - Engineer or script → Static analyzer: starts analysis
- Static analyzer → Command runtime: uses runtime
- Engineer or script → Kernel shell: starts kernel shell
- Kernel shell → Command runtime: runs commands
kernsh/main.c - Kernel shell → Kernel access: uses kernel access
kernsh/main.c - Engineer or script → Kernel debugger: starts kernel debug
- Kernel debugger → GDB protocol wrapper: controls target
- Kernel debugger → Debugger support: uses debugger support
- Command runtime → ELF manipulation: includes ELF API
- Command runtime → Debug formats: includes format API
- Command runtime → Disassembly: includes disassembler
- Command runtime → Shared data structures: uses shared structures
- Command runtime → Network commands: provides network commands
- Network commands → Distributed dump: uses dump protocol