How does a computer virus scan work?

來源:互聯網
上載者:User

January 14, 2002 | 0 comments

How does a computer virus scan work?

 

 

Geoff Kuenning, a professor 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 scanner 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 particular 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" would 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, many 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 could 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 scanner is run would 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 scanner will usually check those files. The scanner's internal pattern list can also identify other files that are known to be targets of a particular 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 scanner 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 scanner 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.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.