• 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 5 123 ... LastLast
    Results 1 to 10 of 50
    1. #1
      Administrator
      Hacked By Jesus
       
      Reversing
       
      [GH]Rake's Avatar
      Join Date
      Jan 2014
      Location
      USA
      Posts
      2,954
      Thanks (-->)
      637
      Thanks (<--)
      885

      C++ External Signature Scanning

      John Kittz
      Greeetings GuidedHacking fans! I had 2 people request a tutorial on external pattern scanning because Fleep's signature scan tutorial only covered internal hacks. You will notice that the code itself is not that much different from Fleep's signature scan tutorial.

      The feedback we've received for our new videos has been positive because they are more detailed than previously. For that reason this may be a bit boring for some people because I may go a bit overboard explaining every detail. But I wanted to take the opportunity to do that for my first few coding videos so I can give you a solid foundation and make sure you understand the underlying concepts behind basic game hacking.

      I share with you my tips and tricks and important things I have learned over the past 2 years.



      Important update!
      If the pattern contains \x00\ the strlen will stop prematurely because it's the null terminator
      In patternscan.cpp change
      unsigned int patternLength = strlen(pattern);
      to:
      unsigned int patternLength = strlen(mask);

      Also in the VirtualProtect call, change the protection mask to PAGE_EXECUTE_READWRITE


      Download full source code in the attachments.

      Here is a preview:

      //Internal Pattern Scan
      void * PatternScan(char* base, unsigned int size, char* pattern, char*mask)
      {
      unsigned int patternLength = strlen(mask);

      for (unsigned int i = 0; i < size - patternLength; i++)
      {
      bool found = true;
      for (unsigned int j = 0; j < patternLength; j++)
      {
      if (mask[j] != '?' && pattern[j] != *(base + i + j))
      {
      found = false;
      break;
      }

      }
      if (found)
      {
      return (void*)(base + i);
      }
      }
      return nullptr;
      }

      //External Wrapper
      void * PatternScanEx(HANDLE hProcess, uintptr_t begin, uintptr_t end, char* pattern, char* mask)
      {
      uintptr_t currentChunk = begin;
      SIZE_T bytesRead;

      while (currentChunk < end)
      {
      char buffer[4096];

      DWORD oldprotect;
      VirtualProtectEx(hProcess, (void*)currentChunk, sizeof(buffer), PAGE_EXECUTE_READWRITE, &oldprotect);
      ReadProcessMemory(hProcess, (void*)currentChunk, &buffer, sizeof(buffer), &bytesRead);
      VirtualProtectEx(hProcess, (void*)currentChunk, sizeof(buffer), oldprotect, NULL);

      if (bytesRead == 0)
      {
      return nullptr;
      }

      void* internalAddress = PatternScan((char*)&buffer, bytesRead, pattern, mask);

      if (internalAddress != nullptr)
      {
      //calculate from internal to external
      uintptr_t offsetFromBuffer = (uintptr_t)internalAddress - (uintptr_t)&buffer;
      return (void*)(currentChunk + offsetFromBuffer);
      }
      else
      {
      //advance to next chunk
      currentChunk = currentChunk + bytesRead;
      }
      }
      return nullptr;
      }
      Attached Files Attached Files

    2. Thanks PwndDepot, sdfsdfsdfsdf, leobuares thanked for this post
    3. #2
      Administrator
      Hacked By Jesus
       
      Reversing
       
      [GH]Rake's Avatar
      Join Date
      Jan 2014
      Location
      USA
      Posts
      2,954
      Thanks (-->)
      637
      Thanks (<--)
      885

      Re: C++ External Signature Scanning

      If anyone has any feedback on the code, please leave it here, I'm not an expert coder as you all know

    4. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      [Death]'s Avatar
      Join Date
      Jun 2013
      Posts
      2
      Thanks (-->)
      0
      Thanks (<--)
      0

      Re: C++ External Signature Scanning

      good tutorial, is it all 64bit compatible?

      Many thanks

    5. #4
      Administrator
      Hacked By Jesus
       
      Reversing
       
      [GH]Rake's Avatar
      Join Date
      Jan 2014
      Location
      USA
      Posts
      2,954
      Thanks (-->)
      637
      Thanks (<--)
      885

      Re: C++ External Signature Scanning

      Quote Originally Posted by [Death] View Post
      good tutorial, is it all 64bit compatible?

      Many thanks
      I am 99% sure, yes

    6. #5
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      [Death]'s Avatar
      Join Date
      Jun 2013
      Posts
      2
      Thanks (-->)
      0
      Thanks (<--)
      0

      Re: C++ External Signature Scanning

      seems to be returning the incorrect process id on win 10 x64 on hitman 2016, just doing a couple of tests, checked with spy++ but defo wrong, not much info around on x64, made a complete asm skele on x86 but not done much coding for 64

    7. #6
      I has a status
      I rage frequently
       
      Pawning
       
      PwndDepot's Avatar
      Join Date
      Nov 2014
      Location
      Colorado
      Posts
      164
      Thanks (-->)
      68
      Thanks (<--)
      29

      Re: C++ External Signature Scanning

      Incase anyone was looking for the sigmaker plugin for cheat engine:
      https://www.unknowncheats.me/forum/g...er-v1-0-a.html
      credits to SEGnosis

    8. Thanks [GH]Rake thanked for this post
    9. #7
      Administrator
      Hacked By Jesus
       
      Reversing
       
      [GH]Rake's Avatar
      Join Date
      Jan 2014
      Location
      USA
      Posts
      2,954
      Thanks (-->)
      637
      Thanks (<--)
      885

      Re: C++ External Signature Scanning

      Quote Originally Posted by [Death] View Post
      seems to be returning the incorrect process id on win 10 x64 on hitman 2016, just doing a couple of tests, checked with spy++ but defo wrong, not much info around on x64, made a complete asm skele on x86 but not done much coding for 64
      hmm I will check it out tonight

    10. #8
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Afro228's Avatar
      Join Date
      Nov 2015
      Posts
      2
      Thanks (-->)
      0
      Thanks (<--)
      0

      Re: C++ External Signature Scanning

      How scan from 0x0 to 0x7fffffffffffffff ? Help me please

    11. #9
      Administrator
      Hacked By Jesus
       
      Reversing
       
      [GH]Rake's Avatar
      Join Date
      Jan 2014
      Location
      USA
      Posts
      2,954
      Thanks (-->)
      637
      Thanks (<--)
      885

      Re: C++ External Signature Scanning

      Quote Originally Posted by Afro228 View Post
      How scan from 0x0 to 0x7fffffffffffffff ? Help me please
      the function takes arguments BEGIN and END, put 0x0 in begin and 0x7fffffffffffffff in end

    12. #10
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Afro228's Avatar
      Join Date
      Nov 2015
      Posts
      2
      Thanks (-->)
      0
      Thanks (<--)
      0

      Re: C++ External Signature Scanning

      CheatTheGame
      not working
      int main()
      {
      //Get Process ID by enumerating the processes using tlhelp32snapshot
      DWORD processID = GetProcID(L"ac_client.exe");
      //Get handle by OpenProcess
      HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, processID);

      //PatternScan
      void * healthDecAddress = PatternScanEx(hProcess, 0x0, 0x7fffffffffffffff, "\x29\x7b\x00\x8b\xc7", "xx?xx");
      //Nop the instructions
      //NopEx(hProcess, healthDecAddress, 5);
      cout<<healthDecAddress<<endl;
      system("pause");
      return 0;
      }

    Page 1 of 5 123 ... LastLast

    Similar Game Hacker Threads

    1. [Source Code] External Pattern Scanning
      By [GH]Rake in forum C/C++
      Replies: 7
      Last Post: 07-31-2016, 08:33 PM
    2. [VideoTutorial] C++ Signature Scan / Pattern Scanning Tutorial DIFFICULTY[3/10]
      By Fleep in forum GH Hack Video Tutorials
      Replies: 41
      Last Post: 06-14-2016, 09:25 PM
    3. [Help] Fleep's Signature Scanning Tutorial (C++)
      By WhiteHood in forum Hacking Help
      Replies: 2
      Last Post: 01-26-2016, 05:48 AM
    4. [Help] Signature scanning vs finding offset
      By PandoraBytes in forum Hacking Help
      Replies: 4
      Last Post: 11-03-2015, 05:37 PM
    5. [Help] Signature Scanning/Question
      By kn0cturnal in forum GH Tutorials Help
      Replies: 1
      Last Post: 05-12-2014, 12:04 AM