[Question / Request] Source / Whats Better.

05/08/2013 15:43 Mikail2244#1
My Question
What is the best way to make an Last Chaos Hack?
Visual Basic or C++, i think C++ is but dont know sure.


CheatEngine or Ollydbg?
Coding with addresses and offsets is with cheat engine, but on Ollydbg u only need the address, so wich one should be better to create an hack.

Request
Does anyone have a simple source code in C++ or Visual Basic that he/she want to share to help "new" people? Just a little start how to put the address and offset in the coding script. And to let the program find Nksp.exe not window name.

Why am i asking this?
Because i wanna create my own hack application, i know it requires c++ skills or any other language but i was thinking really long about this and i MUST make one .
Thanks for all reply's
Greetings - Mikail2244
05/08/2013 21:06 dsfgd#2
Quote:
Originally Posted by Mikail2244 View Post
My Question
What is the best way to make an Last Chaos Hack?
Visual Basic or C++, i think C++ is but dont know sure.
If you want a simple trainer, use Visual Basic.
If you want an universal solution, which also works on latest official server, than u need to learn c / c++ / c++&cli or any other native language and make an injected dll.

Quote:
Originally Posted by Mikail2244 View Post
CheatEngine or Ollydbg?
Coding with addresses and offsets is with cheat engine, but on Ollydbg u only need the address, so wich one should be better to create an hack.
Use CheatEngine for offsets, ollydbg is usefull, but not really needed for making a trainer, but you may need it to debug your dll.

here a simple source (C++/CLI), i can't post interface.h, to much lines, you may get some errors, use google to fix them or find a C++/CLI tutorial.

main.cpp:
Code:
#include "main.h"
#include <process.h>
#include <Psapi.h> // you need to load Psapi.lib in the project settings

extern int UIMain(); // import UIMain from interface.cpp
extern int pEncrypt, pDecrypt; // import int addresses from hacks.h, hacks.h is a generic header, it contains no code, only values/offsets/names...

bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
	for(;*szMask;++szMask,++pData,++bMask)
		if(*szMask=='x' && *pData!=*bMask)  
			return 0;
	return (*szMask) == NULL;
}

DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
{
	for(DWORD i=0; i<dwLen; i++)
		if (bCompare((BYTE*)(dwAddress+i),bMask,szMask))  
			return (DWORD)(dwAddress+i);
	return 0;
}

void GetOffsets()
{
	MODULEINFO mbi;
	do { Sleep( 10 ); }while( !GetModuleInformation( GetCurrentProcess(), GetModuleHandle( "Engine.dll" ), &mbi, sizeof( mbi ) ));

	hModuleAddress = (DWORD)mbi.lpBaseOfDll;
	hModuleSize = mbi.SizeOfImage;
	
	//just an example how it works:
	pDecrypt  = FindPattern(hModuleAddress, hModuleSize, (PBYTE)"\x8B\x44\x24\x08\x81\xEC\x18\x01\x00\x00\x8B\xC8\x8B\xD0\x53\x55","xxxxxxxxxxxxxxxx");
	pEncrypt  = FindPattern(hModuleAddress, hModuleSize, (PBYTE)"\x8B\x44\x24\x08\x8B\x4C\x24\x04\x83\xEC\x24\x53\x55\x8B\x6C\x24","xxxxxxxxxxxxxxxx");
}

unsigned __stdcall Game(LPVOID lpParam)
{
	GetOffsets(); // <-- get offsets from pattern search
	UIMain(); // <-- start CLI (.NET) UI
	_endthread();
	return S_OK;
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
	switch(dwReason)
	{
		case DLL_PROCESS_ATTACH: // we only need attach
			if( IsStarted == FALSE) // we start only 1 thread
			{
				IsStarted = TRUE;
				_beginthread(&Game, 0x1000, hModule); // note: xtrap detects this, use another methode to do it...
			}
			break;
	}
	return TRUE;
}
main.h:
Code:
#ifndef MAIN_H
#define MAIN_H

#include <windows.h>

bool IsStarted = FALSE;

bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask);
DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask);
unsigned __stdcall Game(LPVOID lpParam);
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved);

#endif
hacks.h:
Code:
#ifndef HACKS_H
#define HACKS_H

#pragma region Variables

	int hModuleAddress, hModuleSize;
	int pEncrypt, pDecrypt;

#pragma endregion

#endif
interface.cpp:
Code:
#include "Interface.h" //<-- this is the form, add it and do your stuff there

using namespace OffsetScanner; //<-- this is the name of your .NET Form

int UIMain()
{
	Application::EnableVisualStyles();
	Application::SetCompatibleTextRenderingDefault(false);
	Application::Run(gcnew Interface());
	return 1;
}
05/08/2013 22:56 Luôô#3
an example for calling the adress?
05/08/2013 23:08 Mikail2244#4
Thanks very usefull!