Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › CrossFire Hacks & Cheats › CrossFire Spammers, Injectors and Multi Tools › Simple Injector || Source

Simple Injector || Source

Posts 1–15 of 15 · Page 1 of 1
Biesi
Biesi
Simple Injector || Source


Since they don't really need a GUI. Just rename the Injector.exe to your dll's name (eg. hack.dll and hack.exe).

Requirements are C++ 2010 Redistributable Package (x86) or (x64)

Scans:
1 / 47
0 / 23

 
SOURCE
Code:
/* Filename: injector.cpp
 * Project: Injector
 * Author: Biesi
*/

#include <Windows.h>
#include <tlhelp32.h>
#include <fstream>
#include <stdio.h>

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
DWORD GetProcessIdByName(const char * ProcName);
bool Inject(DWORD pID, char* dllName);
void ApplicationRoutine();
void ErasePEHeader();
void SetDebugPrivileges();

int CALLBACK WinMain(_In_  HINSTANCE hInstance, _In_  HINSTANCE hPrevInstance, _In_  LPSTR lpCmdLine, _In_  int nCmdShow)
{
	CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ApplicationRoutine, 0, 0, 0);

	MSG msg;
	while (GetMessage(&msg, NULL, 0, 0))
	{
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}

	return (int) msg.wParam;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
        break;
    }

    return 0;
}

void ErasePEHeader()
{
	DWORD OldProtect = 0;
	char *pBaseAddr = (char*)GetModuleHandle(NULL);
	VirtualProtect(pBaseAddr, 4096, PAGE_READWRITE, &OldProtect);
	ZeroMemory(pBaseAddr, 4096);
}

void SetDebugPrivileges()
{
    void* tokenHandle;
    OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &tokenHandle);
    TOKEN_PRIVILEGES privilegeToken;
    LookupPrivilegeValue(0, SE_DEBUG_NAME, &privilegeToken.Privileges[0].Luid);
    privilegeToken.PrivilegeCount = 1;
    privilegeToken.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
    AdjustTokenPrivileges(tokenHandle, 0, &privilegeToken, sizeof(TOKEN_PRIVILEGES), 0, 0);
    CloseHandle(tokenHandle);
}

void ApplicationRoutine()
{
	ErasePEHeader();
	SetDebugPrivileges();
	char szAppPath[MAX_PATH] = "";
	GetModuleFileName(0, szAppPath, MAX_PATH);

	for(int i = 0; i < sizeof(szAppPath); i++)
	{
		if(szAppPath[i] == '.' && szAppPath[i + 1] == 'e' && szAppPath[i + 2] == 'x' && szAppPath[i + 3] == 'e')
		{
			szAppPath[i + 1] = 'd';
			szAppPath[i + 2] = 'l';
			szAppPath[i + 3] = 'l';
			break;
		}
	}

	if(std::ifstream(szAppPath))
	{
		MessageBox(HWND_DESKTOP, "Press OK and start crossfire", "Injector", MB_OK | MB_ICONINFORMATION);
		
		while(!GetProcessIdByName("crossfire.exe"))
			Sleep(250);

		DWORD pID = GetProcessIdByName("crossfire.exe");
		if(Inject(pID, szAppPath))
		{
			exit(EXIT_SUCCESS);
		} else {
			Sleep(500);
			Inject(pID, szAppPath);
			exit(EXIT_SUCCESS);	
		}
	} else {
		MessageBox(0, "Dll not found", "Injector", MB_OK | MB_ICONERROR);
		exit(EXIT_FAILURE);
	}
}


DWORD GetProcessIdByName(const char * ProcName)
{
	PROCESSENTRY32 pe;
	HANDLE thSnapShot;
	BOOL retval, ProcFound = false;

	thSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
	if(thSnapShot == INVALID_HANDLE_VALUE)
	{
		MessageBox(NULL, "Error: Unable to create toolhelp snapshot!", "Injector", MB_OK | MB_ICONERROR);
		return false;
	}

	pe.dwSize = sizeof(PROCESSENTRY32);

	retval = Process32First(thSnapShot, &pe);
	while(retval)
	{
		if(!strcmp(pe.szExeFile, ProcName))
		{
			return pe.th32ProcessID;
		}
		retval = Process32Next(thSnapShot, &pe);
	}
	return 0;
}

