- EhSvc.dll
the main Hackshield file, contains the HackShield class used by Engine.dll,
does the basic functions like loading/unloading its kernel mode driver, file integrity scanning,
memory integrity scanning. the checksum generated by the integrity scans are used to authenticate with the game-server
- v3warpns.v3d and v3warpds.v3d
contain each a kernel mode driver (.sys file) in encrypted from, one v3d contains a win9x driver the other a winNT driver.
once the driver has been loaded it will protect the ro process from being accessed (read/write) by every non-kernel mode programm
(example: taskmanager)
- v3pro32s.dll
i didn't look at it yet, but i suspect it to be the loader for the .sys driver files (.v3d files)
maybe not written by Hackshield creators
- EGRNAP.dll and EGRNAPX2.dll
ahhnlab "anti-virus" scanning libs, probably used to scann for programms like packet sniffers, memory editors etc
- Hshield.log
produced by EhSvc.dll, its encrypted with an evolving XOR key, i've reversed that algo, its included in my hackshield emu source & there's a ready to use decryption tool in SagaTools, however it doesn't contain much useful info (basically logs detections/checksum errors for gravity/hackshield to investigate)
- psapi.dll
a proccess helper library by Microsoft, nothing special
Defeating Hackshield
Disabling Hackshield is pretty easy and means basically hooking/patching the functions "StartServiceW" of the Hackshield class which is an export of EhSvc.dll.
Either its wrapper inside of Engine.dll, or directly in EhSvc.dll. Just do nothing and return - that's all.
However, after doing that MakeGUIDAckMsg() and MakeAckMsg(), both exports of EhSvc.dll will stop working and therefore we can't authenticate with the gameserver anymore.
To solve that issue one way would be to patch all "has hackshield been started" checks in side of those Make..Msg() functions,it will work fine, however it has one big downside. To understand it , we have to look at how these functions "generate" the authentication answers.
1.) MakeGUIDAckMsg()
In short this functions reads the GUID of EhSvc.dll (16 bytes) directly from that file on your harddisk, encrypts it and sends it to the server.
Okay, that shouldn't be a big deal, we just have to make sure that these 16 bytes remain intact and we are safe.
2.)MakeAckMsg()
This function is a bit more complicated, it does:
-generate a file checksum of RagII.exe
-generate a file checksum of EhSvc.dll and EGRNAP.dll
-generate a file checksum of v3warpns.v3d and v3warpds.v3d
-generate a proccess memory checksum of up to 32 function addresses in proccess-memory
It's important to know that the RagII.exe checksum is calculated "dynamicly" as i name it, that means:
the gameserver sends hackshield a start-offset and a size for a part of RagII.exe.
These values will be random, so the checksum will always be different.
The other checksums are static, so they will always be the same.
The memory checksum is the most annoying part of that authentication, that's because the function addresses are given by the server (they can be random), making it very powerfull.
As we don't know which memory locations might be requested, we can't be sure our modifications will be detected or not.
Back to topic : that's the downside i've talked of earlier: just forcing the auth-answers to be enabled will enable the game-server to detect any modifications to the checked files and any memory locations.
Of course we can redirect the file checks to backuped files in another location pretty easily, but the memory scans are very hard to fool (as RagII.exe,Engine.dll,etc are packed with TheMida file-data will NOT match memory-data on run-time)
To come by that issue, i've re-written both MakeGUIDAckMsg() and MakeAckMsg() , put them inside my hack and redirected all calls to the originals functions to my Make..Msg() functions.
At proccess startup, i take a snapshot of the important memory locations (RagII.exe, Engine.dll, etc). Now if the server requests MakeAckMsg() data, i use the snapshots instead of the current memory data. >> Hackshield is fully bypassed!
Remarks
- currently only the OEP of RagII.exe is checked by the memory check, this is pretty weak (its always the same check - same checksum returned)
- in future grav could use these memory checks to fights bots somehow,
HOWEVER:
-> bots that work together with the original client can be easily implemented without detailed knowlegde of hackshield
-> these challenges are only used once at connect, never during gameplay > weak
-> stand-alone bots are affected by this memory checks, however the only challenge is knowlede of the unpacked .exe/.dll data (and only if they'll start to make memory checks being random, which is not the case atm)
enum doHShieldCheckFlags {
doMemoryCheck = 1, // calculate checksums of function addresses given by the server
doIntegrityCheck1 = 2, // calculate checksum of RagII.exe
doIntegrityCheck2 = 4, // calculate checksum of Ehsvc.dll and EGRNAP.dll
doIntegrityCheck3 = 8, // calculate checksum of v3warpds.v3d and v3warpns.v3d
};
// hshield MakeGUIDAckMsg() and MakeGUIDAck() functions
//
// calculates the GUIDAck answer for given challenge input (20 bytes)
// output is 20 bytes
// reuturns 0 if successful
int MakeGUIDAckMsg(unsigned char *input, unsigned char *ack_answer);
// input: 160 bytes from server->client ack packet
// ack_answer: 72 bytes for the client->server packet
// returns 0 if succesful
int MakeAckMSG(unsigned char *input, unsigned char *ack_answer);
// input: the first 16 bytes from hshield server packet
// output: 16 bytes aes key
void calculate_hshield_aeskey(unsigned char* input, unsigned char* output)
// internal functions, not documented here
int GetCustumMD5OfFile(char *filename,DWORD offset, DWORD size, BYTE *output);
int GetMemoryCheckData(hshield_packet_ack_server *ackData,hshield_packet_ack_client *ackAnswer);
int GetIntegrityCheck1Data(hshield_packet_ack_server *ackData,hshield_packet_ack_client *ackAnswer);
int GetIntegrityCheck2Data(hshield_packet_ack_server *ackData,hshield_packet_ack_client *ackAnswer);
int GetIntegrityCheck3Data(hshield_packet_ack_server *ackData,hshield_packet_ack_client *ackAnswer);
// hshield.log de-/encryption functions
//
// format of a hshield.log file:
//
// struct hshield_log_file {
// hshield_log_entry entries[x];
// };
//
// struct hshield_log_entry {
// int log_size;
// unsigned char log_data[log_size];
// };
//
// output: pointer to the output buffer (must have same size as input buffer)
// input: pointer to the input buffer
// sizeInput: size of the input buffer (in bytes)
// key: key used for de-/encryption (RO2 default key is 1252)
int encrypt_logfile_data(unsigned char *output, unsigned char *input, int sizeInput,DWORD key = 1252);
int decrypt_logfile_data(unsigned char *output, unsigned char *input, int sizeInput,DWORD key = 1252);
Getting rid of HackShield is trivial, assuming the server does not validate any packets... such as is the case with Rappelez and ShotOnline , you can see this on my website ->
I have a simple walkthru I wrote for someone here (for ShotOnline) ->
This is more-or-less the following steps:
1. Unpack the game client .exe from whatever packer they are using.
2. Delete any HackShield related files from the game client folder, this includes: HShield.exe, Ehsvc.dll, the HShield sub directory, and any other .dll that if you mouse over it you see the words "AHNLabs".. you want to generate errors regarding the protection, the error messages are a really good clue as to where the routines you'll be patching are located.
3. Load the game client into OllyDbg, and run it - you will probably receive some kind of MessageBox error about HS... press F12, then alt F9 and click okay to the MessageBox -- now scroll up... you're looking for (usually) some kind of conditional jxx instruction that you'll patch to JMP... (set a bp and restart the game client from olly to test it.. ) some clients have a few and related error messages, or some have one big init routine that can be patched and the whole thing is skipped ; ) (i.e. Mabinogi)...
The best (and most simple) way of killing GG and HS to to never run them to start with. So this involves breaking on basic winapi (yes winapi - not the native api, or some kernel mode api, like some morons think =) functions like CreateProcessA (GameGuard) or LoadLibraryA (Ehsvc.dll for HS) and seeing that their processes or threads never get created.
I'll leave that up to you lol. Im 100% sure there are things needed to be changed in the codes its just to help guide the mabinogi epvpers community to reaching a bypass.
well I had most of it coded. actually had a beta, but I wanted to add a splash to ensure that mabi didn't get sneaky on me and ninja a clean one in. then clean some crash bugs I had in my coding (kinda sloppy)
because I got hit with a **** ton of other work. My website, my webhosting, my patcher, doing web design and graphic design for a friend of mine, writing a script for a YouTube series. a lot going on
I hear that a lot, but I've yet to actually hear one valid argument on the matter.
Probably because most of the people that try this use:
"I'M TOO BUSY TO MAKE -insert useful item here-! GIV URS???"
It really would be a compelling argument, if the people using it didn't somehow find time in their apparently ridiculous schedules to play a game, for several hours a day.
I'm thinking Tb might be bullshitting on the Emulator, but I did hear from a trusted source he(she?) is working on a patcher that may or may not go public.
[Hackshield]Bypass the new protection hackshield 01/25/2010 - Silkroad Online - 2 Replies Today i was so mad from agbot so i found the loader lite 3...
so i tried to connect with him to ibot (port : 16000) and failed cuz of the hackshield .... so i tried to rename the "hackshield" file dictory and it was full of success ... but i dont know .. should i get banned for it? (i bought silks)
if no ill post here the download and guide...
Thank's alot : Kobbi :)
[BYPASS][RELEASE] Server Emulation To Make All Hacks Work 100%! 07/31/2009 - Soldier Front Hacks, Bots, Cheats & Exploits - 140 Replies I'm going to show you how to make all your hacks work again, just by making server emulation using GameGuard files from Soldier Front Version T1.33.
(Credits: raziel36 GameGuard Files 10% credit
Hacker for making half the guide 75% credit
me completing some of the guide) 15% credit
First Download this:
Aprelium - Download Abyss Web Server X1
GameGuard Emulation/Bypass 12/04/2008 - Private Server - 1 Replies Anyone knows / has an idea how to make one?