Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz
You last visited: Today at 04:15

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Bypassing GameGuard Guide

Discussion on Bypassing GameGuard Guide within the Rappelz forum part of the MMORPGs category.

Closed Thread
 
Old   #1
 
elite*gold: 360
Join Date: Jan 2008
Posts: 1,127
Received Thanks: 522
Question Bypassing GameGuard Guide

Hey there!

The simple fact that you are willing to read this tutorial shows that you are at least interested in making your own hacks/bypasses.
I will walk you guys through the general idea behind the PostMessage bypass and its sourcecode.

Here is a list of tools that you will probably need (so look for a copy of these programs):

-Microsoft Visual C++ (any version will do, I myself use 6.0)
-Microsoft Visual Basic (just to save the hassle and to be able to setup a GUI real fast)
-OllyDbg with some plugins (IDA pro is more powerful, but also harder to use)
-A brain and the will to try things over and over again untill u get the hang of it

You have downloaded these tools, your IQ isn't lower than 70 and you have the will to learn and to try until you succeed!
So lets get started!

So, what does GameGuard do? Why can't I use certain functions?

To keep it simple: GameGuard basically intercepts some (almost every single one) of the functions that allows users to create macro tools/bots.
If youre familiar with "hacking" you have most likely heard of "hooking" functions (and a many times used technique, Microsoft's Detours).
This is often done when simple adjustments have to be made to a program of which the user has lost the sourcecode (or simply doesnt have the sourcecode) from. You overwrite the first 5 Op-codes of the function you want to intercept with a call to your own function.
This prevents the original function from being executed and executes your function instead! You can then check the params that were send to the original function, execute some other pieces of code if you like and then return to the function so you dont completely ruin the dataflow.
(As I have mentioned before, a good way to do this is by "detouring" a function.) Im unsure if GameGuard uses detours, though it appears to me that the hooking method they use is very similar to what I described.

So basically the first 5 bytes of the original function are not as they are supposed to be, and therefor you are dependant on what GameGuard allows you to do with this function.
In the case of PostMessage calling PostMessage will not cause the function to be executed as you intended it to be.


Well, Ive got a clue now how GG blocks these functions.. How to bypass it?

Bypassing a function thats hooked by GG isn't that hard.
Basically you let YOUR function handle the op-codes that were originally at the 1st 5 bytes of the program, then you will let the program jump to the function's offset + 5 bytes.
That way you JUMP OVER the bytes GG has overwritten to redirect the function to a GG function.
If you do that without executing the original op-codes you will most likely make the game crash because the registers will be all messed up.

Off to some code (Here is where Visual c++ jumps in):

Code:
#include <windows.h>

HINSTANCE hInst; 
DWORD DLLFunc; 
HWND hFlyff;
HWND hWnd;


__declspec(naked) BOOL WINAPI __stdcall myPostMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
   __asm
   {
      mov  edi, edi
      push ebp
      mov  ebp, esp
      jmp [DLLFunc]
   }
}
I will explain this code line by line. The first few lines are there to declare some variables and to import some standard windowsfunctions.

Code:
__declspec(naked) BOOL WINAPI __stdcall
This function needs to be able to manage its own stack, and doesn't necesarilly return a value.


Code:
myPostMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
The functionname and the parameters you will pass through it, these parameters must be identical to the ones of the function youre bypassing.
If you are unsure what parameters to pass to it look the original function up on MSDN.

Code:
                                                    __asm
   {
      mov  edi, edi
      push ebp
      mov  ebp, esp
      jmp [DLLFunc]
   }
Now it's getting tricky, this piece of code is written in assembly, thats just a small step above the "machine language", the 0's and 1's.
jmp [DLLFunc] means that the program should jump to a certain offset, that offset is equal to the functionroot + 5 bytes.

We declare it in DLLMain:
Code:
     BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReason*/)
{
    switch (dwReason)
    {
        
        case DLL_PROCESS_ATTACH:
        {
               if (DLLFunc == NULL) {
                hInst = LoadLibrary("user32.dll");
                DLLFunc = (DWORD)GetProcAddress(hInst, "PostMessageA") + 5; 
                }
               if (hFlyff == NULL) {
                hFlyff = ::FindWindow(NULL, "FLYFF");
                }
        }
        break;

        case DLL_THREAD_ATTACH:
            {
               if (DLLFunc == NULL) {
                hInst = LoadLibrary("user32.dll");
                DLLFunc = (DWORD)GetProcAddress(hInst, "PostMessageA") + 5; 
                }
               if (hFlyff == NULL) {
                hFlyff = ::FindWindow(NULL, "FLYFF");
                }
            }
        break;
        case DLL_THREAD_DETACH:
            {
                if (hInst != NULL) {
               // Un-Load DLL
               ::FreeLibrary(hInst);
               hInst = NULL;
            } 
            }
        break;
        case DLL_PROCESS_DETACH:
        {
                if (hInst != NULL) {
               // Un-Load DLL
               ::FreeLibrary(hInst);
               hInst = NULL;
            } 
        }
        break;
    }
    return TRUE;
}
Now this isnt too hard to understand, this piece of code calculates the offset of the PostMessage-function and adds 5 bytes to that offset so the offset DLLFunc helds will be the 1st byte past the 5 bytes that GG has overwritten upon initialisation of the DLL.
Using both DLL_PROCESS_ATTACH and DLL_PROCESS_DETACH allows you to either inject the dll, or to load the dll from within your own application.
Which way you choose depends on your own preferences.