bool Inject(DWORD pID, char* dllName)
{
	char DLL_NAME[MAX_PATH] = {0};
	GetFullPathName(dllName, MAX_PATH,DLL_NAME, NULL);

	HANDLE Proc = 0;
	HMODULE hLib = 0;
	char buf[50] = {0};
	LPVOID RemoteString = NULL;
	LPVOID LoadLibAddy	= NULL;

	if(!pID)
		return false; 

	Proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID);
	if(!Proc)
	{
		return false;
	} 

	while(!LoadLibAddy)
	{
		LoadLibAddy = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA"); 
	}

	while(!RemoteString)
	{
		RemoteString = (LPVOID)VirtualAllocEx(Proc, NULL, strlen(DLL_NAME), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
	}

	WriteProcessMemory(Proc, (LPVOID)RemoteString, DLL_NAME, strlen(DLL_NAME), NULL); 

	CreateRemoteThread(Proc, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, NULL, NULL); 

	CloseHandle(Proc);
	return true;
}
Injector_mpgh.net.rar
#1 · 12y ago
Austin
[MPGH]Austin
approved .
#2 · 12y ago
Djkev999
Djkev999
Good Job Bro The InjecTor work wonderfull with the Hack thanks thanksss a loT @Biesi
#3 · 12y ago
ZI
zikox
Good job
#4 · 12y ago
TheProNoob
TheProNoob
Good Job
#5 · 12y ago
HE
headlesswerewolf
It says dll not fiound
#6 · 12y ago
I2espect
I2espect
Good Job
#7 · 12y ago
sabatbatu
sabatbatu
good job
#8 · 12y ago
tigerlep55
tigerlep55
so wait if the DLL is called biesi.dll does that mean i rename the injector to biesi.exe? cuz i did and it keeps saying dll not found
#9 · 12y ago
tigerlep55
tigerlep55
nvm got it 2 work
#10 · 12y ago
purssy
purssy
Your Dll. isn't found on this injector.
#11 · 12y ago
PR
proprinc
Nice man ... Really cool, keep it up
#12 · 12y ago
sobasoba13
sobasoba13
Damn man i was working on it !! xD
Good Job
#13 · 12y ago
tigerlep55
tigerlep55
i think this is detected either this or I2espect's DLL is cuz it froze at step 4
#14 · edited 12y ago · 12y ago
DN
dnj$nda94manbdw
[I]Cool this is preety nice man!
Quote Originally Posted by Biesi View Post


Since they don't really need a GUI. Just rename the Injector.exe to your dll's name (eg. hack.dll and hack.exe).

Requirements are C++ 2010 Redistributable Package (x86) or (x64)

Scans:
1 / 47
0 / 23

 
SOURCE
Code:
/* Filename: injector.cpp
 * Project: Injector
 * Author: Biesi
*/

#include <Windows.h>
#include <tlhelp32.h>
#include <fstream>
#include <stdio.h>

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
DWORD GetProcessIdByName(const char * ProcName);
bool Inject(DWORD pID, char* dllName);
void ApplicationRoutine();
void ErasePEHeader();
void SetDebugPrivileges();

int CALLBACK WinMain(_In_  HINSTANCE hInstance, _In_  HINSTANCE hPrevInstance, _In_  LPSTR lpCmdLine, _In_  int nCmdShow)
{
	CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ApplicationRoutine, 0, 0, 0);

	MSG msg;
	while (GetMessage(&msg, NULL, 0, 0))
	{
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}

	return (int) msg.wParam;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
        break;
    }

    return 0;
}

void ErasePEHeader()
{
	DWORD OldProtect = 0;
	char *pBaseAddr = (char*)GetModuleHandle(NULL);
	VirtualProtect(pBaseAddr, 4096, PAGE_READWRITE, &OldProtect);
	ZeroMemory(pBaseAddr, 4096);
}

