All Projects → revsic → CodeInjection

revsic / CodeInjection

Licence: MIT license
Code Injection technique written in cpp language

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to CodeInjection

ZeusInjector
An Open Source Windows DLL Injector With All Known Techniques Available
Stars: ✭ 65 (+140.74%)
Mutual labels:  dll-injection, queueuserapc
Indicium-Supra
DirectX API-hooking framework
Stars: ✭ 292 (+981.48%)
Mutual labels:  dll-injection
Spore-ModAPI
A C++ library that allows you to create advanced mods for Spore (user interface, shaders,...)
Stars: ✭ 31 (+14.81%)
Mutual labels:  dll-injection
DLL-Injector
Inject and detour DLLs and program functions both managed and unmanaged in other programs, written (almost) purely in C#. [Not maintained].
Stars: ✭ 29 (+7.41%)
Mutual labels:  dll-injection
paradoxiaRAT
ParadoxiaRat : Native Windows Remote access Tool.
Stars: ✭ 583 (+2059.26%)
Mutual labels:  dll-injection
ReflectivePELoader
Reflective PE loader for DLL injection
Stars: ✭ 130 (+381.48%)
Mutual labels:  dll-injection
singlefile
featured cs:go internal hack, one file and less than 1000 lines.
Stars: ✭ 47 (+74.07%)
Mutual labels:  dll-injection
med
Linux alternative game memory editor
Stars: ✭ 46 (+70.37%)
Mutual labels:  memory-scanning
Osiris
Free open-source game cheat for Counter-Strike: Global Offensive, written in modern C++. GUI powered by Dear ImGui.
Stars: ✭ 1,851 (+6755.56%)
Mutual labels:  dll-injection
Invisiwind
An application that allows you to hide certain windows when sharing your full screen
Stars: ✭ 53 (+96.3%)
Mutual labels:  dll-injection
Dll-Injector
simple C++ dll injector
Stars: ✭ 22 (-18.52%)
Mutual labels:  dll-injection
MapleClientEditTemplate
An increasingly generic and comprehensive MapleStory client editing framework. Written by Erik A (Minimum Delta). Intended to abstract away some of the MapleStory client editing learning curve.
Stars: ✭ 3 (-88.89%)
Mutual labels:  dll-injection
SocketHook
Socket hook is an injector based on EasyHook (win only) which redirect the traffic to your local server.
Stars: ✭ 38 (+40.74%)
Mutual labels:  dll-injection
SnifferIH
DLL Hooking Packet Sniffer
Stars: ✭ 15 (-44.44%)
Mutual labels:  dll-injection
libmem
Advanced Game Hacking Library for C/C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External)
Stars: ✭ 336 (+1144.44%)
Mutual labels:  code-injection
Windows-DLL-Injector
Some DLL Injection techniques in C++ implemented for both x86 and x64 windows OS processes
Stars: ✭ 174 (+544.44%)
Mutual labels:  dll-injection
slimhook
Demonstration of dll injection. As well loading .net runtime and calling .net code. Example hijacking d3d9 dll and altering rendering of games.
Stars: ✭ 33 (+22.22%)
Mutual labels:  dll-injection
inject
Yet another Windows DLL injector.
Stars: ✭ 23 (-14.81%)
Mutual labels:  dll-injection
hooking-by-example
A series of increasingly complex programs demonstrating function hooking on 64 bit Windows. Culminating in a program that hooks mspaint to make it always paint orange.
Stars: ✭ 144 (+433.33%)
Mutual labels:  dll-injection
HAPIH-2
API for supporting C++14 external memory hacking. Complete redesign from HAPIH
Stars: ✭ 18 (-33.33%)
Mutual labels:  dll-injection

Code Injection

Inject code with certain technique written in cpp.

DLL Injection

Inject dll with CreateRemoteThread and LoadLibrary.

VirtualAllocEx(pi.hProcess, NULL, dwLength, MEM_COMMIT, PAGE_READWRITE);
WriteProcessMemory(pi.hProcess, lpLibName, DLL_NAME, dwLength, &written);

HANDLE hThread = CreateRemoteThread(pi.hProcess, NULL, NULL, pLoadLibraryW, lpLibName, NULL, NULL);
WaitForSingleObject(hThread, INFINITE);

Memory Scanning

Scan certain instructions and overwrite it.

ScanMemory inspects executable area, finds pattern and store the address to std::vector.

std::vector<LPVOID> list;
BYTE pattern[] = { 0x48, 0x63, 0x4D, 0xC8, 0x89, 0x08, 0x49, 0x63, 0x47, 0x50 }; //target opcode
ScanMemory(hProcess, pattern, sizeof(pattern), list);

BYTE code[] = { 0xC7, 0x00, 0x04, 0x00, 0x00, 0x00 }; // patch opcode
WriteProcessMemory(hProcess, list.back(), code, sizeof(code), NULL);

Queue User APC

QueueUserAPC adds user-mode Asynchronous Procedure Call (APC).

Many anti-debugging agents watch CreateRemoteThread. In order to bypass this scenario, we can use APC to inject dll.

for (auto dwTid : tids) {
	HANDLE hThread = OpenThread(THREAD_SET_CONTEXT, FALSE, dwTid);
	if (hThread) {
		QueueUserAPC(pLoadLibrary, hThread, (ULONG_PTR)lpAddress);
		CloseHandle(hThread);
	}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].