So back to the assembly part:
Code:
                                                    __asm
   {
      mov  edi, edi
      push ebp
      mov  ebp, esp
      jmp [DLLFunc]
   }
I have already explained the jmp [DLLFunc] part.
Now here's how to understand what the other 3 instructions mean.
Open up OllyDbg.
Open user32.dll (located in the systemfolder of your windowsfolder)
Press Ctrl+N.
A list of function names will show up, scroll down till you find PostMessageA and double click it.
You will be taken to the functionroot.
Look at the first 3 lines: "OMG THATS THE EXACT SAME PIECE OF ASM AS THE ABOVE!"
True
So with the above piece of assembly code we manually execute the overwritten bytes.
If you have some knowledge on assembly you will see that Code:
mov edi, edi
push ebp
mov ebp, esp
is 5 Bytes long!

So we have successfully written a bypass for the PostMessageA-function now!
Gratz! You've done it!

Now only 1 more thing remains..
In order to make other programs able to use our functions we must export it.
There is an easy way to do this using Visual C++.
Add a .def file to the project.
The syntaxis to export a function is as follows:
Code:
     LIBRARY "<name of dll here>" 
EXPORTS
    <Name of Function here> 
In our case that's:
     Code:
     LIBRARY "BypassedPostMessage" 
EXPORTS
         myPostMessageA
Compiling this code will result in a dll which you can then use with scripting/programming tools like AutoIT and visual basic.


Yay! We have a Bypass now! How to use it??!!
Simple!
We import the function with visual basic!

Here is a small example:
Code:
Private Declare Function myPostMessageA Lib "BypassedPostmessage.dll" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Sub Command1_Click()
Dim hWndCMD As Long
    hWndCMD = FindWindow(vbNullString, "FLYFF")
    myPostMessageA hWndCMD, WM_KEYDOWN, vbKeyE, 0
End Sub
The first 2 Declarations are there to import the bypass we have just written and to import "FindWindowA", an that allows us to get the windowhandle of the game.

The other code sends the "E"-key to the game when you hit the commandbutton.
Easy isn't it?
With a simple combination of Timers, sending vbKey"x" where "x" is any key on the keyboard you can make autofeeders, autotalkers, . Just use your imagination!


So here are all the steps you have to take again, one by one:
-Find a function that you want to use, but that is blocked by gameguard.
-Open the dll that the original function is in with OllyDbg and look it up in the functionname list.
-Go to the function and copy the first 5 bytes of instructions.
-Paste these instructions in a piece of inline ASM.
-Make sure that GetProcAddress() returns the offset of the function you want to bypass.
-Rewrite the original function and make sure you pass the right parameters to it.
-Export the function
-Exploit the new function using Visual Basic, AutoIT, C++, delphi, whatever language you feel comfortable with.


I hope this tutorial shows enough so you guys can use it to bypass other functions.
Good luck hacking! Say thanks if you like.
D00MR4ZR is offline  
Thanks
38 Users
Old 02/16/2010, 18:54   #2
 
elite*gold: 0
Join Date: Nov 2008
Posts: 455
Received Thanks: 85
nice. ill try it out as soon as gameguard blocks 64 bit systems
schmuselord1 is offline  
Old 02/16/2010, 20:10   #3
 
Gertos's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 404
Received Thanks: 120
Is this still working ? Have you tried it ?
The original Post from JoostP (???) is many month old.
Gertos is offline  
Old 02/17/2010, 07:27   #4
 
elite*gold: 360
Join Date: Jan 2008
Posts: 1,127
Received Thanks: 522
Yes, it is confirmed to be working, yet some edits need to be done for Rappelz. I've posted it to attract attention of skilled coders here who can o something, and possibly share solution that will block gameguard.
D00MR4ZR is offline  
Thanks
1 User
Old 02/17/2010, 08:29   #5
 
elite*gold: 0
Join Date: Apr 2008
Posts: 70
Received Thanks: 24
That means, bot`s without the KernelHotkey could still be working on all System (not only on 64bit-Machines)?

Könnte es sein, dass der Rappelz- bzw. SFrame-Prozess in WinXP (32bit) dann auch einfach nur nicht angezeigt wird, weil GG die FindWindow-Funktion (oder so) manipuliert und man dann auch mit dem Bypassing den Prozess in WinXP (32bit) sichtbar machen könnte?
LoneGunman is offline  
Old 03/03/2010, 16:08   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 28
Received Thanks: 0
Quote:
Off to some code (Here is where Visual c++ jumps in):
I start Visual C++ 2008 Express Edition and what now?
where i must copy this code?
Dostrix is offline  
Old 03/08/2010, 07:23   #7
 
elite*gold: 360
Join Date: Jan 2008
Posts: 1,127
Received Thanks: 522
You must know something about it, not just copy
D00MR4ZR is offline  
Old 03/16/2010, 20:18   #8
 
elite*gold: 0
Join Date: Mar 2010
Posts: 49
Received Thanks: 2
hi man. i've prog rappelz bot, it's work now, but...
what's i can do whith /position and rabbits? (bot's lovushka)
my mail
1nick1988 is offline  
Old 03/16/2010, 23:58   #9
 
elite*gold: 0
Join Date: Mar 2010
Posts: 49
Received Thanks: 2
i have source of JT bot now but... don't understad how you get text by moon rabbits(bot trap) and so on((
1nick1988 is offline  
Old 03/21/2010, 06:52   #10
 
elite*gold: 0
Join Date: Jan 2010
Posts: 18
Received Thanks: 1
Excuse Me Mod, please help in making the GG Killer work for 9dragons, we had one before, but unfortunately, it was patched by 9Dragons..please help, sorry i'm not an IT guy XD
alvin.0314 is offline  
Old 03/23/2010, 12:36   #11
 
elite*gold: 0
Join Date: Mar 2010
Posts: 49
Received Thanks: 2
you'll have nervers for gg killer? don't kill it, just go around
1nick1988 is offline  
Old 03/25/2010, 11:23   #12
 
elite*gold: 360
Join Date: Jan 2008
Posts: 1,127
Received Thanks: 522
How sir?
D00MR4ZR is offline  
Old 03/29/2010, 22:02   #13
 
elite*gold: 0
Join Date: Jul 2008
Posts: 42
Received Thanks: 9
Nice post doom, very usefull, ill work on it to back to life old bots.
raedon is offline  
Old 04/04/2010, 16:31   #14
 
elite*gold: 0
Join Date: May 2009
Posts: 11
Received Thanks: 0
Thanks Doom.....

But can you (or someone else) translate it in german pls?
I don't understand everything.
celik39 is offline  
Old 04/08/2010, 17:13   #15
 
elite*gold: 0
Join Date: Jun 2008
Posts: 24
Received Thanks: 0
Yeah would be nice in german
N-kay is offline  
Closed Thread


Similar Threads Similar Threads
Bypassing Gameguard
08/19/2010 - Cabal Guides & Templates - 8 Replies
Here is the video tutorial: GameGuard Bypass for MEM edit
bypassing gameguard
08/24/2008 - Cabal Online - 6 Replies
English: I know now how to bypass gameguard cabal phil but a new prob arose.... i think it has some files that detect gg is not installed or downgraded cuz when i logged in with cabal it always says "Disconnected" cuz of anti-hacking system can some1 help me to overcome this problem??.... rep soon enough pls some hackers out there that encounter this circumstance....:):):):):)
C6 Interlude Gameguard ByPassing ?
03/03/2008 - Lineage 2 - 6 Replies
hey how can i disable gameguard 966 (interlude / c6) please help me german: wie kann ich den gameguard ausschalten / löschen / umgehen wäre euch sehr dankbar
Gameguard Bypassing
08/06/2007 - Cabal Online - 22 Replies
Ok so uh, no gameguard bypasses work. I need one basically lol.. I cant find older versions of gameguard anywhere for cabal. So uhh... If someone can, make a thread with a full guide of a hack to do speed hack or something on cabal with a guide and post it here. And FYI i wont be using this hack for my own character, its for a friends to level him to 30 to get him to play with me xD.
Bypassing gameguard protection
02/04/2007 - Lineage 2 - 0 Replies
Hi all. After a few days trying, i managed to bypass the loader protection in my server. So now I can open l2.exe and I dont get the file size error problem. However, when I open l2.exe and l2walker (IG) is running, i cant barely type my username or password, nor hit the "enter" button. I think all I need to do is hide this process so gg or nwindow.dll doesnt find it. I already tried the GGC4rus bypass but its not working. Any help would be much appreciated.



All times are GMT +2. The time now is 04:15.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.