How an antivirus engine reaches a verdict
A modern engine does not simply look a file up in a list. It builds a verdict from several kinds of evidence, each with its own weakness.
Статьи публикуются на английском языке.
Many people still picture an antivirus as a list of bad files. That part still exists, but it is only one layer. A current engine combines several techniques, because each one fails in a different way.
Signatures
The simplest check compares a file’s cryptographic hash with a list of known malicious files. It is fast and produces almost no false alarms, but changing a single byte defeats it.
Pattern signatures look for distinctive byte sequences or structures inside a file, so one rule can cover a whole family of related samples. YARA is the widely used open format for writing such rules.
Before any of this can work, the engine has to reach the real content. Installers, archives and packed executables must be unpacked first, and these parsers are themselves a target: they process hostile input, often with high privileges, so they have to be written with great care.
Heuristics
Heuristic analysis looks for suspicious properties without needing to have seen the file before: an executable section that is also writable, an unusual entry point, a file that imports functions commonly used for process injection. Each trait adds to a score. None of them is proof on its own, since legitimate software does many of these things too.
Emulation and sandboxing
Packed code hides its real behaviour until it runs. An emulator executes the first part of a program inside a simulated processor and watches what it unpacks. A sandbox goes further and runs the file in an isolated machine, recording the files, registry keys and network connections it touches.
Malicious programs try to detect these environments and stay quiet, so the analysis is an ongoing contest.
Behaviour monitoring
On the protected machine, kernel and user-mode components watch what processes actually do. A word processor that starts a command shell, or a process that rapidly rewrites thousands of documents, is suspicious whatever its file looks like. This layer can stop an attack that every static check missed, and it can roll back the changes on some systems.
Reputation
Cloud services can answer the question “how many machines have seen this file, and for how long?” A brand-new, unsigned program seen on three computers deserves more caution than a signed one seen on millions.
Putting it together
The final verdict combines this evidence. Strong signals, such as an exact match for known malware, can decide alone. Weak ones add up to a score that is compared against a threshold. Where to set that threshold is a business decision as much as a technical one: lower it and you catch more malware, and you also block more legitimate software.
Each layer also has to fit within a performance budget, since users will disable protection that makes their computer slow.
Написано инженерной командой Avtim. Это общая информация; прежде чем на неё полагаться, сверьте её со своей системой.