• 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
  • Results 1 to 4 of 4

    Thread: Overlay drawing

    1. #1
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      j3b's Avatar
      Join Date
      Dec 2012
      Posts
      67
      Thanks (-->)
      2
      Thanks (<--)
      2

      Overlay drawing

      Advertise on GuidedHacking
      Hello. Ive finnished my external cheat now ( ESP, Aimbot,Radar,CrossHair ). Problem is that my computer isnt the best, and its lagging abit in windowmode + with the overlay ( using DirectX )
      So i want to be able to draw in fullscreen mode and i was reading about DirectXhooking and Enginedrawing.
      It seems like Enginedrawing is detected, since you modify the game. So i was thinking about DirectXhooking? But i dont know if this is what im looking for?

      How do you draw in fullscreen mode?
      Is it detected? ( doing it for CSGO, using VAC )

      I dont want you to give me code or anything, just point me in the right direction

      Thanks!

    2. #2
      Hacker
      ^.^
       
      Eating
       
      NTvalk's Avatar
      Join Date
      Jul 2013
      Location
      Your RAM
      Posts
      512
      Thanks (-->)
      176
      Thanks (<--)
      146
      Yes you need to hook endscene (or a similar function), best way is to do it through the vtable:

      Whenever a class defines a virtual function (or method), most compilers add a hidden member variable to the class which points to a so called virtual method table (VMT or Vtable). This VMT is basically an array of pointers to (virtual) functions. At runtime these pointers will be set to point to the right function, because at compile time, it is not yet known if the base function is to be called or a derived one implemented by a class that inherits from the base class. The code below shows an example of a VMT hook, if you want to implement this in direct3d you need to create a new device, and use that to replace the original function in the original device.

      You need to get a pointer to the d3d device (can be done by reversing) and from there patch endscene at a certain index (42 out of my head).
      Example of a vtable hook (not directx):
      [PHP]class VirtualTable { // example class
      public:
      virtual void VirtualFunction01( void );
      };
      void VirtualTable::VirtualFunction01( void ) { // just a function as example
      cout << "VirtualFunction01 called" << endl;
      }
      // pointer to original function
      typedef void ( __thiscall* VirtualFunction01_t )( void* thisptr );
      VirtualFunction01_t g_org_VirtualFunction01;
      //our detour function
      void __fastcall hk_VirtualFunction01( void* thisptr, int edx ) {
      cout << "Custom function called" << endl;
      //call the original function
      g_org_VirtualFunction01(thisptr);
      }
      int _tmain(int argc, _TCHAR* argv[]) {
      VirtualTable* myTable = new VirtualTable();
      //get the pointer to the actual virtual method table from our pointer to our class instance
      void** base = *(void***)myTable;
      DWORD oldProtection;
      // protection
      VirtualProtect( &base[0], 4, PAGE_EXECUTE_READWRITE, &oldProtection );
      //save the original function
      g_org_VirtualFunction01 = (VirtualFunction01_t)base[0];
      //overwrite
      base[0] = &hk_VirtualFunction01;
      //restore page protection
      VirtualProtect( &base[0], 4, oldProtection, 0 );
      //call the virtual function (now hooked) from our class instance
      myTable->VirtualFunction01();
      return 0;
      }
      [/PHP]

    3. #3
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      j3b's Avatar
      Join Date
      Dec 2012
      Posts
      67
      Thanks (-->)
      2
      Thanks (<--)
      2
      Quote Originally Posted by NTvalk View Post
      Yes you need to hook endscene (or a similar function), best way is to do it through the vtable:

      Whenever a class defines a virtual function (or method), most compilers add a hidden member variable to the class which points to a so called virtual method table (VMT or Vtable). This VMT is basically an array of pointers to (virtual) functions. At runtime these pointers will be set to point to the right function, because at compile time, it is not yet known if the base function is to be called or a derived one implemented by a class that inherits from the base class. The code below shows an example of a VMT hook, if you want to implement this in direct3d you need to create a new device, and use that to replace the original function in the original device.

      You need to get a pointer to the d3d device (can be done by reversing) and from there patch endscene at a certain index (42 out of my head).
      Example of a vtable hook (not directx):
      [PHP]class VirtualTable { // example class
      public:
      virtual void VirtualFunction01( void );
      };
      void VirtualTable::VirtualFunction01( void ) { // just a function as example
      cout << "VirtualFunction01 called" << endl;
      }
      // pointer to original function
      typedef void ( __thiscall* VirtualFunction01_t )( void* thisptr );
      VirtualFunction01_t g_org_VirtualFunction01;
      //our detour function
      void __fastcall hk_VirtualFunction01( void* thisptr, int edx ) {
      cout << "Custom function called" << endl;
      //call the original function
      g_org_VirtualFunction01(thisptr);
      }
      int _tmain(int argc, _TCHAR* argv[]) {
      VirtualTable* myTable = new VirtualTable();
      //get the pointer to the actual virtual method table from our pointer to our class instance
      void** base = *(void***)myTable;
      DWORD oldProtection;
      // protection
      VirtualProtect( &base[0], 4, PAGE_EXECUTE_READWRITE, &oldProtection );
      //save the original function
      g_org_VirtualFunction01 = (VirtualFunction01_t)base[0];
      //overwrite
      base[0] = &hk_VirtualFunction01;
      //restore page protection
      VirtualProtect( &base[0], 4, oldProtection, 0 );
      //call the virtual function (now hooked) from our class instance
      myTable->VirtualFunction01();
      return 0;
      }
      [/PHP]

      Thanks alot, i will look more into it.
      By the way... does VAC detect hooking..?

    4. #4
      Hacker
      ^.^
       
      Eating
       
      NTvalk's Avatar
      Join Date
      Jul 2013
      Location
      Your RAM
      Posts
      512
      Thanks (-->)
      176
      Thanks (<--)
      146
      Advertise on GuidedHacking
      Quote Originally Posted by j3b View Post
      Thanks alot, i will look more into it.
      By the way... does VAC detect hooking..?
      Depends on what way you are hooking, vtable hooking is considered hard to detect.

    Similar Game Hacker Threads

    1. DirectX transparent overlay
      By Lukor in forum Direct-X, OpenGL
      Replies: 5
      Last Post: 03-27-2017, 12:18 PM
    2. [Help] Create DirectX Overlay
      By 4c1d in forum Direct-X, OpenGL
      Replies: 9
      Last Post: 10-19-2016, 04:41 PM
    3. [Source Code] DirectX 9 - Overlay
      By rN' in forum Direct-X, OpenGL
      Replies: 9
      Last Post: 01-27-2014, 11:57 PM
    4. [Help] Overlay Error!
      By konsowa in forum GH Tutorials Help
      Replies: 4
      Last Post: 08-16-2012, 06:53 PM
    5. C# Non Hooked External Overlay
      By Subtellite in forum C#
      Replies: 9
      Last Post: 06-30-2012, 01:59 AM

    Tags for this Thread