[Tutorial] Simple Methods Anti Hacks

Experienced Elementalist
Joined
Aug 11, 2012
Messages
252
Reaction score
58
HIDE WINDOWS DETECT

Open your WinMain.cpp

Search to
​

PHP:
int win::ProcessSuspended()
{
  if(!bSuspended)
    return FALSE;

  MSG msg;
  while(PeekMessage(&msg, NULL,0,0,PM_NOREMOVE))
  {
    if(!GetMessage (&msg, NULL, 0, 0)) 
      return 1;

    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }

  return TRUE;
}

AND ADD LATER THIS ​

PHP:
void Hide_Scanner()
{
HWND hWnd;
hWnd = FindWindow(0,0);
if ( hWnd > 0 && GetParent(hWnd) == 0)
{	
	Sleep (5000);
	ExitProcess(0);
}
}


void Hide_Scan(){
	again:
    Hide_Scanner();
    Sleep(1000);
    goto again;
}

void DetectHide(){
	CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Hide_Scan),NULL,0,0);
	Hide_Scanner();
}


in Winmain.cpp Search to​
PHP:
game::PreInit();

and all later​

PHP:
void DetectHide();

like this ​

PHP:
static void startupFunc(DWORD in)
{
//  in = in;
  
  game::PreInit();  

DetectHide();

  win::Init();

  game::Init();

  game::MainLoop();

  game::Shutdown();
}


WINDOW NAME CHECK

Open your WinMain.cpp

Search to
​

PHP:
int win::ProcessSuspended()
{
  if(!bSuspended)
    return FALSE;

  MSG msg;
  while(PeekMessage(&msg, NULL,0,0,PM_NOREMOVE))
  {
    if(!GetMessage (&msg, NULL, 0, 0)) 
      return 1;

    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }

  return TRUE;
}

AND ADD LATER THIS ​


PHP:
bool TitleWindow(LPCSTR WindowTitle){
	HWND WinTitle = FindWindowA(NULL,WindowTitle);
	if( WinTitle > 0){
	Sleep(5000); 
	ExitProcess(0);	
}
}

void TitleCheckWindow(){
TitleWindow("Cheat Engine 5.0");
TitleWindow("Cheat Engine 5.1");
TitleWindow("Cheat Engine 5.1.1");
TitleWindow("Cheat Engine 5.2");
TitleWindow("Cheat Engine 5.3");
TitleWindow("Cheat Engine 5.4");
TitleWindow("Cheat Engine 5.5");
TitleWindow("Cheat Engine 5.6");
TitleWindow("Cheat Engine 5.6.1");
TitleWindow("Cheat Engine 6.0");
TitleWindow("Cheat Engine 6.1");
TitleWindow("Cheat Engine 6.2");
TitleWindow("Cheat Engine 6.3");
TitleWindow("Cheat Engine 6.4");
TitleWindow("Cheat Engine 6.5");
TitleWindow("Cheat Engine");

}

void Scaner(){
	again:
    TitleCheckWindow();
    Sleep(500);
    goto again;
}

void protegerscaner(){
	CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Scaner),NULL,0,0);
}


in Winmain.cpp Search to​
PHP:
game::PreInit();

and all later​

PHP:
TitleCheckWindow();
protegerscaner();

like this ​

PHP:
static void startupFunc(DWORD in)
{
//  in = in;
  
  game::PreInit();  
TitleCheckWindow();
protegerscaner();
DetectHide();

  win::Init();

  game::Init();

  game::MainLoop();

  game::Shutdown();
}

OBS: u can make it best , can u add + windows injectors , sandiex box etc etc
it go check the window name and close the game when detect a window name
for exemple

PHP:
TitleWindow("Sandiebox");

WINDOW CLASS DETECT​

Open your WinMain.cpp

Search to
[/CENTER]

PHP:
int win::ProcessSuspended()
{
  if(!bSuspended)
    return FALSE;

  MSG msg;
  while(PeekMessage(&msg, NULL,0,0,PM_NOREMOVE))
  {
    if(!GetMessage (&msg, NULL, 0, 0)) 
      return 1;

    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }

  return TRUE;
}

AND ADD LATER THIS ​


PHP:
void ClasseWindow(LPCSTR WindowClasse){
	HWND WinClasse = FindWindowExA(NULL,NULL,WindowClasse,NULL);
	if( WinClasse > 0)
	{
  	Sleep(5000); 
	ExitProcess(0);	 
	}
	}


