Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

hrtng

> 编程语言
Open source

IDA Pro plugin with a rich set of features: decryption, deobfuscation, patching, lib code recognition and various pseudocode transformations

1.9K stars0 likes1 views
WebsiteGitHub

About

IDA Pro plugin with a rich set of features: decryption, deobfuscation, patching, lib code recognition and various pseudocode transformations

hrtng IDA plugin

hrtng IDA plugin is a collection of tools, ideas and experiments I've found interesting and useful in my reversing work.

Special thanks to following peoples for their great plugins were used as base for my work:

  • Hex-Rays SA ida-sdk examples
  • Milan Bohacek, hexrays_tools and hexrays_hlight
  • J.C. Roberts and Alexander Pick: IDB2PAT
  • HexRaysDeob by Rolf Rolles and Takahiro Haruyama
  • Karthik Selvaraj Krypton plugin
  • Ali Rahbar, Ali Pezeshk and Elias Bachaalany GraphSlick plugin
  • Markus Gaasedelen AVX support for the Hex-Rays x64 Decompiler

The plugin requires Hex-Rays decompiler presence in your IDA installation.
Only latest version of IDA is supported and evolves. However the plugin can be compiled with IDA SDK >= 7.3 New features and fixes added for the current IDA usually not well tested with old versions.

Features of the plugin:

There is no one place in menu where all functionality of the plugin grouped together. The plugin's menu items placed closer to logically related standard IDA & Hex-Rays decompiler functions. Messages, menu items, popup windows and dialog boxes belong to this plugin are marked with "[hrt]" prefix.

Automation

  • Automatic renaming local and global variables, struct members
  • Auto-comments
  • Enum substitution
  • COM helper

Interactive pseudocode transformation

  • User interactive renaming/retyping assistance
  • Assists with changing type of structure member or local/global variable
  • reinterpret_cast
  • Collapse selection
  • "offsetof" convertor
  • Invert "if" statement

Decryption

  • String/data/const decryption
  • Build stack string (optionally with decryption)
  • Build array string (optionally with decryption)
  • Mass strings decryption

Deal with obfuscated code

  • Decompile obfuscated code
  • Hidden variable assignments
  • Scan for API names hashes
  • Unflattening
  • Microcode optimizers / "Magic" calls

Code recognition

  • Microcode signatures
  • De-Inline - detection of inlined functions
  • Create patterns (PAT) file from IDA database

Type management assistance

  • Create dummy structs
  • Assist split gaps in structures
  • Union creation for a variable is reused with different types
  • List of structures with given size, with given offset
  • Assist in creation of new structure definitions
  • Find structures with same "shape" as is used / Create struct from derefs
  • New functionality in Structures view
  • IDC script for interactive merging types across multiple IDBs

Virtual/indirect calls assistance

  • Virtual calls assistance
  • Jump to indirect call destination
  • Fix stack pointer for indirect call

Function name and type

  • Smart rename func
  • Convert function to __usercall, detect spoiled registers
  • Import user named functions prototypes into the local type library
  • Set calling conventions bit closer to Go-lang
  • Remove function's return type converting it to void func(...)
  • Remove function's argument

IDA UI improvements

  • Extended xrefs
  • Matching brace highlight
  • Auto turn on 'Functions' window content synchronisation
  • Render markdown content of "IDA notepad" in a docked viewer

Misk features

  • Get API help
  • AVX lifter
  • Dump strings, comments and names from the IDA database
  • Offsets table creation
  • Print reversing progress percent on a proc renaming
  • Recursively decompile callees
  • Refactoring (global Find and Replace)
  • Deal with structures with negative offsets or access based on offsets in a middle of structure

Patching

  • Patch custom area with NOPs
  • Patch from debugger / Patch from file
  • Search & Patch
  • Create patched (DEC) file

IDA plugin developer help

  • Microcode Explorer
  • Ctree graph

Media

Reversing FinSpy

  • securelist - Our secret ingredient for reverse engineering (EN)
  • Хабр - Cекретный ингредиент для реверс-инжиниринга: как работает наш собственный опенсорс-плагин для IDA (RU)
  • Positive Hack Days Fest 2025 - Наш секретный ингредиент для реверс-инжиниринга (RU)
  • Off-By-One 2025 - Speed up your reverse engineering with the hrtng plugin (EN)

Analyzing PlugX

  • SSTIC 2025 - Analysez des logiciels malveillants plus rapidement avec hrtng (FR)

Building

  • Clone hrtng together with Crypto++® Library CMake submodule. Or put manually downloaded cryptopp-cmake source code to hrtng/src/cryptopp-cmake folder.
bash
git clone --depth=1 --recurse-submodules --shallow-submodules https://github.com/KasperskyLab/hrtng.git
  • For IDA-SDK older version 8.5: copy IDA_DIR/plugins/hexrays_sdk/include/hexrays.hpp file to the include directory of the IDA SDK.
  • Edit hrtng/src/CMakeLists.txt file to set correct path and version of used IDA SDK. To build later with another SDK version you may change cmake's IDASDK_VER variable with using cmake -D, ccmake or cmake-gui tools.
  • Create build directory, go into it, configure and build cmake project
bash
mkdir bld && cd bld
cmake <path-to/hrtng/src>
cmake --build . --config Release -j 4 --clean-first
  • For IDA-SDK older version 9.1: On the first build attempt there will be compiling error looks like:
hrtng/src/deob.cpp:912:60: error: ‘class rangeset_t’ has no member named ‘as_rangevec’
     fc.create("tmpfc2", ranges.as_rangevec(), 0);//!!! add line into range.hpp, class rangeset_t: "const rangevec_t &as_rangevec() const { return bag; }"
  • To fix the error, edit IDA_SDK/include/range.hpp file, adding line with as_rangevec function implementation into class rangeset_t declaration as in the following example:
class rangeset_t
{
  rangevec_t bag;
  ...
  public:
  const rangevec_t &as_rangevec() const { return bag; }
  ...
};
  • Copy built binaries into IDA_DIR/plugins folder together with apilist.txt and literal.txt files from hrtng/bin/plugins
  • Profit

License

This program is released under GPL v3 license

Author

  • Sergey.Belov at kaspersky.com

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++binary-analysisdecryptiondeobfuscationhexrays

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言