"Stomping" is when we overwrite or replace the memory of a data structure in a program with different data. Function stomping is a technique where we replace a functions logic with our own.
Choosing a Target Function
When choosing a target function & module it's best to avoid modules / functions that can be risky. For example: ntdll.dll, kernel32.dll, and kernelbase32.dllare generally best to avoid, and should be used with caution.
IMPORTANT: In order for function stomping to be performed on remote processes, the DLL that exports the targeted function must be already loaded into the target process.
Note: For shared DLL's between processes, the functions within the DLL have the same address in each process. However, the address of the DLL itself will differ between processes due to the different virtual address spaces.