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

[no need 2 times use same code :)]

code are just an example, im working on, you need two times, becouse you have:

DAka
DAkb

DAkb protect DAka and Start Server ban ( if DAkb or DAka are kileed, server ban autentication stop to work, and you got a ban)

im consider antikill detector ready, all codes are ok, im just making more tests to be sure are all ok.

At this time im testing this time loop for hard ban:


Code:
void Up_Mac(){
    if (carrega.Anti_Kill_Scans == 0){
again2:
Up_Get_Mac();
Sleep (carrega.DHard_occours);
goto again2;
    }
    else
    {
    Up_Get_Mac(); // 1 time on start up
    int i = 0;
again:
    DHard();      //Antikill 
    Sleep (carrega.DHard_occours/650); // 600000 = 10 minutes, time divided by 650 = something like 923 miliseconds
    i++;
    //cout << "Hard Ban Loop! " << i << endl;
    if (i > 650){  
        Up_Get_Mac();
        i = 0;
    goto again;
    }
    else
    {
    goto again;
}
}
}



-Virtual memory block protection Added!

-I will add a simple anti-freeze (suspend process) code on antikill, it detects any speed modification or main.exe freeze / restart. But, if process thread are killed, it dont works at all... Im tinking in add an extra .exe file to protect antihack from kill process. One protect another from kill / freeze.

The problem is, MU server SQL [connectstat] are a piece of ****, it realy dont works on MU servers, we have no problems with any kind of kill or suspend process if it works...

Sometimes im thinking in add some IP Block on server from those who are note autenticated by anti-hack.

This are just some ideas for now...

For you all, sorry for my broken english, this are painfull for all of us...
 
Last edited:
just change the enc/dec protocol, to solved the problem with wpe ^^
And put very fast scan to solve problem with suspends proccess..

try it



How to change/insert new enc dec
explain to the people how please..
 
[Client 3 times hack attempt detected = IP Block.txt in Server side]

If all threads are dead, AH can't create a log, becouse AH are dead. For that, we need an extra .exe

[about DAka and DAkb why not use 1 case ?]

Becouse are two threads, one thread protect another.

Quis custodiet ipsos custodes? :)
 
Codex V4 ( for beta testers )

-Both Anti-kills (by thread and by Scans with console message on mxmain(fake).exe) turned ON, all detectors turned OFF, kill process allowed.

-Hack log file turned on

-Added virtual memory protection

Someone sugest this detectors, so, two Detectors added:

-Close_Window.cpp
-Close_ClassName.cpp

