Codex anti-hack full source code (c++)

My Mxmain
Cogito Ergo Sum - Codex  anti-hack full source code (c++) - RaGEZONE Forums


Cogito your Video Mxmain
Cogito Ergo Sum - Codex  anti-hack full source code (c++) - RaGEZONE Forums


still not upload
My Mxmain
launcher user Login:
User name:
Computer name :
missing
 
Last edited:
It looks like get reg name function are not working, try disable this or others one by one to find that one are not working.

Maybe your computer don't have "Software\\Webzen\\Mu\\Config"; registry key and AH don't go ahed without this.

void Log_File_size(){
ifstream file( "Log", ios::binary | ios::ate);
// cout <<"Log File size: "<< file.tellg() <<endl;
// cout <<"carrega.Log_File_Size_To_upload : "<< carrega.Log_File_Size_To_upload <<endl;
if ( file.tellg() > carrega.Log_File_Size_To_upload){
file.close();
GetRegName(); << Try to change this to: Up_Nome_User_Log(); or Up_Nome_Pc_Log(); or IP_Log();
}
else
{
file.close();
}
}
 
Entire Hack_Log_Upload.cpp with necessary corrections, if key do not exist, go ahed without it.

:)

Code:
 // Video tutorial: http://www.youtube.com/user/vertexbrasil#include "StdAfx.h"


