Signature-based malware detection is the classic method used by antivirus software. Security vendors analyse known malware and record a signature for each sample: a hash of the file, a distinctive sequence of bytes or a pattern in its code. The scanner compares files, email attachments and downloads against this database and blocks or quarantines anything that matches. Vendors update the database many times a day as new samples are found.
The method is fast and produces few false alarms, which is why it remains a standard first layer of defence. Its weakness is that it only recognises what has already been seen. New "zero-day" malware, custom attacks aimed at a single target such as an exchange, and polymorphic malware that changes its code with each copy can all slip past. For that reason it is combined with behaviour-based detection, heuristic analysis and running suspicious files in a sandbox.
Ref 1300000347