β οΈ Security WarningThis tool is intended to be used only within a dedicated virtual machine (VM) environment. Running it outside of a controlled VM may expose your system to security risks, including potential malware execution or data leakage.
Please ensure all analysis is conducted in an isolated, sandboxed VM with no access to production networks or sensitive data.
π§ͺ Experimental Build
This branch is under active development. Functionality may be incomplete or subject to change. Testing has been conducted on Windows only. Behaviour on Linux or macOS is untested and not guaranteed.
RIFT (Rust Interactive Function Tool) is a toolsuite to assist reverse engineers in identifying library code in rust malware. It is a research project developed by the MIRAGE Team, explores library recognition techniques conducted on rust binaries and was presented at RECON 2025.
This branch is an updated version, supporting only FLIRT signature generation. For the original version presented at RECON 2025 and also supports BinaryDiffing, see the version_1_stable(https://github.com/microsoft/RIFT/tree/version_1_stable) build.
-
Binary Metadata Extraction: Extract metadata from Rust binaries including:
- Rust compiler version and commit hash
- Target architecture and triple
- Compiler type (MSVC, GNU, UEFI)
- Detected Rust crates and their versions
- File type detection (PE/ELF)
-
FLIRT Signature Generation: Create FLIRT signatures for:
- Rust compiler toolchain (rustc)
- Individual Rust crates
- Multiple architectures, tested only on x86 and x86_64
-
Multiple Operating Modes:
- File analysis mode (run rift_cli.py directly on binaries)
- JSON configuration mode (feed exported JSON files as input, similar as in version_1_stable)
- Direct generation mode (specific crate/compiler combinations)
-
Integration in Ida:
- Ida Pro Plugin and RIFT_API server to generate FLIRT signature in single RE sessions
- Clone the repository
- Install dependencies via
py -m pip install -r requirements.txt - Ensure that rustup and cargo are installed, preferably via: https://rustup.rs/
- Place Ida Pro utilities (
pcf,sigmake) andstrings.exefrom preferably SysInternals Suite in thebin/directory - Configure
rift_config.cfgwith correct paths
Furthermore, RIFT depends on data/rustc_hashes.json to determine the rust version of the corresponding commit hash. This file should be updated regularily.
To update the rustc_hashes.json file, one can simply always pull the latest RIFT version or generate it by themselves via running update_rustc_hashes.ps1 or update_rustc_hashes.sh, depending on the environment.
RIFT can either run as a command line application to generate FLIRT signatures on demand or as an API server appliance, communicating with an Ida Pro Plugin directly.
| Argument | Short | Description | Default |
|---|---|---|---|
--file |
-f |
Path to binary file to analyze | - |
--json |
- | Input JSON configuration file | - |
--cfg |
-c |
Path to config file | ./rift_config.cfg |
--log |
-l |
Log file path | None |
--verbose |
-v |
Enable verbose logging | False |
--output |
-o |
Output folder for signatures | ./Output |
--only-meta |
- | Print metadata only (file mode) | False |
Run rift_cli.py directly on a binary and extract metadata or generate FLIRT signatures on demand:
python rift_cli.py -f sample.exe --only-metaAnalyze a binary and generate FLIRT signatures:
python rift_cli.py -f sample.exe -o ./outputInput a JSON configuration and generate FLIRT signatures as configured in JSON:
python rift_cli.py --json config.json -o ./outputInput either a crate and a compiler or simply a compiler toolchain:
Generate FLIRT for a specific crate and compiler:
python rift_cli.py reqwest@0.11.0 1.75.0-x86_64-pc-windows-msvc -o ./outputGenerate FLIRT for a compiler toolchain only:
python rift_cli.py 1.75.0-x86_64-pc-windows-msvc -o ./outputRIFT includes a lightweight HTTP API server (rift_server.py) that accepts FLIRT generation jobs from remote clients (e.g. the IDA Pro plugin) and processes them asynchronously in the background.
python rift_server.py -o ./Output --cfg rift_config.cfg| Argument | Description | Default |
|---|---|---|
-o |
Output folder for generated signatures. When set, overrides any output_folder value sent by the client. |
./Output/ |
--cfg |
Path to rift_config.cfg |
./rift_config.cfg |
--log |
Log file path | None (stdout only) |
--verbose |
Enable DEBUG-level logging | False |
The server binds to the IP and port configured in rift_config.cfg under [RiftServer] (Ip and Port). Default is 127.0.0.1:5001.
| Method | Path | Description |
|---|---|---|
POST |
/flirt |
Submit a FLIRT generation job. Returns a job_id immediately. |
GET |
/job?id=<job_id> |
Get the status and result of a specific job. |
GET |
/jobs[?status=<status>] |
List all jobs, optionally filtered by status (pending, running, completed, failed). |
GET |
/health |
Health check β returns server status and worker state. |
{
"commithash": "a55dd71",
"arch": "x86_64",
"filetype": "PE",
"crates": [{"name": "reqwest", "version": "0.11.0"}],
"target_triple": "x86_64-pc-windows-msvc",
"output_folder": "/optional/client/path"
}Note:
output_folderin the request body is ignored when the server is started with-o.
{
"job_id": "abc123",
"status": "completed",
"result_files": ["/path/to/output/reqwest.sig"]
}The RIFT IDA Pro plugin allows FLIRT signatures to be generated and optionally applied directly from within an active reverse engineering session, without leaving IDA Pro.
- RIFT server running and reachable (see Server Mode)
- IDA Pro with Python support (IDA 7.x+)
rift_config.cfgconfigured with the correct server IP and port
Run the installer script, passing the path to your IDA Pro plugins folder:
installUpdateIdaPlugin.bat "%APPDATA%\Hex-Rays\IDA Pro\plugins"This copies the following layout into your plugins folder:
plugins/
βββ rift_plugin.py β IDA plugin entry point
βββ librift_ida/
β βββ rift_form.py β Plugin UI (PySide6)
β βββ rift_ida_core.py β Core logic (arch detection, server comms)
β βββ rift_controller.py β Background thread controller
βββ librift/ β Shared RIFT core library
βββ rift_essentials/
βββ rift_config.cfg β Server connection config
Edit rift_essentials/rift_config.cfg in the plugins folder and set the server address:
[RiftServer]
Ip = 127.0.0.1
Port = 5001- Open a Rust binary in IDA Pro.
- Go to Edit β Plugins β RIFT (or use the hotkey if configured).
- The plugin automatically extracts metadata from the binary (compiler version, crates, architecture, target triple).
- Click Configure to verify server connectivity.
- Click Apply to submit a job to the RIFT server and select a local folder where signatures will be stored.
- Generated
.sigfiles can be applied to the database via IDA's signature manager or theida_apply_flirt_from_folder.pyscript in thescripts/folder.
