| title | Malware Analysis | ||||||
|---|---|---|---|---|---|---|---|
| type | technique | ||||||
| tags |
|
||||||
| phase | exploitation | ||||||
| date_created | 2026-07-14 | ||||||
| date_updated | 2026-07-14 | ||||||
| sources |
|
Triaging Windows samples by their imports and recognizing the common code-injection recipes. Generic RE methodology and tooling: [[reverse-engineering]].
Triage a Windows sample by its imports (IAT) to guess capability fast:
- Networking:
WSAStartup/connect/send/recv; loaders often wrap inSslStreamwith cert pinning and gzip-chunk (~16 KB) transport to dodge size heuristics. - Persistence:
RegCreateKeyEx/RegSetValueEx,CreateService/StartServiceCtrlDispatcher,CopyFile/CreateFile+WriteFile. - Crypto:
CryptAcquireContext/CryptDeriveKey/CryptDecrypt(WinCrypt); strings often RC4/AES per-string, decrypted only at runtime. - Injection/stealth:
VirtualAlloc(Ex),VirtualProtect,WriteProcessMemory,CreateRemoteThread,NtUnmapViewOfSection,QueueUserAPC,SetThreadContext. - Execution:
CreateProcess,ShellExecute,WinExec,ResumeThread. - Recon/keylog/screenshot:
GetAsyncKeyState,SetWindowsHookEx,GetForegroundWindow,CreateToolhelp32Snapshot,GetDC+BitBlt.
Injection recipes to recognize:
- DLL injection:
OpenProcess -> VirtualAllocEx -> WriteProcessMemory(dllpath) -> CreateRemoteThread(LoadLibrary). - Reflective DLL: maps + relocates + calls DllMain with no LoadLibrary (no module in PEB list).
- Process Hollowing / RunPE:
CreateProcess(CREATE_SUSPENDED)a signed host (RegAsm.exe, MSBuild.exe, rundll32.exe) ->NtUnmapViewOfSection->VirtualAllocEx(RWX)->WriteProcessMemoryheaders+sections ->SetThreadContext(EIP=entry)->ResumeThread. Detection signature:NtUnmapViewOfSection -> VirtualAllocEx -> WriteProcessMemorychain, CREATE_SUSPENDED procs that go RWX before any window. - Thread hijacking: suspend a target thread, write DLL path, resume into LoadLibrary. Hooking surfaces: SSDT/IRP (kernel/DKOM), IAT/EAT (userland), inline (patch func prologue jmp).
- [[reverse-engineering]] - static/dynamic RE, anti-debug/anti-VM, VBA maldocs, shellcode tooling