PE HEADER ANOMALIES
Compile timestamp in the future or very old (1970, 1992)
Subsystem mismatch — GUI binary acting as console app
Section names not matching content (e.g. .text with no code)
Very few imports — packed/obfuscated binary
Overlay data after last section — embedded payload
Entry point not in .text section
ENTROPY
Entropy measures randomness. Range 0-8 (bits per byte).
0-4: Plaintext / code (low entropy)
5-6: Compressed / mixed
6.5-7: Likely compressed
7+: Encrypted or packed — strong indicator of obfuscation
Legitimate .text sections: 5.0-6.5
Encrypted payloads: 7.5-8.0
SUSPICIOUS IMPORTS
// Process Injection
VirtualAlloc / VirtualAllocEx
WriteProcessMemory
CreateRemoteThread
OpenProcess / NtOpenProcess
// Anti-analysis
IsDebuggerPresent
CheckRemoteDebuggerPresent
GetTickCount (timing)
// Network
WSAStartup / connect / send
InternetOpenA / HttpSendRequest
// Crypto
CryptAcquireContext
BCryptEncrypt
YARA TIPS
Use strings unique to this malware family
Add filesize condition to reduce FPs
Check PE magic: uint16(0) == 0x5A4D
Combine 2-3 strings with AND for precision
Use hex patterns for binary sequences
Use nocase modifier for case-insensitive