OldSchoolHack

Registrieren / Anmelden Deutsch

Benutzersuche: vedel

Such-Informationen
vedel
Themen im Forum
Thema Forum Letzter Beitrag Beiträge Zugriffe
icon

Go to first new post [Source] 64bit Detour Methode Erstellt am: Mo 14. Mär 2016, 13:19

vedel

preview Vorschau

Go To Post

CPP Code:
  1. void *DetourFunction(BYTE *pSource, BYTE *pHook, int nLength)
  2. {
  3.    //                           mov   rax   address                                         jmp   rax
  4.    BYTE jmp_opcode[JMPSIZE] = { 0x48, 0xB8, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xFF, 0xE0 };
  5.  
  6.    //Allocate memory
  7.    BYTE *trampolin = new BYTE[nLength + JMPSIZE];
  8.  
  9.    //Replace Protection
  10.    DWORD dwOldProtection;
  11.    VirtualProtect(trampolin, nLength + JMPSIZE, PAGE_EXECUTE_READWRITE, &dwOldProtection);
  12.    VirtualProtect(pSource, nLength, PAGE_EXECUTE_READWRITE, &dwOldProtection);
  13.  
  14.    //Copy Original Code into trampolin
  15.    memcpy(trampolin, pSource, nLength);
  16.  
  17.    //Set jmp to Original
  18.    memcpy(jmp_opcode + 2, &pSource, 8);
  19.    memcpy(trampolin + nLength, jmp_opcode, JMPSIZE);
  20.  
  21.    //Fill Original with NOPs
  22.    memset(pSource, 0x90, nLength);
  23.  
  24.    //Set jmp to Hook
  25.    memcpy(jmp_opcode + 2, &pHook, 8);
  26.    memcpy(pSource, jmp_opcode, JMPSIZE);
  27.  
  28.    VirtualProtect(pSource, nLength, dwOldProtection, NULL);
  29.  
  30.    //Return Pointer to Original Code
  31.    return trampolin;
  32. }

Beispiel anhand von NtQueryDirectoryFile:
CPP Code:
  1. HMODULE hModntdll = GetModuleHandle("ntdll.dll");
  2. FARPROC dwAddress = GetProcAddress(hModntdll, "NtQueryDirectoryFile");
  3. oldNtQueryDirectoryFile = (tNtQueryDirectoryFile)(DetourFunction((PBYTE)dwAddress, (PBYTE)hkNtQueryDirectoryFile, 21));

Getestet unter Windows 10 Pro 64bit.
VB, C/C++, Delphi, etc

Mo 14. Mär 2016, 13:19

von vedel Go to last post
0 473
icon

Go to first new post Overwatch bypass Erstellt am: Do 25. Dez 2014, 17:38

Sh0n3

preview Vorschau

Go To Post

Ich würde mich dafür interessiere. Ich bin immer offen für neue Ideen!
Nimmst du auch Bitcoin/Paypal?

Gruß
vedel
Mülleimer

Fr 26. Dez 2014, 16:20

von Vercan36 Go to last post
18 1146
icon

Go to first new post Fallen Earth simple external hack Erstellt am: So 19. Okt 2014, 21:24

ranarrr

preview Vorschau

Go To Post

Normally I use "PROCESS_ALL_ACCESS" instead of "PROCESS_VM_READ".
I don't think thats the problem because "VM_READ" should be enough.

I'll try it at home and check the code again.

- vedel

Edit:
I forgot to ask you what the problem is, did you get the wrong value or did you get nothing?
VB, C/C++, Delphi, etc

Do 13. Nov 2014, 11:16

von kentpachi Go to last post
10 1862
icon

Go to first new post Fallen Earth simple external hack Erstellt am: So 19. Okt 2014, 21:24

ranarrr

preview Vorschau

Go To Post

Hello ranarrr,
ich have trouble downloading the code.
Can you Post the snippet here?

- vedel
VB, C/C++, Delphi, etc

Do 13. Nov 2014, 11:16

von kentpachi Go to last post
10 1862
icon

Go to first new post [Help] D3D Hook - D3DXCreateFont & DrawFont Erstellt am: Do 3. Apr 2014, 23:03

OrkSchamane

preview Vorschau

Go To Post

Guten Morgen,


Zitat
Das Argument vom Typ ""const char *"" ist mit dem Parameter vom Typ ""LPCWSTR"" inkompatibel.

Du verwendest Visual Studio oder?
Falls ja: 
Klick auf Projekt > "DEIN PROJEKT" Eigenschaften

http://s7.directupload.net/images/140821/ifermcay.png 

Und Setze "Zeichensatz" auf MultiByte.

Gruß
vedel
VB, C/C++, Delphi, etc

Do 21. Aug 2014, 10:23

von vedel Go to last post
4 1786
Downloads
Es wurden keine entsprechenden Downloads gefunden.