Rafał Leśniak edited this page Apr 24, 2016 · 1 revision


This document shows how to use ERESI either using its C API or its scripting primitives. Everything that can be done in scripting can also be done using the C API. All features present on that page are known to work. If a link is missing, no testsuite is available for this feature, but the technique is used within the ERESI code as implemented by one of our tools.

ERESI language basics

Those features are provided by librevm, the Reverse Engineering Vector Machine, aka the interpreter of the ERESI language:

Static binary instrumentation

Those features are part of libelfsh used in the ELF shell:

Static binary code analysis

Those features are part of libasm and libmjollnir used in the Evarista analyzer:

  • Use the internal libasm API.
  • Unstrip a missing symbol table.
  • Disassemble fully resolved binary code using regular expressions.
  • Plotting control flow graphs with clever color support.
  • Fingerprint functions using md5.

Runtime embedded binary debugging

Those features are part of the Embedded ELF debugger. All those operations are implemented without the ptraceOS-level system call :

Runtime embedded binary tracing

Those features are part of libetrace and used in the Embedded ELF tracer:

Runtime kernel instrumentation

Those features are part of libkernsh and used in the Kernel shell:

Interface builtins

Those features are part of libui and its interface in librevm/io/ :

You can request additional examples by contacting the ERESI team (see contact page).