This guys kill "generic" hacks without close the game. This are good to kill "generic" speed hack created using VB. like: ["WindowsForms10.Window.8.app.0xxxxxx], for example. For more security, if detector cannot close hack, closes itself.

-Updated Dump detector, close game and hacks detected, 8 hex dump database, more easy to add new hacks, also, this one don't need to add hack amount on dump.h anymore. Token privileges added, that allow Dump detector scan memory on windows XP os. Before that, detector don't work on that os.

And another little changes, like speed changes and anti-freeze advises...

Im start to working on a thread protection based on an extra exe file, If someone stops, main closes.

Download link and tutorials:
 
Do something server sided about packets..
Make a server sided exe that doesn't allow server to receive any packet from programs like WPE or any packet sender..
or make a packet encryption from your dll and decryption from server sided exe..
Also make your DLL codex to send on server a message for example ping, if server receive that then your dll is active, if server doesnt receive that ping then it means your dll is blocked/terminated/suspended and then will disconnect them.
what do you think?
 
[Do something server sided about packets.]

I will try to understand how it works, but thats a MU server serious problem, if webzen can't solve that...


[if server doesnt receive that ping then it means your dll is blocked/terminated/suspended and then will disconnect them.

what do you think?]

Thats a good idea, in realy Ban Server make this. Player are banned on SQL database (ctrl code 1) when dll don't reset ban sec. Problem is: Muserver connectstat and disconnect don't work... If player disconnet (exit game) and connectstat stay =1 (player connected), Ban Server block player on sql...

About disconnect player, SQL server don't disconnect player. And SQL IP block don't works for this... If you find a way to disconnect / block IP or anything else like an temporary, i can add that on AH.
 
use EXEC stored procedures, WZ_DISCONNECT_MEMB, WZ_CONNECT_MEMBER
for memb_stat problems, maybe you can add an timer ban for 30min, timer (Server Side Protection) after 30min use unban also is good idea
 
[Do something server sided about packets.]

I will try to understand how it works, but thats a MU server serious problem, if webzen can't solve that...


[if server doesnt receive that ping then it means your dll is blocked/terminated/suspended and then will disconnect them.

what do you think?]

Thats a good idea, in realy Ban Server make this. Player are banned on SQL database (ctrl code 1) when dll don't reset ban sec. Problem is: Muserver connectstat and disconnect don't work... If player disconnet (exit game) and connectstat stay =1 (player connected), Ban Server block player on sql...

About disconnect player, SQL server don't disconnect player. And SQL IP block don't works for this... If you find a way to disconnect / block IP or anything else like an temporary, i can add that on AH.

if you want i can give you some WPE code packets(mu gameservers packets) that you have to block..for example a DC code packet that causes DC to the players when you send this packet..if you can do something like the servers ip will block always these packets..

btw clear your inbox..or send me your skype.
 
Last edited:
Sorry for my stupid question - I`m new to customizing mu servers and clients. So, is it possible to hook this anti-cheat to, for example, main.exe of rmst server build season 4 ep 1?
 
Added: A new anti dll Injection by API protection.

Working on an extra .exe protectiton for dll, i decide for another antihack dll that will be hooked on Mu Launcher, that way we don't need extra files. Both files, Launcher and Main will work together.
 
Last edited:
Almost there!

I'm realy excited with results. :)

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

   //last defense instance! If all most have failed:

void Game_Over_Mesage(){
    HWND WinTitle = FindWindowA(NULL, carrega.Main_Window); 
    if( WinTitle != 0){ 
    //system("shutdown -r -t 10");  // If fail to close SUSPENDED main.exe, computer!  -r reestart -s shutdown -t 10 seconds
    cout <<"SHUTDOWN COMPUTER!"<<endl;
    }
    else
    {
    MessageBoxA(NULL,"Anti-Kill\n\nGame Over!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);    
}
}

void Game_Over(){
    CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Game_Over_Mesage),NULL,0,0);
    Sleep(5000); 
    ExitProcess(0);    
}

void Kill_Main(){
    Sleep (carrega.Time_to_read_Splash); 
    CNProtection();
    DwProtection();
    DetectID();    
}



What you waitng for?

Code:
// PROTECT MEMORY FROM ANOTHER PROCESS ( Get process BY FindWindow )
HANDLE GetProcessHandle(const char *procName);


int WindowMemory()
{  
  HWND handle = FindWindow(0 ,TEXT(carrega.MainWindowName));
    if(handle == 0) // If don't find main om memory, closes!
  {
     cout <<"Virtual_Memory will close main - [MainWindowName] not running!"<<endl;
     Kill_Main();  
  }
  else
  {
  DWORD ID;
  GetWindowThreadProcessId(handle,&ID);  
  HANDLE hProcess = OpenProcess( PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION , FALSE, ID);
    if(!hProcess)
  {
      Sleep (1);   
  }
    else 
    {
      int buffer;
              if (ReadProcessMemory(hProcess,(void *)0x74748CF6,&buffer,4,NULL)) //<<Adress
             {
             //cout<<buffer<<endl;    //Descoment to get buffer value   
             if (buffer != 1701473865){ //If don't find main om memory with this hex values on virtual memory in addres, closes!
             cout <<"Virtual_Memory will close main - [MainWindowName] buffer/Address don't match!"<<endl;
             Kill_Main();           
             } 


             // [ ATENTION! ] You can add how many adress conference you want. Just add that 
             /*
             if (ReadProcessMemory(hProcess,(void *)0x74748CF6,&buffer,4,NULL)) //<<Adress
             {
             //cout<<buffer<<endl;    //Descoment to get buffer value          
             if (buffer != 170147385){ //If don't find main om memory with this hex values on virtual memory in addres, closes!
             cout <<"Virtual_Memory will close main - [MainWindowName] buffer/Address don't match!"<<endl;
             Kill_Main();           
             }   
             */
      }
      CloseHandle(hProcess);      
  return (0);
  }
}
}


Code:
if (!GetModuleHandle(carrega.Nome_da_Dll)){
	cout <<"Name Scanner will close main - Dll name handle illegal!!"<<endl; 
Kill_Main();
 }
 
Code:
// Video tutorial: [URL]http://www.youtube.com/user/vertexbrasil[/URL]
#include "StdAfx.h"




//RECEBE DO MAIN (ANTIGO)
int Server(void)
{
cout << "SERVER" <<endl;    
   while (true)
{
    HANDLE pipe = CreateNamedPipe("\\\\.\\pipe\\LogPipe", PIPE_ACCESS_INBOUND | PIPE_ACCESS_OUTBOUND , PIPE_WAIT, 1, 1024, 1024, 120 * 1000, NULL);
    if (pipe == INVALID_HANDLE_VALUE)
    {
        cout << "pipe == INVALID_HANDLE_VALUE (OLD LAUNCHER)" << endl;         
    }
    char data[4];
    DWORD numRead;
    ConnectNamedPipe(pipe, NULL);
    ReadFile(pipe, data, 4, &numRead, NULL);
    if (numRead > 0)
cout << data << endl;
    CloseHandle(pipe);    
}
}
////////////////////////////////////////////////
//RECEBE DO LAUNCHER (NOVO)
int Cliente(void)
{
//cout << "CLIENTE" <<endl;
HANDLE pipes = CreateFile("\\\\.\\pipe\\Lope", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (pipes == INVALID_HANDLE_VALUE)
{       
Kill_Main();
//cout << "Cliente Launcher DC !" <<endl;
//ExitProcess(0); 
}
string message = "Hi";
//cout << message.length();
DWORD numWritten;
WriteFile(pipes, message.c_str(), message.length(), &numWritten, NULL); 
return 0;
}


void ServerThread(){
    CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Server),NULL,0,0);
    }




void Mxmain(){
    ServerThread();
    Sleep (2000);   //Margem segurança para inicio do Cliente
again:
    Cliente(); //(NOVO)
    Sleep(100);
    goto again;
}




void File_Protection(){
    CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Mxmain),NULL,0,0);
    }



kyplin

I'm from Brasil. ;)
 
Last edited:
Back