bmatcher - Your Easy Binary Pattern Matcher

bmatcher is a flexible and efficient binary pattern matching library designed to help you search and match binary data.
It is no_std compatible by default, making it suitable for embedded, kernel, or hypervisor environments where standard library usage is restricted.
Motivation
Reverse engineering is challenging. When you identify an interesting address, such as a function or global variable, you don't want to lose all that effort when the program is updated.
The good news is that, during updates, programs usually don't change drastically. While some functions and data may be altered, much of the program remains unchanged. However, this means that the unchanged parts might be moved to different addresses.
This is where patterns come in. Patterns allow you to track these interesting parts of a program, even as it evolves and updates. By using patterns, you can identify specific functions, data references, or other critical locations, regardless of where they end up after a program update.
Getting Started
To use bmatcher, add it as a dependency in your Cargo.toml:
[]
= "0.3"
Creating a pattern
An exhausive overview of the pattern syntax and operads can be found here.
Basic Usage
Here's a simple example demonstrating how to use bmatcher to match a call signature binary pattern:
let data: & = ...;
let pattern = pattern!;
let mut matcher = execute;
let Some = matcher.next_match else ;
println!;
println!;