heuristic analysis
1 article
Heuristic analysis is a malware detection method that judges a file or program by suspicious traits and behaviour instead of matching it to a known sample.
A heuristic is a rule of thumb: a shortcut that gives a good answer most of the time without a guarantee. In security, the rules describe what malicious code tends to look like or do. Examples include instructions that copy the program into other files, attempts to hide from the system, code that unpacks itself in unusual ways, or efforts to switch off security tools. Each trait adds to a score, and a file that crosses a threshold is flagged.
The analysis can be static or dynamic. Static heuristics inspect the code without running it. Dynamic heuristics run it in a controlled, isolated environment and observe its actions. Both exist to cover the main gap in signature matching, which recognises only malware that has already been collected and catalogued. A new threat, or an old one altered slightly, has no signature, but it often still behaves like malware.
The trade-off is accuracy. Because heuristics generalise, they sometimes flag harmless programs that happen to share a trait with harmful ones, and tuning the threshold means choosing between missed threats and false alarms. Even so, the method is a standard part of security software, because attackers produce new variants faster than signatures can be written, and a defence limited to known threats would always be one step behind.