I will start by defining what a computer virus is. computer virus is a self duplicating computer program that spreads from one computer to another,interfering with data and software. just as biological viruses infect people, spreading from one person to another, computer viruses infect mostly personal computers (PCs) and servers.
some viruses are mere annoyance, but others can do serious damage to the computer. virus can delete or change files, steal important information, load and run unwanted application software, send documents via electronic mail (E-mail), or can even cripple a computer operating system (OS).
How do infections occur?
A virus can infect a computer in a number of ways. it can arrive on a CD plate,flash drives or inside an E-mail message. it can piggyback on file downloaded from the web or an internet service used to share or download movies and music, or it can exploit flaws in the way computers exchange data over a network. so called blended-threat viruses, for an instance; spread via E-mail but also propagate by exploiting flaws in an operating system.
Traditionally, even if a virus found its way onto a computer, it could not actually infect the machine or propagate to other machines, unless the user was somehow fooled into executing the virus by opening it and running it just as one would run a legitimate program. but a new breed of computer virus can infect machines and spread to others entirely on its own.
Types of viruses
There are mere categories of viruses, they include parasitic or file viruses,bootstrap-sector,macro, multipartite and script viruses. then there are so-called computer worms which have become particularly prevalent. A computer worm is a type of virus. However, instead of infecting files or operating system, a worm replicates from computer to computer by spreading entire copies of itself.
Parasitic or file viruses infect executable files or programs in the computer. These files are often identified by the extension .exe in the name of the computer file. File viruses leaves the contents of the host program unchanged but attach to a host in such a way that the virus code is run first, this viruses can be either direct-action or resident. A direct-action virus selects one or more programs to infect each time executed. A resident virus hides in the computer’s memory and infects a particular program when that program is executed.
Bootstrap-sector viruses reside on the first portion of the hard disk or CD plate, known as a boot sector. these viruses replace either the programs that store information about the disk’s contents or the programs that start the computer. typically, these viruses spread by means of the physical exchange of CD plates.
Multipartite viruses combine the abilities of the parasitic and the bootstrap-sector viruses, and so are able to infect either files or boot sectors. These types of viruses can be spread if a computer user boots from an infected CD plates or accesses infected files.
Other viruses infect programs that contain powerful macro languages (programming languages that let the user create new features and utilities). These viruses, called macro viruses are written in macro languages and automatically execute when the legitimate program is open.
Strictly speaking, a computer virus is always a program that attaches itself to some other program, but computer virus has become a blanket term that also refers to computer worms.