void SetDebugPrivileges()
{
    void* tokenHandle;
    OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &tokenHandle);
    TOKEN_PRIVILEGES privilegeToken;
    LookupPrivilegeValue(0, SE_DEBUG_NAME, &privilegeToken.Privileges[0].Luid);
    privilegeToken.PrivilegeCount = 1;
    privilegeToken.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
    AdjustTokenPrivileges(tokenHandle, 0, &privilegeToken, sizeof(TOKEN_PRIVILEGES), 0, 0);
    CloseHandle(tokenHandle);
}

void ApplicationRoutine()
{
	ErasePEHeader();
	SetDebugPrivileges();
	char szAppPath[MAX_PATH] = "";
	GetModuleFileName(0, szAppPath, MAX_PATH);

	for(int i = 0; i < sizeof(szAppPath); i++)
	{
		if(szAppPath == '.' && szAppPath[i + 1] == 'e' && szAppPath[i + 2] == 'x' && szAppPath[i + 3] == 'e')
		{
			szAppPath[i + 1] = 'd';
			szAppPath[i + 2] = 'l';
			szAppPath[i + 3] = 'l';
			break;
		}
	}

	if(std::ifstream(szAppPath))
	{
		MessageBox(HWND_DESKTOP, "Press OK and start crossfire", "Injector", MB_OK | MB_ICONINFORMATION);
		
		while(!GetProcessIdByName("crossfire.exe"))
			Sleep(250);

		DWORD pID = GetProcessIdByName("crossfire.exe");
		if(Inject(pID, szAppPath))
		{
			exit(EXIT_SUCCESS);
		} else {
			Sleep(500);
			Inject(pID, szAppPath);
			exit(EXIT_SUCCESS);	
		}
	} else {
		MessageBox(0, "Dll not found", "Injector", MB_OK | MB_ICONERROR);
		exit(EXIT_FAILURE);
	}
}


DWORD GetProcessIdByName(const char * ProcName)
{
	PROCESSENTRY32 pe;
	HANDLE thSnapShot;
	BOOL retval, ProcFound = false;

	thSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
	if(thSnapShot == INVALID_HANDLE_VALUE)
	{
		MessageBox(NULL, "Error: Unable to create toolhelp snapshot!", "Injector", MB_OK | MB_ICONERROR);
		return false;
	}

	pe.dwSize = sizeof(PROCESSENTRY32);

	retval = Process32First(thSnapShot, &pe);
	while(retval)
	{
		if(!strcmp(pe.szExeFile, ProcName))
		{
			return pe.th32ProcessID;
		}
		retval = Process32Next(thSnapShot, &pe);
	}
	return 0;
}

bool Inject(DWORD pID, char* dllName)
{
	char DLL_NAME[MAX_PATH] = {0};
	GetFullPathName(dllName, MAX_PATH,DLL_NAME, NULL);

	HANDLE Proc = 0;
	HMODULE hLib = 0;
	char buf[50] = {0};
	LPVOID RemoteString = NULL;
	LPVOID LoadLibAddy	= NULL;

	if(!pID)
		return false; 

	Proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID);
	if(!Proc)
	{
		return false;
	} 

	while(!LoadLibAddy)
	{
		LoadLibAddy = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA"); 
	}

	while(!RemoteString)
	{
		RemoteString = (LPVOID)VirtualAllocEx(Proc, NULL, strlen(DLL_NAME), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
	}

	WriteProcessMemory(Proc, (LPVOID)RemoteString, DLL_NAME, strlen(DLL_NAME), NULL); 

	CreateRemoteThread(Proc, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, NULL, NULL); 

	CloseHandle(Proc);
	return true;
}
#15 · 12y ago
Posts 1–15 of 15 · Page 1 of 1

Post a Reply

Similar Threads

  • ~ DLL Injector Source Code ~By Silk[H4x] in Visual Basic Programming
    32Last post 16y ago
  • Injector source helpBy qsc in C++/C Programming
    7Last post 17y ago
  • Combat Arms Injector Source CodeBy Melikepie in Combat Arms Discussions
    6Last post 16y ago
  • Need new injector source (warrock)By weide43 in Visual Basic Programming
    2Last post 16y ago
  • INJECToR SOURCEBy martijno0o0 in Visual Basic Programming
    20Last post 16y ago

Tags for this Thread

None