Source Code Warface Internal Hack

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

FloppyWhale

Jr.Coder
Full Member
Nobleman
Jan 12, 2015
65
308
0
Hi guys! I've decided to release my hack for Warface since it's been laying around on my computer for quite some time now. One thing to note is that you'll get kicked for "Suspected cheating" and I've not found a way to bypass this. Also this is not close to finished. Anyhow, I hope y'all enjoy!

Main.cpp
C++:
#include "Important.h"

using namespace std;

bool noRec = false;

DWORD ayyLmao()
{
	cout << "Welcome use to FloppWhale's test Warface hack!" << endl;
	cout << "I hope you'll enjoy this!" << endl;
	cout << "****************************************************" << endl;
	cout << "Press F1 to toggle No Recoil." << endl;

	for (;; Sleep(500))
	{
		if (GetAsyncKeyState(VK_F1))
		{
			if (!noRec)
			{
				noRec = true;
				//MemoryWrite
			}
			else
			{
				noRec = false;
				//MemoryWrite
			}
		}
	}
}

BOOL WINAPI DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
{
	switch (reason)
	{
	case DLL_PROCESS_ATTACH:
		AllocConsole();
		AttachConsole(GetProcessId(GetCurrentProcess()));
		freopen("CONIN$", "r", stdin);
		freopen("CONOUT$", "w", stdout);
		freopen("CONOUT$", "w", stderr);
		hookVQ();
		MemoryWrite((void*)(0x00647836), (void *)(PBYTE)"\x90\x90\x90\x90\x90", 5);
		CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ayyLmao, 0, 0, 0);
	}
	return TRUE;
}
Important.h
C++:
#include <Windows.h>
#include <iostream>

#pragma comment(lib, "lib\\detours.lib")
#include "include\detours.h"

void MemoryWrite(void * Address, void * Patt, int Size)
{
	DWORD oldProtect;
	VirtualProtect(Address, Size, PAGE_EXECUTE_READWRITE, &oldProtect);
	memcpy(Address, Patt, Size);
	VirtualProtect(Address, Size, oldProtect, &oldProtect);
}

typedef SIZE_T(__stdcall * tVirtualQuery)(const void *, MEMORY_BASIC_INFORMATION *, SIZE_T);
tVirtualQuery oVirtualQuery;

SIZE_T __stdcall hVirtualQuery(const void * pAddress, MEMORY_BASIC_INFORMATION * pMemInfo, SIZE_T BufferSize)
{
	return 0;
}

void hookVQ()
{
	HMODULE hMod = GetModuleHandle(L"kernel32.dll");
	if (hMod)
	{
		oVirtualQuery = (tVirtualQuery)(DWORD)GetProcAddress(hMod, "VirtualQuery");
		DetourTransactionBegin();
		DetourUpdateThread(GetCurrentThread());
		DetourAttach(&(PVOID&)oVirtualQuery, hVirtualQuery);
		DetourTransactionCommit();
	}
}
Credits goto : Broihon for telling me how to use the console & explaining context, Rake for teaching me about hooking.

I'll take suggestions/ideas aswell! I'm always looking to improve my work! Please provide example if you can! Anyhow, I hope y'all enjoy this!
 
Last edited:

Nazalas

Coder
Dank Tier VIP
Dank Tier Donator
May 20, 2015
99
3,963
3
Its a simple improvement but since this is just a Toggle
C++:
if (!noRec)
{
    noRec = true;
    //MemoryWrite
}
else
{
    noRec = false;
    //MemoryWrite
}
You can just do
C++:
noRec = !noRec;
Great stuff btw. Thanks for sharing. Also, dont forget to FreeConsole(); when you are finished with it.
 

Liduen

Hacker
Dank Tier VIP
May 19, 2013
702
8,478
33
That VirtualQuery hook tho, don't you want to check the return adress before you kill the call? lol
Nice to see source code releases!
 

FloppyWhale

Jr.Coder
Full Member
Nobleman
Jan 12, 2015
65
308
0
Its a simple improvement but since this is just a Toggle
C++:
if (!noRec)
{
    noRec = true;
    //MemoryWrite
}
else
{
    noRec = false;
    //MemoryWrite
}
You can just do
C++:
noRec = !noRec;
Great stuff btw. Thanks for sharing. Also, dont forget to FreeConsole(); when you are finished with it.
Thanks, will keep that in mind!

That VirtualQuery hook tho, don't you want to check the return adress before you kill the call? lol
Nice to see source code releases!
I'm a noob, so I have no clue what you mean by checking the return address before killing the call. Anyhow, thanks!
 

Liduen

Hacker
Dank Tier VIP
May 19, 2013
702
8,478
33
Thanks, will keep that in mind!



I'm a noob, so I have no clue what you mean by checking the return address before killing the call. Anyhow, thanks!
Instead of returning 0 all the time check e.g. the stack for the return address where VirtualQuery got called from and only if the caller resides in warface.exe (or what ever the process is called) return 0.
There might be legit calls from other applications ;)
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,061
78,998
2,370
why u dont tell, how to make it ready for run
This is not a "download hacks" forum, this is a "learn how to hack" forum. He didn't release a .exe because he doesn't want to release it, he wants people to use and learn from his code. If you knew C++ and were familiar with basic hacking stuff from our tutorials, you would know how to include this in a visual studio project, compile a DLL and inject it. But again it's 2 years old and probably doesn't work anymore.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods