Header only wrapper around Hex-Rays API in C++20.

Overview

HexSuite

HexSuite is a header only wrapper around Hex-Rays API in C++20 designed to simplify the use of Hex-Rays and IDA APIs by modern C++ features. Some of the features it currently supports are as follows:

  • One-click linking to Hex-Rays API using Visual Studio.

  • Instruction wrappers and easy memory-management under hexsuite/architecture.hpp:

auto ci = hex::call_info(
	hex::pure_t{},
	tinfo_t{ BT_INT32 },
	hex::call_arg{ hex::reg( eax_arg, 4 ), tinfo_t{ BT_INT32 } },
	hex::call_arg{ hex::reg( ecx_arg, 4 ), tinfo_t{ BT_INT32 } }
);
auto call = hex::make_call( cg.insn.ea, hex::helper( extr ), std::move( ci ) );
auto mov =  hex::make_mov( cg.insn.ea, std::move( call ), hex::reg( reg, 4 ) );
  • Lambda visitors under hexsuite/visitors.hpp:
blk->for_all_insns( hex::minsn_visitor( [ & ] ( minsn_t* i )
{
	msg( "Instruction/Subinstruction: %s\n", hex::to_string( i ).c_str() );
} ) );
  • Lambda optimizers and microcode filters under hexsuite/components.hpp:
hex::microcode_filter filter = [ ] ( codegen_t& cg )
{
	if ( cg.insn.itype == NN_vmxoff )
		msg( "Found __vmxoff\n" );
	return false;
};
filter.install();
  • C++ range wrappers under hexsuite/ranges.hpp:
void list_types() {
	for ( const char* type_name : hex::named_types() )
		msg( "%s\n", type_name );
}
size_t count_instructions( mba_t* mba ) {
	size_t n = 0;
	for ( mblock_t* blk : hex::basic_blocks( mba ) )
	{
		msg( "Successors = %llu\n", hex::successors( blk ).size() );
		for ( minsn_t* ins : hex::instructions( blk ) )
			n++;
	}
	return n;
}
  • More stuff on the way!

Usage

If you're using Visual Studio:

  1. Add a new environment variable using SystemPropertiesAdvanced.exe like so IDA_PATH = S:\IDA Pro\.
  2. Unpack the SDK into %IDA_PATH%sdk.
  3. Add the HexSuite.vcxproj into your solution by using Solution > Add > Existing Project.
  4. Right click on the References tab of the dynamic library (which will be your plugin) and add a reference to HexSuite.
  5. Profit.

If you're not using Visual Studio, simply include the directory, however you will be responsible for linking against Hex-Rays API.

Note that in either case you need a STL library and a compiler fully supporting C++20.

License

HexSuite is licensed under BSD-3-Clause License.

Owner
Can Bölük
Security researcher and reverse engineer; mostly interested in Windows kernel development and low-level programming.
Can Bölük
Hex-Rays microcode plugin for automated simplification of Windows Kernel decompilation.

NtRays NtRays is a Hex-Rays microcode plugin for automated simplification of Windows Kernel decompilation. Features Cleanup of instrumentation and sch

Can Bölük 330 Jul 27, 2022
Interactive-hex-meshing - Source code for "Interactive All-Hex Meshing via Cuboid Decomposition [SIGGRAPH Asia 2021]".

Interactive All-Hex Meshing via Cuboid Decomposition Video demonstration This repository contains an interactive software to the PolyCube-based hex-me

Lingxiao Li 129 May 23, 2022
Plugin wrapper around VCV Rack

DISTRHO Cardinal Cardinal, the Rack! ! THIS PROJECT IS A WORK IN PROGRESS ! This is a DPF-based plugin wrapper around VCV Rack, using its code directl

DISTRHO 749 Aug 8, 2022
「⚙️」Simple header for C language to encode and decode hex

「 ⚙️ 」Simple header for C language to encode and decode hex Example: Encode: #include <stdio.h> #include <string.h> #include <stdlib.h> #include "hex.

null 2 Dec 30, 2021
A header-only version of Instagram Private API in C++

