![]() |
[C/C++] Memory patcher to deal with (ASLR)
1 Attachment(s)
Memory patcher (loader) to deal with Address Space Layout Randomization (ASLR)
PHP Code:
|
better way is to use the NtQueryInformationProcess - process_basic_information method to obtain the peb address for the process, its much more reliable than using register values which might change with a service pack / os update etc..
|
Yes, it's more safe to use Win/Native Api to get Base Address than using hard coded offsets (can be altered or modified between os version) especially if you plane to use it in production tools, MS recommendations.
|
Hi Insid3Code,
IMHO, your source code is very useful to find the image base address and the image entrypoint, but I really do not understand the use of patching one byte inside NTDLL.DLL, at EntryPoint+64/7E! In my Window7-64, for a 32bit application, EntryPoint is at start of RtlUserThreadStart() (inside SysWOW64\ntdll.dll), and EntryPoint+0x64/0x7E are inside the exports table! Best regards, bilbo |
Hi bilbo,
To add support for WOW64 (32bit application on 64bit system) you need to use (Wow64GetThreadContext and WOW64_CONTEXT structure) and some system check to retrieve running environment info (32bit or 64bit). |
Thanks for your answer, Insid3Code,
Quote:
Quote:
Best regards bilbo |
Quote:
Quote:
|
1 Attachment(s)
Code snippet updated to support Wow64 for 64bit patcher to patch 32bit target...
PHP Code:
|
| All times are GMT +8. The time now is 17:32. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX