How modern anti-cheat modules detect injected DLL function calls:
They walk the call stack (RtlVirtualUnwind) from inside native functions. If the return address points to unbacked / dynamically allocated memory outside valid PE module bounds, the thread is flagged.
Return Address Spoofing Strategy:
- Locate a
jmp rbxorjmp [rsp]gadget inside a legitimate signed Windows system DLL (kernel32.dllorntdll.dll). - Overwrite the stack return address with the gadget address.
- Restore registers upon function completion.
The unwinder sees the call originating 100% from a signed Microsoft system binary!