void ClasseCheckWindow(){    
	//ClasseWindow("ConsoleWindowClass");   
	//ClasseWindow("ThunderRT6FormDC");   
	ClasseWindow("PROCEXPL");            
	ClasseWindow("ProcessHacker");      
	ClasseWindow("PhTreeNew");           
	ClasseWindow("SysListView32");       
	ClasseWindow("TformSettings");
	ClasseWindow("TWildProxyMain");
	ClasseWindow("TUserdefinedform");
	ClasseWindow("TformAddressChange");
	ClasseWindow("TMemoryBrowser");
	ClasseWindow("TFoundCodeDialog");
	}

void classescan(){
	again:
    ClasseCheckWindow();
    Sleep(30000);
    goto again;
}

void protegerclasse(){
	CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(classescan),NULL,0,0);
	ClasseCheckWindow();
}



in Winmain.cpp Search to​
PHP:
game::PreInit();

and all later​

PHP:
protegerclasse();
ClasseCheckWindow();

like this ​

PHP:
static void startupFunc(DWORD in)
{
//  in = in;
  
  game::PreInit();  
TitleCheckWindow();
protegerscaner();
protegerclasse();
ClasseCheckWindow();
DetectHide();

  win::Init();

  game::Init();

  game::MainLoop();

  game::Shutdown();
}

OBS: To add new hacks u can make the same of window name open the hack
get the class and add

Exemple
PHP:
ClasseWindow("Form1");



/////////////////////////////////////////////////////////////////////////////////////////////////////

HELPFULL PROGRAM =

This Program Show u Window name , Windown Class etc etc Just need Open the Program
And Open the Hack to take the names.


To fix a Warning Error Just give a right click on your Winmain.cpp and go to Property
Select C/C++.
On the General property page, modify the Warning Level to disable


Later i Post Injects Block Methods and Others i need sleep now :(:


CREDITS : Google, Visual Basic And doidloko :ott1:
 
Last edited:
very good question it closes the game and the program detected? or so the game closes when it detects the program?
is to boot a banner? To Start? game?


sorry for my english
 
Last edited:
i can't build this.
fix this, change
bool TitleWindow(LPCSTR WindowTitle){
HWND WinTitle = FindWindowA(NULL,WindowTitle);
if( WinTitle > 0){
Sleep(5000);
ExitProcess(0);
}
}

to

bool TitleWindow(LPCSTR WindowTitle){
HWND WinTitle = FindWindowA(NULL,WindowTitle);
if( WinTitle > 0){
Sleep(5000);
ExitProcess(0);
return false;
}
return true;
}
 
static void startupFunc(DWORD in)
{
// in = in;

game::PreInit();
TitleCheckWindow();
protegerscaner();
protegerclasse();
ClasseCheckWindow();
DetectHide();
VOID DetectHide();

win::Init();

game::Init();

game::MainLoop();

game::Shutdown();
}

it correct ?
 
static void startupFunc(DWORD in)
{
// in = in;

game::PreInit();
TitleCheckWindow();
protegerscaner();
protegerclasse();
ClasseCheckWindow();
DetectHide();
VOID DetectHide();

win::Init();

game::Init();

game::MainLoop();

game::Shutdown();
}

it correct ?

remove the "VOID" from DetectHide ();
 
Process dump scanning is base of any anti cheat soft.

can you use the codex anti-hack
for make your dll or put the code in your source

here is a tutorial



and anti hack source
 
Need Help!

winmain.cpp(601) : error C2220: warning treated as error - no 'object' file generated
winmain.cpp(601) : warning C4715: 'TitleWindow' : not all control paths return a value

How can I fix this?

EDIT: Nice work chinclubi and thank you doidloko for this awesome tutorial!

i can't build this.
fix this, change
bool TitleWindow(LPCSTR WindowTitle){
HWND WinTitle = FindWindowA(NULL,WindowTitle);
if( WinTitle > 0){
Sleep(5000);
ExitProcess(0);
}
}


to

bool TitleWindow(LPCSTR WindowTitle){
HWND WinTitle = FindWindowA(NULL,WindowTitle);
if( WinTitle > 0){
Sleep(5000);
ExitProcess(0);
return false;
}
return true;
}
 
Last edited:
All those methods suck so hard at detrcting cheats. Hook winapi, no intelligent hacker uses Cheat Engine to alterate memory anymore.
 
Back