Skip to main content

Crate libinject

Crate libinject 

Source
Expand description

§Libinject

A static library crate which is linked with inject.dll and winafl.dll. Note that libinject can only be compiled for a Windows target.

Contains:

  • Rust bindings for the DynamoRIO C library (auto-generated from the C bindings using rust-bindgen).
  • A CLI interface for initiating DynamoRIO runs along a given trajectory of the Network Event Tree (NET).
  • Instrumentation to interpose on network API calls, using the parsed trajectory to decide how to respond to each network event (e.g. whether to accept or reject a connect call, and what responses to provide to a given request).
  • Instrumentation to collect additional, fine-grained coverage information when fuzzing.

Modules§

cli
cmp
Instrumentation for collecting fine-grained coverage information: including both i) wrapping external symbols in the loaded-module space; and ii) individually instrumenting all CPU-level CMP and TEST instructions found in the target module.
connections
drcore
drwrap
ffi
fuzzer
instrument
Shadow-stack instrumentation: Exports the instruction_event symbol, which can be registered with DynamoRIO to instrument basic blocks such that a shadow callstack is maintained while to binary executes. At any point in execution this shadow-stack can be queried for the raw absolute frame addresses of the function in the current callstack.
network
pipe
socket
trajectory
utils
wrappers

Statics§

tls_idx

Functions§

event_thread_exit
event_thread_init
libinject_exit
libinject_init
libinject_warn
module_load_event
Called by DynamoRio when each C module is loaded. Each .dll will be a module, and the main binary itself will be comprised of one or more modules.
wrap_network_symbols_extern