flat assembler
Message board for the users of flat assembler.
Index
> Windows > how call api without import section? |
Author |
|
asm0day_ru 11 Jan 2015, 09:40
message
|
|||||||||||
11 Jan 2015, 09:40 |
|
Mikl___ 12 Jan 2015, 01:26
Hi, asm0day_ru!
look here Beep without API |
|||
12 Jan 2015, 01:26 |
|
lucifer 12 Jan 2015, 04:23
I actually wrote about one method fairly recently:
lucifer wrote:
From there you just get the imports of GetProcAddress and LoadLibraryA and use those. If you wanted to use the native interface you can always get the the address of some code in ntdll.dll off of the stack but I don't know how many pages away it is from the base of the module. Since it may not be fixed like with kernel32.dll you might have to loop back pages to be compatible across all Windows installations. Quickly hacking something up in C you could do this: Code: short *base = <some ptr into ntdll.dll from stack (a return address)> for(base &= 0xFFFF0000; *base != 'ZM'; base -= 0x10000) if (base <= 0) <you gave me a bad pointer :D> Then walk the headers again and find the appropriate exports via binary search, comparing hashes, linear string search etc Of course there are other ways but that one is my favorite. The most popular way is probably going through a pointer inside the PEB. Search around |
|||
12 Jan 2015, 04:23 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.