mantiserve.hooks module¶
This module contains common hooks for replacing functions that can be modeled more efficiently in Python, rather than letting Manticore add and solve constraints.
Some of these functions could include hooks for printing to standard out or sending network packets over the network, which really isn’t interesting for finding vulnerabilities within the program itself. These hooks aim to speed up and assist in the symbolic execution of binaries to prevent premature concretization and avoid complex functions within libc and other libraries.
- mantiserve.hooks.fputs_hook(hook_state) None ¶
Hook fputs.
- Return type
None
- mantiserve.hooks.hook_defaults(manticore: manticore.native.manticore.Manticore, dwarfcore: dwarfcore.dwarfcore.DwarfCore) None ¶
Hook listed functions and replace them with Python implementation on all runs of Manticore.
- Parameters
manticore (manticore.native.manticore.Manticore) –
dwarfcore (dwarfcore.dwarfcore.DwarfCore) –
- Return type
None
- mantiserve.hooks.printf_hook(hook_state) None ¶
Hook printf.
- Return type
None
- mantiserve.hooks.strcpy_hook(hook_state) None ¶
Use Manticore’s pre-existing model of strcpy to add constraints.
This is useful because symbolic execution of string-comparison functions introduces many states into the execution and is more effectively implemented in Python.
- Return type
None
- mantiserve.hooks.strlen_hook(hook_state) None ¶
Use Manticore’s pre-existing model of strlen to add constraints.
This is useful because symbolic execution of string-comparison functions introduces many states into the execution and is more effectively implemented in Python.
- Return type
None