The conditions: say one patched programm has hardcoded address of printf()
from dynamically loaded msvcrt80.dll
. It works just fine on XP, but Win7 randomizes address space (ASLR), so this trick become impossible and program crashes with call of my hardcoded printf()
address.
What should I do to retrieve IAT RVA of this printf()
in win7 to make this work?
call RVA(IAT+function)
for some reason execution goes on, interpretingRVA(IAT+function)+4
as opcode and here is application crash.