• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Page 1 of 3 123 LastLast
    Results 1 to 10 of 27
    1. #1
      Administrator
      Hacked By Jesus
       
      Reversing
       
      [GH]Rake's Avatar
      Join Date
      Jan 2014
      Location
      USA
      Posts
      2,879
      Thanks (-->)
      596
      Thanks (<--)
      869

      Post C++ Detour / Hooking Function Tutorial for Game Hacking

      Cheats-n-Trainers
      In this tutorial Solaire teaches you how to write a Detour function.



      Attached is the source code, the dummy process and the skeleton for the tutorial
      Attached Files Attached Files

    2. Thanks SinDr°me, Вroihon, Nytlenc, GAFO666, Lukor, easy2hack thanked for this post
    3. #2
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Nytlenc's Avatar
      Join Date
      Sep 2012
      Posts
      10
      Thanks (-->)
      4
      Thanks (<--)
      0
      Excellent! This is the best example of what I saw. Very good tutorial!

    4. #3
      Hacker
      Working, University, Coding ..
       
      Drinking
       
      GAFO666's Avatar
      Join Date
      Aug 2012
      Location
      if(PlayerBase << 16) return IdontKnow("yolo");
      Posts
      519
      Thanks (-->)
      33
      Thanks (<--)
      98
      Its nice, I just got one question about that way of hooking.

      The lib of detours has the following method:

      DetourFunktion(PBYTE pbTargetFunction PBYTE pbDetourFunction)


      Means they dont need a lenght, so isnt there a way of getting the lenght instead of entering it manualy to the hook function of Solaire ?

      Leave a rep+ if I helped you with my answer
      Dont tell me to google something, first thing I do before asking is searching on my own.

    5. #4
      Administrator
      Hacked By Jesus
       
      Reversing
       
      [GH]Rake's Avatar
      Join Date
      Jan 2014
      Location
      USA
      Posts
      2,879
      Thanks (-->)
      596
      Thanks (<--)
      869
      Quote Originally Posted by GAFO666 View Post
      Its nice, I just got one question about that way of hooking.

      The lib of detours has the following method:

      DetourFunktion(PBYTE pbTargetFunction PBYTE pbDetourFunction)


      Means they dont need a lenght, so isnt there a way of getting the lenght instead of entering it manualy to the hook function of Solaire ?
      Yeah it could read the first byte(the opcode or prefix) and using a lookup table check how many bytes that instruction and it's operands consume?

    6. #5
      edgy 5 y/o
      __fastcall is superior
       
      Trolling
       
      Вroihon's Avatar
      Join Date
      Jul 2015
      Location
      Gro▀deutsches Reich
      Posts
      571
      Thanks (-->)
      75
      Thanks (<--)
      190
      Quote Originally Posted by GAFO666 View Post
      Its nice, I just got one question about that way of hooking.

      The lib of detours has the following method:

      DetourFunktion(PBYTE pbTargetFunction PBYTE pbDetourFunction)


      Means they dont need a lenght, so isnt there a way of getting the lenght instead of entering it manualy to the hook function of Solaire ?
      You'd have to include a full asm interpreter to determine how many bytes need to copied/removed. That simply requires A LOT of code. It' simply easier to just count it manuelly.

    7. #6
      Hacker
      Working, University, Coding ..
       
      Drinking
       
      GAFO666's Avatar
      Join Date
      Aug 2012
      Location
      if(PlayerBase << 16) return IdontKnow("yolo");
      Posts
      519
      Thanks (-->)
      33
      Thanks (<--)
      98
      ooooh okey.

      Leave a rep+ if I helped you with my answer
      Dont tell me to google something, first thing I do before asking is searching on my own.

    8. #7
      Coder
      Pimp ? 420 : 666;
       
      Coding
       
      Kilo's Avatar
      Join Date
      Feb 2015
      Posts
      103
      Thanks (-->)
      15
      Thanks (<--)
      27
      Quote Originally Posted by Вroihon View Post
      You'd have to include a full asm interpreter to determine how many bytes need to copied/removed. That simply requires A LOT of code. It' simply easier to just count it manuelly.
      As programmers, we never take the easy route. Unless you're Fleep or Fleep v2.0, then copypasta for ease

    9. #8
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      SICGames88's Avatar
      Join Date
      Sep 2015
      Location
      Some weird planet - think I lost my stop
      Posts
      41
      Thanks (-->)
      0
      Thanks (<--)
      3

      Re: C++ Detour / Hooking Function Tutorial for Game Hacking

      will this detour help me jump over a bridge? A lot of tutorials were using Detours 3.0 and I was like, "NO I WILL NOT CONFORM!" very straight forward tutorial. I'll be chipping a tutorial soon - not sure when have a lot on my plate - non food related

    10. #9
      Newbie
      Marx debunked hacking... YEARS
      AGO!
       
      No Status
       
      _kappa's Avatar
      Join Date
      Jun 2016
      Posts
      26
      Thanks (-->)
      0
      Thanks (<--)
      8

      Re: C++ Detour / Hooking Function Tutorial for Game Hacking

      Here is a version I wrote. I think it will be useful to choose the opcode for the hook type yourself and get the return address automatically.

      Code:
      unsigned char memhook(unsigned short opcode, unsigned long dest, unsigned long src, unsigned long *status, unsigned char nop)
      {
      	unsigned char size, i;
      	unsigned long protect;
      
      	if (opcode > 0xff)
      		size = 6;
      	else
      		size = 5;
      
      	VirtualProtect(dest, size + nop, PAGE_EXECUTE_READWRITE, &protect);
      
      	__try
      	{
      		*(unsigned short*)dest = opcode;
      		*(unsigned long*)(dest + size - 4) = src - dest - size;
      
      		if (status)
      			*status = dest + size + nop;
      
      		for (i = 0; i < nop; i++)
      			*(unsigned char*)(dest + size + i) = 0x90;
      	}
      	__except (EXCEPTION_EXECUTE_HANDLER)
      	{
      		return 0;
      	}
      
      	VirtualProtect(dest, size + nop, protect, &protect);
      
      	return 1;
      }

    11. Thanks [GH]Rake thanked for this post
    12. #10
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      ZeRoXX's Avatar
      Join Date
      Aug 2016
      Posts
      4
      Thanks (-->)
      2
      Thanks (<--)
      1

      Re: C++ Detour / Hooking Function Tutorial for Game Hacking

      GuidedHacking Advertisements
      Hello and thank you for that tutorial!

      As I am still new to hooking I am trying to hook my own program. But I can't seem to make it work. Here is the code snipped I want to hook:

      Code:
      0131170E         837D 08 01       CMP DWORD PTR SS:[EBP+0x8],0x1
      01311712          75 0F                JNZ SHORT TestApp.01311723
      So I changed your program accordingly:
      Code:
      DWORD hookAddress = 0x131170E;
      int len = 6;
      Code:
      void __declspec(naked) ourFunct() {
      
      	__asm {
      		CMP dword ptr[ebp+8], 0
      		NOP   //I have to use NOP here because visual studio doesn't let me compile JNZ short 01311723 ? Any help here pls :(
      		jmp[jmpBackAddy]
      	}
      }
      Then I tried to inject it like you did with OllyDBG but nothing changed. What am I doing wrong here? Is it because of the nop?

      Thank you

      EDIT: It worked now, I didn't know I have to loop it so my program runs for ever >.< My bad!
      But I still wonder how I could make JNZ short in inline assembler work
      Last edited by ZeRoXX; 08-11-2016 at 11:34 AM.

    Page 1 of 3 123 LastLast

    Similar Game Hacker Threads

    1. [Tutorial] Reverse Engineer C++ Games Game Hacking Tutorial
      By [GH]Rake in forum Game Hacking Tutorials
      Replies: 12
      Last Post: 06-22-2016, 05:56 PM
    2. [Tutorial] Learn To Master The Basics Of Game Hacking With Cheat Engine Tutorial
      By ChrisFayte in forum Cheat The Game
      Replies: 6
      Last Post: 04-13-2016, 10:42 AM
    3. [VideoTutorial] Game Hacking with Reclass Tutorial
      By [GH]Rake in forum GH Hack Video Tutorials
      Replies: 9
      Last Post: 04-04-2016, 03:18 PM
    4. [VideoTutorial] C++ Mid Function Hooking Codecaving Tutorial DIFFICULTY [6/10]
      By Fleep in forum GH Hack Video Tutorials
      Replies: 53
      Last Post: 09-08-2015, 01:58 AM
    5. [Help] C++ Mid Function Hooking/Codecaving Tutorial
      By Brackston in forum GH Tutorials Help
      Replies: 12
      Last Post: 12-04-2013, 03:19 PM