![]() |
|
|
|
#1
|
|||
|
|||
|
@Fyyre
HTML Code:
https://reverseengineering.stackexchange.com/questions/15933/how-to-bypass-or-block-getsystemtime A friend and I made this a long time ago, to bypass trial on a certain program (not naming it). It modifies the value that GetSystemTimeAsFileTime returned. GetSystemTimeAsFileTime Hotpatch http://fyyre.ru/dllmain.cpp Thanks ! |
|
#2
|
||||
|
||||
|
Hi there,
Today I made this method/project available via my Github. I hope you find it helpful: https://github.com/Fyyre/proxy_dll Quote:
__________________
Pax in vultu, bellum in corde. -- https://github.com/Fyyre |
| The Following 6 Users Gave Reputation+1 to Fyyre For This Useful Post: | ||
chessgod101 (11-03-2022), copyleft (12-16-2022), MarcElBichon (11-03-2022), tonyweb (12-10-2022), user1 (11-29-2022), yoza (11-03-2022) | ||
| The Following 14 Users Say Thank You to Fyyre For This Useful Post: | ||
besoeso (11-04-2022), chessgod101 (11-03-2022), copyleft (12-16-2022), FiNALSErAPH (11-06-2022), hp3 (11-03-2022), Mendax47 (11-03-2022), niculaita (11-03-2022), ontryit (12-03-2022), sh3dow (11-03-2022), Spiderz_Soft (12-16-2022), user1 (11-03-2022), user_hidden (11-03-2022), yoza (11-03-2022), zeuscane (11-03-2022) | ||
|
#3
|
|||
|
|||
|
This code only for x86 for x64 need changed
anyone can help with this? Code:
#define DETOUR_DEFINE(F) BYTE OH_##F[5]; BYTE NH_##F[5];
#define DETOUR_SET(F) DetourSet((DWORD)F, (DWORD)D_##F, OH_##F, NH_##F)
#define DETOUR_EXEC(R, F, ...) { CopyMemory((LPVOID)F, OH_##F, 5); R = F(__VA_ARGS__); CopyMemory((LPVOID)F, NH_##F, 5); }
VOID DetourSet(DWORD old_func, DWORD new_func, BYTE* old_header, BYTE* new_header)
{
DWORD op;
VirtualProtect((LPVOID)old_func, 5, PAGE_EXECUTE_READWRITE, &op);
CopyMemory(old_header, (LPVOID)old_func, 5);
DWORD size = new_func - (old_func + 5);
new_header[0] = 0xE9;
new_header[1] = size >> 0;
new_header[2] = size >> 8;
new_header[3] = size >> 16;
new_header[4] = size >> 24;
CopyMemory((LPVOID)old_func, new_header, 5);
}
|
|
#4
|
|||
|
|||
|
Quote:
Maybe you just need to change DWORD to UInt64 (old_func, new_func). Also you might face error in some functions(size of instructions), you can't overwrite bytes blindly unless you don't have any plan to use original function anymore !!! |
|
#5
|
|||
|
|||
|
false in x64 different.
|
![]() |
| Tags |
| windows api hooking |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| .NET dll hooking | Avi_RE | General Discussion | 10 | 09-28-2023 07:09 |
| API-hooking | MaRKuS-DJM | General Discussion | 11 | 03-25-2005 13:27 |