Closed 0Z0SK0 closed 5 days ago
So what's the point of this issue exactly?
Lazy_Importer after some hash manipulations, always calls import with call rax
The library can just return a function pointer. You can do anything with it.
mov rax, qword ptr gs:[0x000000000000000000000030] (where gs:[0x30] is PEB addresses)
You have the code. You're free to change it to rdgsbase
, use a saved global variable, use the entry point argument, etc.
If you use pattern (ex. 65 48 8B 04 25 30 00 00 00 for x64), you can find any import name
As far as I'm aware there's no automated tooling that will statically resolve lazy importer function names.
Unfortunately none of this is a defense, LazyImporter relies too heavily on PEB.
Lazy_Importer after some hash manipulations, always calls import with
call rax
mov rax, qword ptr gs:[0x000000000000000000000030] (where gs:[0x30] is PEB addresses)
If you use pattern (ex.
65 48 8B 04 25 30 00 00 00
for x64), you can find any import name