• Stars
    star
    127
  • Rank 272,818 (Top 6 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Global user-mode hooking framework, based on AppInit_DLLs. The goal is to allow you to rapidly develop hooks to inject in an arbitrary process.

AppInitHook

Global user-mode hooking framework, based on AppInit_DLLs. The goal is to allow you to rapidly develop hooks to inject in an arbitrary process.

Building & Usage

cmake -B build
cmake --build build --config Release

Alternatively you can open this folder in a CMake-supported IDE (Visual Studio, CLion, Qt Creator, etc).

The first time you use this framework you need to build and register AppInitDispatcher.dll in the AppInitDLLs registry key. You can do so by building the register_AppInitDLLs target. This will also create AppInitHook.ini in your build folder where you can customize which module gets loaded in which process:

[TestLoader.exe]
Module=ExitProcess.dll

Now if you run the TestLoader target you should see it exits immediately instead of showing a Hello world! message box.

Debugging

You can use DebugView with the filter [AppInitHook]* to see the dlog and dlogp messages, or you can break on DLL load of AppInitDispatcher.dll in x64dbg.

Developing modules

The AppInitExampleModule hooks SetCurrentDirectoryW:

#include "HookDll.hpp"

/* MSDN Signature:
BOOL SetCurrentDirectory(
	LPCTSTR lpPathName
);
*/
HOOK(kernelbase.dll, BOOL WINAPI, SetCurrentDirectoryW)(
	LPCWSTR lpPathName
)
{
	dlogp("'%S'", lpPathName);
	return original_SetCurrentDirectoryW(lpPathName);
}

BOOL WINAPI DllMain(
	_In_ HINSTANCE hinstDLL,
	_In_ DWORD     fdwReason,
	_In_ LPVOID    lpvReserved
)
{
	return HookDllMain(hinstDLL, fdwReason, lpvReserved);
}

For more examples you can check the Modules folder.

Private Modules

If you enable -DAPPINITHOOK_PRIVATE_MODULES=ON it will look for Private/cmake.toml where you can add your own modules:

[target.MyPrivateModule]
type = "shared"
sources = ["MyPrivateModule/*.cpp", "MyPrivateModule/*.hpp"]
link-libraries = ["HookDll"]

You can set up your own private git repository in this folder if you desire, since the folder is fully ignored by the .gitignore of this project.

Credits

More Repositories

1

TitanHide

Hiding kernel-driver for x86/x64.
C
1,694
star
2

dumpulator

An easy-to-use library for emulating memory dumps. Useful for malware analysis (config extraction, unpacking) and dynamic analysis in general (sandboxing).
Python
471
star
3

lolbin-poc

Small PoC of using a Microsoft signed executable as a lolbin.
C++
112
star
4

NtPhp

Ever wanted to execute PHP in your kernel driver? Look no further!
C
88
star
5

akt

Armadillo Key Tool
C++
78
star
6

JitMagic

Simple tool that allows you to have multiple Just-In-Time debuggers at once.
C#
67
star
7

haxxmap

Some simple go tools to perform a Man-in-the-middle (MITM) attack on your IMAP server in case you forgot your password.
Go
62
star
8

EfiCMake

CMake template for a basic EFI application/bootkit. This library is header-only, there is no EDK2 runtime!).
C++
59
star
9

driver_unpacking

Ghetto user mode emulation of Windows kernel drivers.
C
58
star
10

ArmaG3ddon

ArmaG3ddon by CondZero/ARTeam
C++
49
star
11

idapatch

IDA plugin to patch IDA Pro in memory.
C++
45
star
12

MiniDumpPlugin

Simple x64dbg plugin to save a full memory dump
CMake
41
star
13

perfect-dll-proxy

Perfect DLL Proxying using forwards with absolute paths.
Python
29
star
14

YaraGen

Plugin for x64dbg to generate Yara rules from function basic blocks.
C
27
star
15

REToolSync

Collaboration platform for reverse engineering tools.
C++
27
star
16

PatternFinder

Parallel signature matcher in C#
C#
26
star
17

zig-cross

Example of using as a CMake Toolchain for cross compiling.
CMake
25
star
18

CEAutoAttach

Tool to automatically make Cheat Engine attach to a process via the command line.
C++
25
star
19

Diff

Diff plugin for x64dbg
C
24
star
20

portable-executable-library

Automatically exported from code.google.com/p/portable-executable-library
C++
21
star
21

WorkraveQt

Modern reimplementation of Workrave in Qt. Optimized to look out for you where you don't.
C++
20
star
22

IATFaker

Small project to generate fake DLLs based on an executable's import table
C++
20
star
23

DotNetPluginCS

DotNetPluginCS based on:
C#
18
star
24

FunUtils

Just some fun utilities I wrote for productivity reasons.
C#
18
star
25

VMHunt_instracelog

Windows build files for the VMHunt Intel PIN Trace tool
17
star
26

CpConverter

Code Page Converter - Convert HTML/Text files to different encoding formats e.g. ANSI to UTF-8 or Unicode. Convert multiple files with 1 click. Works with all encodings.
C#
17
star
27

VMProtectTest

VMProtectTest
C++
16
star
28

WibuDebugHook

Injectable DLL that helps with debugging Wibu CodeMeter.
C
15
star
29

go-gitea-webhook

Simple webhook receiver implementation for Gitea/Gogs.
Go
15
star
30

regstep

Simple x64dbg plugin to show registers on every step.
C
13
star
31

DisableParallelLoader

Plugin for x64dbg to disable parallel loading of dependencies
CMake
13
star
32

AStyleHelper

Simple tool to perform AStyle formatting in a git repository.
C#
12
star
33

DarkSouls3.TextViewer

This tool helps you view all in-game text of Dark Souls 3.
C#
11
star
34

cxx-common-cmake

Experiment building lifting-bits dependencies with pure CMake
CMake
11
star
35

mrexodia.github.io

Personal blog
CSS
10
star
36

rosetta-multipass

Use Rosetta to run amd64 binaries on your M1 with Multipass.
Python
10
star
37

StackContains

Sample x64dbg plugin to scan the stack during tracing.
C
9
star
38

BoomPowGui

Simple C# GUI for BoomPow (banano miner).
C#
9
star
39

SN8F2288_gui

Interactive disassembler and emulator for the SN8F2288.
C++
9
star
40

NoFlashWindow

Disables FlashWindow and FlashWindowEx using AppInit_DLLs hook.
C++
9
star
41

Utf8Ini

Small C++ INI Parser.
C++
8
star
42

BreakpointUnresolved

Plugin for x64dbg to break on unresolved APIs.
C
8
star
43

imgui_cmkr

Experimental imgui app framework for rapid prototyping.
7
star
44

DrDecode

Simple plugin for x64dbg to decode debug registers
C
7
star
45

cloudflare-redirect

Simple CloudFlare Worker to implement a service similar to redirect.name, but with HTTPS support.
JavaScript
7
star
46

SimpleAutoItCrypter

Simple AutoIt crypter.
C++
7
star
47

gogitterirc

Gitter/IRC Sync bot written in Go
Go
7
star
48

YaraFlirt

Project to convert F.L.I.R.T. Signatures signatures to Yara Rules.
C#
6
star
49

Arxan

Some super old control flow exploration experiments
C
6
star
50

TracePlugin

Very simple trace plugin example for x64dbg.
C
6
star
51

pygame_qt

Combinding pygame and PyQt5 in python3
Python
6
star
52

GitIdentityManagerCpp

Very simple cross-platform utility to manage your git identities.
C++
5
star
53

svelte-cpp-whiskey-list

Example Svelte frontend with C++ backend
C++
5
star
54

LivecodingTwitch

Bot to synchronize Livecoding and Twitch chats.
C++
5
star
55

CMakeMASM

CMake
4
star
56

BrainfuckInterpreter

Simple brainfuck interpreter written for Quora.
C++
4
star
57

PasteFile

Plugin for x64dbg to paste a file in memory...
C
4
star
58

AsmParser

Loose parser for x86 assembly, used for translating them into IR.
C++
4
star
59

ClickCatcher

Example plugin for x64dbg to handle mouse click events.
C
4
star
60

unicorn_template

Project template for unicorn based on CPM.
CMake
4
star
61

IXWebSocket_template

Simple template for IXWebSocket (websocket and http client/server library for C++) based on CPM.
CMake
4
star
62

VTIL-Hello

Example CMake project for VTIL.
C++
4
star
63

CutterUpdater

Very simple utility to automatically check for, download and install the latest version of Cutter.
C#
4
star
64

XInputScanner

Tool for x360ce to scan which XInput DLL is used.
C#
4
star
65

BatchDecompiler

Script to batch-decompile things with IDA.
C#
4
star
66

SMMNEX

010 editor binary templates for SMM NEX
3
star
67

JNIEnv

Plugin to assist in reverse engineering programs that use JNI.
C
3
star
68

debuggerpyd

Random Script DLL for x64dbg
C
3
star
69

TimeStampFormat

Example plugin to print a timestamp in the log.
C
3
star
70

gotgslack

Telegram/Slack synchronization bot.
Go
3
star
71

GleeDbg

Experiments with imgui
C++
3
star
72

NativeExport

Very simple example of native exports with C# and C++
C#
3
star
73

vergiliusparser

Simple script to scrape https://www.vergiliusproject.com/
Python
3
star
74

ExtendDumpSel

Plugin for x64dbg to add a command that extends the dump selection
C
3
star
75

StaticEngine

Playground for statically loading files into x64dbg.
C
3
star
76

ModulePathList

A simple x64dbg plugin to list modules with their paths.
C
2
star
77

cgit-theme

A theme for cgit
CSS
2
star
78

ExpressionParser

Very simple expression parser for binary operations with operator precedence, unary minus/plus/NOT and parentheses.
C#
2
star
79

CMakePackageExample

CMake
2
star
80

fluffy-adventure

Some testing code with binary visualization
C++
2
star
81

reimagined-umbrella

2
star
82

SwigSample

SwigSample with C#
C#
2
star
83

miasm-old

Automatically exported from code.google.com/p/miasm
Python
2
star
84

yara_vs13

The pattern matching swiss knife (used by x64dbg).
C
2
star
85

QClickableMenu

Project to support the triggered signal of the QMenu::menuAction if you click on the QMenu.
C++
2
star
86

cryptopals

My solutions to the cryptopals crypto challenges.
Objective-C
2
star
87

RestartSpam

Simple plugin to spam restarts in x64dbg
CMake
2
star
88

VisualMutatorGUI

Simple GUI to visualize a results file from VisualMutator.
C#
2
star
89

pybind11_example

CMake
2
star
90

kraken

Go
2
star
91

knowledge-base

Knowledge base watching and scraping service.
TypeScript
2
star
92

angelscript-cpp-interface-generator

Automatically exported from code.google.com/p/angelscript-cpp-interface-generator
Python
2
star
93

SimpleIATParser

C++
1
star
94

DebugLoopRace

C
1
star
95

reversi

C#
1
star
96

mandelbrot

C#
1
star
97

RotMG.Common

Common utility library for RotMG by creepylava.
C#
1
star
98

python64

Hack to have both python and python64 in your PATH environment variable.
C++
1
star
99

OpenCVTest

A test CLion/CMake project for OpenCV 3 on OS X.
CMake
1
star
100

psychic-octo-fiesta

1
star