void FTP_Log_Br(){
	MessageBoxA(NULL,"Log FTP - Connection \n\n A conexão com o servidor falhou!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}
void FTP_Log_En(){
	MessageBoxA(NULL,"Log FTP - Connection \n\n Server connection fail!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}


void FTP_DC_Log(){
	 if (carrega.Log_Txt_Hack == 1){
ofstream out("GameGuard/Log.txt", ios::app);
out << "\n FTP Server connection fail!";
out.close();
}
	  if (carrega.Hack_Log_Upload == 1){
 time_t rawtime;
 struct tm * timeinfo;
 time (&rawtime);
 timeinfo = localtime (&rawtime);
     ofstream out("Log", ios::app);
	 out <<"\nLocal Time: ", out << asctime(timeinfo);
       out <<"FTP Server connection fail!";
	 out << "\n= = = = = = = = = = = = = = = = = = =";
	 out.close();
}
    if (carrega.Message_Warning_En == 1 || carrega.Message_Warning_En == 3){
    CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(FTP_Log_En),NULL,0,0);
	Sleep(5000); 
	ExitProcess(0);	
}
    if (carrega.Message_Warning_En == 2){
	CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(FTP_Log_Br),NULL,0,0);
	Sleep(5000); 
	ExitProcess(0);	
	}
	if (carrega.Message_Warning_En == 0){
	ExitProcess(0);
	}
	else
	ExitProcess(0);
}




void HTTP_Log_Br(){
	MessageBoxA(NULL,"Log HTTP - Connection \n\n A conexão com o servidor falhou!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}
void HTTP_Log_En(){
	MessageBoxA(NULL,"Log HTTP - Connection \n\n Server connection fail!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}


void HTTP_DC_Log(){
	 if (carrega.Log_Txt_Hack == 1){
ofstream out("GameGuard/Log.txt", ios::app);
out << "\n HTTP Server connection fail!";
out.close();
}
	  if (carrega.Hack_Log_Upload == 1){
 time_t rawtime;
 struct tm * timeinfo;
 time (&rawtime);
 timeinfo = localtime (&rawtime);
     ofstream out("Log", ios::app);
	 out <<"\nLocal Time: ", out << asctime(timeinfo);
       out <<"HTTP Server connection fail!";
	 out << "\n= = = = = = = = = = = = = = = = = = =";
	 out.close();
}
    if (carrega.Message_Warning_En == 1 || carrega.Message_Warning_En == 3){
    CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(HTTP_Log_En),NULL,0,0);
	Sleep(5000); 
	ExitProcess(0);	
}
    if (carrega.Message_Warning_En == 2){
	CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(HTTP_Log_Br),NULL,0,0);
	Sleep(5000); 
	ExitProcess(0);	
	}
	if (carrega.Message_Warning_En == 0){
	ExitProcess(0);
	}
	else
	ExitProcess(0);
}




//UPLOAD /////////////////////////////////////
void FTP_Upload_Log()
{   
	//////// PC USER NAME ///////
	char acUserName[100];
    DWORD nUserName = sizeof(acUserName);
	if (GetUserName(acUserName, &nUserName)){
	///////
	HINTERNET hInternet;
	HINTERNET hFtpSession;
	hInternet = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0);             
    hFtpSession = InternetConnect(hInternet, carrega.IP_Server_and_Hard, INTERNET_DEFAULT_FTP_PORT, carrega.FTP_User, carrega.FTP_Pass, INTERNET_SERVICE_FTP, 0, 0);
	if(FtpPutFile(hFtpSession, "List", acUserName, FTP_TRANSFER_TYPE_BINARY, 0)){
//cout << "FTP Upload Ok!" << endl;
	 InternetCloseHandle(hFtpSession);
     InternetCloseHandle(hInternet);
	 remove ("List");
	 remove ("Log"); 
}
  else
	{ 
	remove ("List");
	FTP_DC_Log();
	}
}
}




//CREATE BAN FILE /////////////////////////////////////
 void Mix_Log_file(){	
ifstream read1("Temp");
ifstream read2("Log");    
ofstream write("List");
    string line;
    string line2;    
    while ( getline ( read1, line, '\n' ) ){
    write << line << endl;
    }    
    while ( getline ( read2, line2, '\n' ) ){
    write << line2 << endl;
    }    
    read1.close();
    read2.close();    
    write.close();
	SetFileAttributes("List", FILE_ATTRIBUTE_HIDDEN); // Set file as a HIDDEN file
	remove ("Temp");
	FTP_Upload_Log();
	}
 


void IP_Log()
{
    HINTERNET hInternet, hFile;
    DWORD rSize;
    char buffer[47];
    hInternet = InternetOpen(NULL, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
     if (hFile = InternetOpenUrl(hInternet, "http://icanhazip.com/", NULL, 0, INTERNET_FLAG_RELOAD, 0)){
    InternetReadFile(hFile, &buffer, sizeof(buffer), &rSize);
    buffer[rSize] = '\0'; 
	 ofstream out("Temp", ios::app);
     out << "\nPublic IP:       ", out <<  buffer;
	 out << "\n* * * * * * * * * Hack Log  * * * * * * * * *\n\n";	
     out.close();	
     InternetCloseHandle(hFile);
cout << "User IP Address: " << buffer;	
	 Mix_Log_file();
	}
	else
	{
	HTTP_DC_Log();
	}
}










void Up_Nome_Pc_Log(){
//GET PC NAME /////////////////////////////////
TCHAR nameBuf[MAX_COMPUTERNAME_LENGTH + 2];
DWORD nameBufSize;
nameBufSize = sizeof nameBuf - 1;
if (GetComputerName(nameBuf, &nameBufSize)) 
{
cout << "Computer name: " << nameBuf << endl;
	ofstream out("Temp", ios::app);
    out << "\nComputer Name:     ", out <<  nameBuf;
	out.close();	
	IP_Log();
    }
    else
{	
	IP_Log();	  
}
}


//GET PC USER NAME  /////////////////////////////
void Up_Nome_User_Log()
{
char acUserName[20];
DWORD nUserName = sizeof(acUserName);
if (GetUserName(acUserName, &nUserName))
{
cout << "User name: " << acUserName << endl;
     ofstream out("Temp", ios::app);
     out << "\nComputer Username:   ", out<<acUserName;
     out.close();
	 Up_Nome_Pc_Log();
}
}




int GetRegName()
{
	HKEY hKey = 0;
	char buf[MAX_PATH];
	DWORD dwType = 0;
	DWORD dwBufSize = MAX_PATH;
	const char* subkey = "Software\\Webzen\\Mu\\Config";
	int result = RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Webzen\\Mu\\Config",0,KEY_QUERY_VALUE,&hKey);
	if (result > 0){
//cout << "Software\\Webzen\\Mu\\Config Key don't exist!"<<endl;
	Up_Nome_User_Log();
	}
	else
	{
	result = RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Webzen\\Mu\\Config",0,KEY_QUERY_VALUE,&hKey);
	if(result == ERROR_SUCCESS)
		{
		dwType = REG_SZ;
		result = 0;
		result = RegQueryValueEx(hKey,"ID",NULL, &dwType, (BYTE*)buf, &dwBufSize);
		if(result == ERROR_SUCCESS)
		{
//cout << "Launcher user Login: "<<buf<<endl;
	 ofstream out("Temp", ios::app);
     out << "\nLauncher defalt login: "<<buf;
     out.close();
	 SetFileAttributes("Temp", FILE_ATTRIBUTE_HIDDEN); // Set file as a HIDDEN file
	 Up_Nome_User_Log();
				//string keyVal = string(buf);
				int i = 0;
				do
					{
				//	cout << buf[i];
					i++;
					}	
				while(i<dwBufSize);
			}
		else
		{
//cout <<"User ID key don't exist!"<<endl;
		Up_Nome_User_Log();		
		}	
	}
	RegCloseKey(hKey);
	return 0;
}
}




void Log_File_size(){
	ifstream file( "Log", ios::binary | ios::ate);
	cout <<"Log File size: "<< file.tellg() <<endl;
	cout <<"carrega.Log_File_Size_To_upload  : "<< carrega.Log_File_Size_To_upload <<endl;
if ( file.tellg() > carrega.Log_File_Size_To_upload){
	file.close();	
	GetRegName();
	}
else
{
file.close();
}
}


void Hack_Log_Up(){
	CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Log_File_size),NULL,0,0);
}



API realy don't work for mu Main.exe... :glare:
 
Cogito Ergo Sum how about encryptio and decryption packets for GS to prevent packet send or wpe pro's who dc's players can u make also a dll to hook on it or application or what ^_^ nice work tho :) cool antihack
 
[Some cheats have an entrypoint like that: 7C812AFB. If i add this like 0x812AFB, dump detection doesnt work.]

Windows ASLR (Address Space Layout Randomization) don't allow access a correct aplication address. Google it, is a windows feature that works since windows Vista. codex dll uses it.

One simple solution are disable ASLR for all users computers. But i realy think thats not a good idea. Becouse we can't change entire computer enviroment just to make our codes works...



I am still working with v3, but i want to add hack log report via ftp. What i have to add/replace?

Is not so simple, becouse hack log had codes inside all cpp files. Wait some days, i think i will be able to make a new codex realease in a few days.



New anti-injection test:

START.cpp:
Code:
 case DLL_THREAD_ATTACH:
[B]Dll_API_Count();[/B]
case DLL_THREAD_DETACH:

Detecta_Inject_Count.cpp

Code:
// Video tutorial: [URL]http://www.youtube.com/user/vertexbrasil[/URL]
[URL="http://forum.ragezone.com/usertag.php?do=list&action=hash&hash=include"]#include[/URL]  "StdAfx.h"


void Msg_Ic_Br()
{
MessageBoxA(NULL,"IC-Scan\n\nA integridade do processo foi corrompida!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}
void Msg_Ic_En()
{
MessageBoxA(NULL,"IC-Scan\n\nFile integrity violated!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}


void Msg_Ic_Page(){
    Sleep (4000);
    ShellExecute(NULL, "open", carrega.HackSplash_WebSite, NULL, NULL, SW_SHOWNORMAL);
    }


void Injetacount(){
if (carrega.Log_Txt_Hack == 1){
ofstream out("GameGuard/Log.txt", ios::app);
out << "\n IC-Scan:  ", out << "Game closed!";
out.close();
}
 Sleep(100); 
    if (carrega.Message_Warning_En == 1){
    CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_Ic_En),NULL,0,0);
    Sleep(5000); 
    ExitProcess(0);    
}
    if (carrega.Message_Warning_En == 2){
    CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_Ic_Br),NULL,0,0);
    Sleep(5000); 
    ExitProcess(0);
}
    if (carrega.Message_Warning_En == 3){
    CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_Ic_Page),NULL,0,0);
    Sleep(5000); 
    ExitProcess(0);    
}
    if (carrega.Message_Warning_En == 0){
    ExitProcess(0);
    }
    else
    ExitProcess(0);
}


int API, API2 = 0;
void pla(){
Sleep (500);
API2++;
}


void Dll_API_Count(){
    API++;
    pla();
}


void Somar(){    
    Sleep (1000);
    again:
  if (API != API2){
    //cout <<API<<API2<<endl;
    Injetacount();
  }
  else
  {
    Sleep (200);
    goto again;
  }
}

void Injectct(){
        CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Somar),NULL,0,0);
}

Don't work for mu...
 
're well into the codex is to be congratulated, if I go back to the mu you would have to help me set everything kkk codex that was backwards from when I stop by, I am now very advanced kkk "I admire you so much"
 
Using just this anti hack plus checksum on 97d+99i version would be enough security?

I think Codex.dll is a best free anti-hack solution at this moment.

About checsum, this is better way to block main bypass.

Tomorow i will make a V4 release, wait this new version.
 
Back