Skip to content

danielplohmann/mcrit-plugin

Repository files navigation

MCRIT IDA Plugin

IDA Version Python License HCLI Compatible

Integration with MCRIT for MinHash-based code similarity analysis in IDA Pro.

MCRIT (MinHash-based Code Relationship & Investigation Toolkit) simplifies MinHash-based code similarity detection. This plugin seamlessly integrates MCRIT servers with IDA Pro for malware analysis and function identification.

✨ Features

  • Code Similarity - Compare functions/blocks against MCRIT.
  • Function Matching - Identify similar functions across binaries.
  • Label Management - Sync function labels with the server.
  • Interactive Widgets - Dedicated views for blocks, functions, and overview.
  • Integrated Settings - Native configuration via ida-settings.
  • HCLI Support - Easy installation and updates.

🚀 Installation

HCLI

The recommended way to install is using HCLI.

hcli plugin install mcrit-ida

This automatically handles dependencies (including smda and mcrit client) and configuration.

As a Script

When using HCLI is not an option, you can also simply check out the repository or grab a source bundle from the releases.
In this case, you need to ensure presence of the dependencies manually:

python -m pip install smda

and optionally

python -m pip install ida-settings>=3.3.0

If your installation of IDA Pro is situated in an offline Windows VM, there are dependency packages available to facilitate the setup (covering Python 3.10-3.13).
After unpacking the wheelhouse, navigate to the folder and install them using:

python -m pip install --no-index --find-links=. -r requirements.txt

⚙️ Configuration

Configuration is managed via ida-settings.

Setup

  1. GUI (Recommended): Install ida-settings-editor (hcli plugin install ida-settings-editor) and configure via Edit → Plugins → Plugin Settings Manager.
  2. Interactive: HCLI prompts for config values during installation.
  3. Manual: Edit $IDAUSR/ida-config.json, config.py or better, derive a config_override.json (discouraged)

Connecting to Server

Configure the plugin to connect to your MCRIT instance:

Setting Description Example
mcrit_server Server URL https://mcrit.example.com/api/
mcritweb_api_token API Token (for MCRITweb) eyJ0eXAi...
mcritweb_username Username (optional) analyst

Note: For MCRITweb, the username is inferred automatically by setting the API token.

📖 Usage

  1. Open Binary: Load a file in IDA Pro.
  2. Open Widgets: View → Open subviews → MCRIT widgets.
  3. Analyze: Right-click a function → MCRITQuery function.
  4. Matches: Review results in the Function Scope Widget.

🔧 Development

Project Structure

mcrit-plugin/
├── ida-plugin.json   # Plugin metadata
├── ida_mcrit.py      # Entry point
├── config.py         # Settings management
├── helpers/          # Utilities (incl. vendored pyperclip and pylev)
├── widgets/          # UI components
└── icons/            # Resources

Local Build & Install

To install a development version from source:

# 1. Clone
git clone https://github.com/danielplohmann/mcrit-plugins.git
cd mcrit-plugins

# 2. Package
zip -r ../mcrit-ida.zip .

# 3. Install
hcli plugin install ../mcrit-ida.zip

Version History

v1.1.4 (2026-01-30)

  • added Github action to build dependency packages to facilitate installation in offline environments.
  • Removed the mcrit package dependency by internalizing McritClient and required DTOs.
  • Restored plugin hotkey handler and added a close action to the graph context menu.
  • Improved resilience for missing or empty match data and guarded SMDA import paths.
  • Hardened UI flows around function labels and form handling.
  • Dev/CI: Added Ruff config + GitHub Action and reformatted the codebase.

v1.1.3 (2026-01-28)

  • Significantly improved usablity of FunctionOverviewWidget by being able to deconflict multiple candidate labels.

v1.1.2 (2026-01-19)

  • Optionally use SMDA as backend analysis engine (consistency towards MCRIT server), even when in IDA Pro.

v1.1.1 (2026-01-15)

  • Now coloring results in BlockMatch (by frequency) and FunctionMatch (by score) widgets
  • Can now display offsets of matched functions in FunctionMatchWidget

v1.1.0 (2025-12-30)

  • Full HCLI Plugin Manager support.
  • Migrated configuration to ida-settings.
  • Code quality improvements.
  • Strict HCLI compliance.

v1.0.0 (2025-12-22)

  • Initial standalone release.
  • IDA 9.2 (PySide6) compatibility.

📄 License

GPL-3.0. See LICENSE for details.

👤 Author

Daniel Plohmann (@danielplohmann)

About

A plugin to use MCRIT from IDA Pro

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages