An ESIL Toolchain written in rust. For more information on ESIL, its usage and semantics, please check documentation.
This repository is mainly divided into three modules. With very specific function for each. The ideal end-goal is to be able to use ESIL for a specific purpose by implementing only a particular component and reuse every other. Below is the outline for the same.
lexer.rs: Used to break up input ESIL string into
Tokens. If ESIL is the
InputLanguage of your choice, then this lexer can be reused. A new lexer has to be written only if the input language is something other than ESIL.
parser.rs: Used to parse the
Tokensgenerated by the lexer. The
Parseshould match the
Tokenize. As long as your lexer outputs
Tokens(as defined in lexer.rs), this component can be reused to process the tokens that your lexer produces. The parser does not work as a standalone as a standalone and is to be embeded into an
Evaluator. The parser does most of the heavy work in translating ESIL, leaving the
Evaluatorto only evaluate the Tokens that it returns to it.
evaluator: The evaluator is the most interesting part of all. The evaluator can be anything from an ESIL-VM, to a ESIL to REIL converter, Symbolic Execution engine etc. It is upto the evaluator to decide what to do with the tokens that are returned by the parser. The implementation of the evaluator depends on the use case. Usually, this is the only component that is to be implemented when using ESIL for any analysis.
(TODO) To see a sample usage of an evaluator, check vm.rs or radeco-lib
- Default Evaluator (ESIL-VM) implementation
- More usage examples and auto-documentation
The code in this repository is licensed under the 3-clause BSD. Check LICENSE for a copy of the same.