Codex anti-hack system - V4 (C++ Source code)

Guys, do you wanna codes to DISABLE windows ASLR (Address space layout randomization) on your clients computers?

This way, DUMP detector will be able to read address and detect this cheats that was created with ASLR anabled.

I don't think thats a good idea... Something like: [Use at your own risk!]



@Cogito Ergo Sum this antihack have anti suspend? cuz ive seen some comments that they say can easily bypass just suspend the antihack they said how to prevent this :)

On V4, Launcher protect main.

Test it: CODEX ANTIHACK V4\CONTENTS\Kill Me (For crack attempt)

How to configure that:

Codex - anti-hack system - Launcher Anti-kill protection (File Names) 1 / 3
https://www.youtube.com/watch?v=HJ8GdJ0PZaQ&list=UUa3JU6i4MjC3_DfQdLsg-lA
 
how to add Black Box hack protection?

Easy:

Detecta_Heuristica_Class.cpp
_tcsstr(y,"WindowsForms10") ||

Detecta_Heuristica_Win.cpp
_tcsstr(x,"Black Box") ||

Detecta_Heuristica.cpp
strstr(t,"[F?Ø???] [???]") || //Black box

But you can add detection for this on another detectors: heuristic nc, window, class, etc.

use

CODEX ANTIHACK V4\CONTENTS\Utilities\Handler portable ( ClassName detector )

GetWindowText or handler to get windows
 
Many people talk about Dump problems to detect some hacks, this occours becouse some hacks are build with Address space layout randomization (ASLR) active...


Description: Address space layout randomization (ASLR) is a memory-protection process for operating systems (OSes) that guards against buffer-overflow attacks by randomizing the location where system executables are loaded into memory.


So, i realy don't think that is necessary, becouse we have many detectors to to that. But, here are codes to disable ASLR on HKEY_LOCAL_MACHINE registry for client computers... This way, Dump will be able to read hack addres that was created with ASLR.


[ ATENTION! Use at your own risk! ]


For test purposes only:

Download: AutoPot (With ASLR active):



AutoPot Dump for Dump detector:
{0x40BD6E, {0xFF, 0x25, 0x00, 0x20, 0x40, 0x00, 0x00, 0x00}}, // #### Privado #### AutoPot #### With ASLR active


You can use Process explorer > image > to check if program have Address space layout randomization (ASLR) active!

You can use CODEX ANTIHACK V4\CONTENTS\Utilities\Dump generator.exe (Run as Adiministrator) to get dump codes for detector.

How to make some tests to be sure that works?

1 - Add Autopot dump lines on detectors, and try to detect it berore activate [carrega.Disable_Windows_ASLR]

2 - activate [carrega.Disable_Windows_ASLR] This only change registry when have admin privileges, so, it will ask permission (just for one time) to do that.

3 - [Atention!] Changes only became active after computer reestart.


Codes:


START.cpp
Code:
carrega.Detecta_Dump            = 0;  
//ADD THIS RED LINE BELOW:  
[COLOR=#ff0000]carrega.Disable_Windows_ASLR        = 1;     // On/Off = Disable windows ASLR for ALL computer users.   [ ATENTION! Use at your own risk! ] This feature allow dump to read hacks that was created with ASLR, description: Address space layout randomization (ASLR) is a memory-protection process for operating systems (OSes) that guards against buffer-overflow attacks by randomizing the location where system executables are loaded into memory.[/COLOR]
carrega.Token_Privileges        = 0;


and

Code:
//ADD THIS RED LINEs BELOW: 
 [COLOR=#ff0000]if(carrega.Disable_Windows_ASLR == 1)
{
DisableASLR();
} [/COLOR]

if(carrega.LA_Detecta_ByFileSize == 1)
{
ExeByFileSize();
}







Start.h
Code:
int DisableASLR();


Classe.h
Code:
int Disable_Windows_ASLR;


Dump.cpp (Add this code below all dump stuff)
Code:
//DISABLE WINDOWS ASLR FOR ALL USER COMPUTERS [Use at your own risk!]


void AskforUserPermission(){
    if (carrega.Message_Warning_En == 1){
    MessageBoxA(NULL,"Administrative privileges required!\n\nRight click on application: Run as administrator", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);    
    ExitProcess(0);    
    }    
    if (carrega.Message_Warning_En == 2){
    MessageBoxA(NULL,"Privilegios administrativos requeridos!\n\nClick direito do mouse no aplciativo: Executar como admintrator", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);    
    ExitProcess(0);    
    }
    else
    {
    MessageBoxA(NULL,"Administrative privileges required!\n\nRight click on application: Run as administrator", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);    
    ExitProcess(0);
}
}




#define WIN_32_LEAN_AND_MEAN
int writeToRegistry(void)
{    
    DWORD lRv;
    HKEY hKey;
    DWORD dwDisposition;
    lRv = RegCreateKeyEx(HKEY_LOCAL_MACHINE,"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition);
    DWORD dwValue = 0;
    RegSetValueEx(hKey,"MoveImages", 0, REG_DWORD, reinterpret_cast<BYTE *>(&dwValue), sizeof(dwValue));
    RegCloseKey(hKey);
    return(1);
}




//Check if running with admin privileges (withow it dll can't change HKEY_LOCAL_MACHINE registry)
BOOL IsElevated( ) {
    BOOL fRet = FALSE;
    HANDLE hToken = NULL;
    if( OpenProcessToken( GetCurrentProcess( ),TOKEN_QUERY,&hToken ) ) {
        TOKEN_ELEVATION Elevation;
        DWORD cbSize = sizeof( TOKEN_ELEVATION );
        if( GetTokenInformation( hToken, TokenElevation, &Elevation, sizeof( Elevation ), &cbSize ) ) {
            fRet = Elevation.TokenIsElevated;
        }
    }
    if( hToken )
    {    
    CloseHandle( hToken );
    }
    //cout<< fRet;
    if (fRet == 1){
                //cout <<"Are Admin!";
        writeToRegistry();
        return(1);
        //return fRet;
    }
    else
    {
                //cout <<"Ask Permission!";
    AskforUserPermission();
    return(1);
    //return fRet;    
}
}




int DisableASLR()
{
  HKEY hKey;
  //Check if the registry exists
  DWORD lRv = RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management", 0,KEY_READ, &hKey);
  if (lRv == ERROR_SUCCESS)
  {
    DWORD BufferSize = sizeof(DWORD);
    DWORD dwRet;
    DWORD cbData;
    DWORD cbVal = 0;
    dwRet = RegQueryValueEx(hKey, "MoveImages", NULL, NULL,(LPBYTE)&cbVal, &cbData);
    if( dwRet == ERROR_SUCCESS ){        
    //cout<<"\nDWORD value are: " << cbVal << endl;
    if (cbVal != 0)
    {
    IsElevated();
     return(1);
    }
    else
    {
  }
}
}
return(1);
}



cogito ergo sum maybe u can help me to block autobot ??? dunno some code or where to modify
thx and waiting for u reply

Read thread, are some exemples that how it works, is very simple to do.

For another things, watch video tutorials, there you will learn how to add hex dump on detector, add virtual memory protection for your files, make some memset for serial / version or another stuff.
 
Cagito plz seting end START.cpp
where to put one and where to place 0 please more
Even fail to set it up and stop Auto-BOT.exe
code {0x405B28, {0x45, 0xFC, 0x8B, 0x40, 0x08, 0x8B, 0xE5, 0x5D}}, //Auto-BOT
Inserts into Detecta_Dump have said ok where to work
 
Last edited:
Cagito plz seting end START.cpp
where to put one and where to place 0 please more
Even fail to set it up and stop Auto-BOT.exe

Watch this:


Basicaly, you need turn detector: On ( 1 ) in START.cpp and update detector database.

For exemple, activate Heuristic detector and update database inside [Detecta_Heuristica.cpp] with badwords you need to detect.

For exemple:

strstr(t,"BOT") ||

This will detect any window that have BOT word on name

You can use:

CODEX ANTIHACK V4\CONTENTS\Utilities\Handler portable ( ClassName detector ) Handler.exe to get windowname and windowclass for any hacks that you want to detect.
 
I did not work that tutorial does not understand why the Codex.dll hac hook in place in main.exe everything goes ok after detecta_huristica and arefac Place 1 to copy the dll in debug give it a customer come in and gives me error can not understand why I really do not know.........I leave that fail

If you want to see teamwiuer give you'm not crazy
 
You need to update your database ace17

For exemple:

heuristic detector search for this badwords, just remove that...

strstr(t,"FREEZE") ||
strstr(t,"Freeze") ||
strstr(t,"freeze") ||
 
I'm make some test this days, i was creating win32 aplication console, and i got this MSVCR100 error on my virutal machine Win xp (sp1)


Try to change:

Codex > properties > configuration properties > c / c++ > code generation > runtime library > multi-threaded debug (MTd) to multi-threaded (/MT)

Tell us if it solve your problem please. I have just on computer to make all this things and i don't how it works out of this enviroment.
 
Last edited:
Cogito please how can I find the name I see here is something else ClasseWindow ("ThunderRT6FormDC"); // find the autoclic Klic0r as it ThunderRT6FormDC
 
Last edited:
Cogito please how can I find the name I see here is something else ClasseWindow ("ThunderRT6FormDC"); // find the autoclic Klic0r as it ThunderRT6FormDC

Open hack that you wanto to detect, open handler 1.5 to get hack windowtext and classname.


Detectors that works with windowtext:
Detecta_window.cpp = detect hack entire name, as you can see on Handler windowtext (Are case sensitive)
This detector close game!


Close_Window .cpp = detect hack entire name, as you can see on Handler windowtext (Are case sensitive)
This detector close hack, if can't close hack, close game!


Detecta_Heuristica = detect window badwords, entire or pieces (Are case sensitive)
Detecta_Heuristica_NC = detect window badwords, entire or pieces (Are NON case sensitive)
This two, detect badwords on window name, message name, or button when mouse hover over it.


Detecta_Heuristica_Win = detect window badwords, entire or pieces (Are case sensitive)
All heuristic detectors close game.




Detectors that works with classname:
Detecta_ClassName.cpp = detect hack entire name, as you can see on Handler classname (Are case sensitive)
This detector close game!

Close_ClassName.cpp = detect hack entire name, as you can see on Handler classname (Are case sensitive)
This detector close hack, if can't close hack, close game!


Detecta_Heuristica_Class = detect className badwords, entire or pieces (Are case sensitive)
This detector close game!






zacHA, i don't understand what you mean.

But, check if this lines are active:

//(GetModuleHandle("FoxAnti.dll")) || // To tests
//(GetModuleHandle("Codex.dll")) || // To tests

Active i mean: with red collor, without this parallel lines >> // , this two code lines are just for detector test.

Wait V4 update, i will add an auto-updater for Codex.dll.



That works ace17? I think problem is 64 bits OS incompatibility.

Someone have Codex compatibility problems? like: MSVCR100.dll missing...
 
Back