Dewera / Lunar

A lightweight native DLL mapping library that supports mapping directly from memory
MIT License
585 stars 102 forks source link

How to execute functions of injected dll ? #39

Closed ShayanFiroozi closed 2 years ago

ShayanFiroozi commented 2 years ago

Hi, Let's assume we have injected a dll from the memory to another process. Now the question is : "How to execute/call a function which is available on that dll" ? Thank you.

Dewera commented 2 years ago

You need to resolve the address of the function by parsing the export directory of the DLL (assuming you didn't wipe the headers) using the DllBaseAddress property and then call it manually. CRT would work for functions with 0 or 1 parameters otherwise you would need to create your own shellcode.