I am debugging a malware do injection to Notepad.exe use following approach:
CreateProcess(notepad.exe , create_suspend)
GetThreadContext
VirtualProtectEx
WriteProcessMemory(address=1000000, Size:10200)
WriteProcessMemory(address=7FFD8008, Size:4)
SetThreadContext
ResumeThread
- There is no pid to attach Notepad.exe to debugger before it resume.
- after resume, the thread run so fast that I can't attach to ollydgb in time.
- I Dump memory and save it as PE from what it write to Notepad.exe, but it run with error.
so how to debug malware injected code? thanks!!