January 14,200 2 | 0 comments
How does a computer virus scan work?
Geoff kuenning, a program sor of computer science at Harvey Mudd College, provides this explanation.
Malicious Software comes in several flavors, distinguished primarily by their method of propagation. the two most pervasive forms are viruses and worms. A virus attaches itself to an existing program such that, when that program is executed, bad things happen. like a biological virus, it cannot live without a host. in contrast, a worm is an independent program that reproduces itself without requiring a Host Program. depending on the form, a worm may be able to propagate without any action on the victim's part. most malicious software today consists of worms rather than viruses.
worms and viruses require slightly different protection mechanisms because of their different propagation methods. A virus infected operates by searching for the signatures of known viruses. A signature is a characteristic pattern that occurs in every copy of a virus. it might be a string of characters, such as a message that the virus will display on the screen when activated, or it might be binary computer code or even a particle bit of data that is embedded in the virus. these patterns are identified by technicians at organizations specializing in computer security and are then made available on security web sites. virus scanners can then download the patterns to bring their internal pattern lists up to date.
There are three complications with this scheme. the first is that the patterns, if ill chosen, can legitimately appear in uninfected files. for example, a pattern containing just the word "hello" wocould not be very useful. part of the technicians 'job is to find patterns that are unique to the viruses.
The second complication is that virus writers do not want their viruses to be detected, so they engage in a war of stealth techniques. for example, using viruses store themselves in an encrypted form, varying the encryption key as they travel so that the encrypted patterns are different on each victim machine. virus scanners can beat this technique either by setting their patterns to search for the part of the program that decrypts the virus (this code must necessarily be unencrypted) or by duplicating the decryption operation before doing their matching.
the third complication has to do with performance. theoretically, a virus cocould attach itself to any executable program. on a modern computer, there may be hundreds or even thousands of potential host programs. scanning every one of these programs every time the virus operated is run wocould take an unreasonably long time. so virus scanners usually limit themselves to a smaller list of probable hosts. for example, floppy and removable disks are common virus vectors, so removable disks are usually scanned whenever they are inserted. on Microsoft Windows, programs in the \ WINDOWS \ SYSTEM folder are popular virus targets, so a virus will be usually check those files. the parameter's internal pattern list can also identify other files that are known to be targets of a particle virus.
Because worms are independent programs, they are somewhat easier to detect than viruses. being independent, they must reside in a file of their own somewhere and that file must be constructed such that the computer will automatically execute it. these constraints place limits on such characteristics as where the file can appear and how it is named. the specified can simply check those well-known places and then apply the same pattern-matching techniques that are used for viruses.
Present-day scanners also look for known vectors for worms. since most worms propagate through e-mail, a packet can be set up to look at incoming e-mail before it is delivered to the user and to scan outgoing messages as they are sent. if a worm is detected, it can be removed from the message. if the worm is in an outgoing e-mail, it must, of course, also be removed from the infected computer.