C++ Instagram API A header-only version of Instagram Private API in C++ Getting started. Writing your first bot General API Documentation Usage Error

Denis Beqiraj 35 Jun 4, 2022
Header-only VMWare Backdoor API Implementation & Effortless VMX Patcher for Custom Guest-to-Host RPCs

VmxHijack Header-only VMWare Backdoor API Implementation & Effortless VMX Patcher for Custom Guest-to-Host RPCs Sample // --- RPC Server Code (VmxHija

null 26 Feb 7, 2022
The purpose of this project is to create a modern C++17 header-only interface to the FreeRTOS kernel API

FreeRTOS-Cpp The purpose of this project is to create a modern C++17 header-only interface to the FreeRTOS kernel API. Goals of this project include:

Jon Enz 16 Jul 16, 2022
List of Persian Colors and hex colors for CSS, SCSS, PHP, JS, Python, and Ruby.

Persian Colors (Iranian colors) List of Persian Colors and hex colors for CSS, SCSS, PHP, C++, QML, JS, Python, Ruby and CSharp. Persian colors Name H

Max Base 11 Jul 20, 2022
A short and sweet hex dumper!

██████╗ ██████╗ ███╗ ███╗██████╗ ██╔═══██╗██╔══██╗████╗ ████║██╔══██╗ ██║ ██║██║ ██║██╔████╔██║██████╔╝ ██║▄▄ ██║██║ ██║██║╚██╔╝██║██╔═══

Victor Sarkisov 1 Nov 18, 2021
Dexe is a simple hex editor, written in Uxntal.

Dexe Dexe is a simple hex editor, written in Uxntal. Build You must have the Uxn assembler and emulator. uxnasm noodle.tal noodle.rom && uxnemu noodle

DeltaF1 3 Oct 15, 2021
🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.

?? ImHex A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM. Supporting If you like my work, plea

WerWolv 14.5k Jul 29, 2022
Edit a PF-DTA content in hex on a side-by-side display of EBCDIC character representation.

AS400 Hex Editor Edit a PF-DTA content in hex on a side-by-side display of EBCDIC character representation. Introduction This tool was written to edit

Project Vulcan 6 May 3, 2022
bviplusplus (bvi++) is an ncurses-based hex editor derived from bviplus

bviplusplus (bvi++) Overview bviplusplus (bvi++) is an ncurses-based hex editor derived from bviplus Links Other bviplus derivatives bviplus by Barano

Jeffrey H. Johnson 4 May 9, 2022
CSteamworks is a C ABI Wrapper for Valve's Steamworks API

CSteamworks Note: This project is deprecated as Valve now prodives a C ABI wrapper built into steam_api.dll. CSteamworks is a C ABI Wrapper for Valve'

Riley Labrecque 119 May 6, 2022
Direct3D wrapper for Sega's Kamui API

KAMUI Direct! Circa 1997 Sega was developing the KAMUI graphics API used for their newest console, the Dreamcast. There were no devkits yet, so the pr

null 6 Apr 20, 2022
C++ wrapper library for global weather API - hyperlocal weather forecasts

meteosource_cpp - Weather API library C++ wrapper library for Meteosource weather API that provides detailed hyperlocal weather forecasts for any loca

Meteosource 4 Jun 23, 2022
A Walkie-Talkie based around the ESP32 using UDP broadcast or ESP-NOW

Overview We've made a Walkie-Talkie using the ESP32. Explanatory video Audio data is transmitted over either UDP broadcast or ESP-NOW. So the Walkie-T

atomic14 219 Jul 21, 2022
around — adaptive rounding operation

around — adaptive rounding operation Attempts to perform nice rounding of a floating point number, like a human would do. Usage: around.h #include "ar

Jan Ringoš 2 Jan 24, 2022
Growtopia internal cheat focused around enhancements and framework, that is loaded automatically. By: ama6nen

CREDITS TO AMA6NEN ORIGINAL REPO: https://github.com/ama6nen/INZERNAL INZERNAL INZERNAL has been discontinued for public usage and a private version t

TheC0mpany 11 Jul 30, 2022