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.
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.
- Pull up comments from disasm to pseudocode view
- Automatic renaming local and global variables, struct members
- Automatic enum substitution
- COM helper
- User interactive renaming/retyping assistance
- Assists with changing type of structure member or local/global variable
- Invert "if" statement
- reinterpret_cast
- Collapse selection
- "offsetof" convertor
- Strings/data/const decryption
- Build stack strings (optionally with decryption)
- Build array strings (optionally with decryption)
- Mass strings decryption
- Decompile obfuscated code
- Hidden variable assignments
- Scan for API names hashes
- Unflattening
- Microcode optimizers / "Magic" calls
- Microcode signatures
- De-Inline - detection of inlined functions
- Create patterns (PAT) file from IDA database
- 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
- Finds structures with same "shape" as is used
- Import user named functions prototypes into the local type library
New functionality in Structures view- IDC script for interactive merging types across multiple IDBs
- Smart rename func
- Convert function to __usercall, detect spoiled registers
Set calling conventions bit closer to Go-langRemove function's return type converting it to void func(...)Remove function's argument
- Extended xrefs
- Matching brace highlight
- Auto turn on 'Functions' window content synchronisation
- Render markdown content of "IDA notepad" in a docked viewer
- 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
- Patch custom area with NOPs
- Patch from debugger / Patch from file
- Search & Patch
- Create patched (DEC) file
- 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)
-
Clone the repository and initialise the
cryptopp-cmakesubmodule (the IDA SDK is no longer part of the tree):git clone https://github.com/KasperskyLab/hrtng.git cd hrtng git submodule update --init --recursive -
Obtain the IDA SDK (>= 7.3) and point the build system to it. You can either export environment variables before running CMake:
export IDASDK_DIR=/path/to/ida-sdk/src export IDASDK_VER=92 # optional, defaults to 92or pass the values directly to CMake:
cmake -DIDASDK_DIR=/path/to/ida-sdk/src -DIDASDK_VER=92 <other-args>If you use IDA < 9.0/8.5, copy
IDA_DIR/plugins/hexrays_sdk/include/hexrays.hppinto the SDKincludedirectory before building. -
Build the project via CMake (or simply run
./build.sh):mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release ../src cmake --build . --config Release --clean-first -
On the first build attempt with IDA SDK before version 9.1 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.hppfile, adding line withas_rangevecfunction implementation intoclass rangeset_tdeclaration 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/pluginsfolder together withapilist.txtandliteral.txtfiles fromhrtng/bin/plugins - Profit
This program is released under GPL v3 license
- Sergey.Belov at kaspersky.com