How Computer Virus Works?
A computer virus is a piece of programming code that alters the way your computer works without your knowledge or permission. They are often designed to replicate and spread quickly to other computer users. A virus can only spread from one computer to another when its host is taken to the uninfected computer, for instance by a user sending it over a network or the Internet, or by carrying it on a removable medium such as a floppy disk, CD, or USB drive.
Today's viruses may also take advantage of network services such as the World Wide Web, e-mail, Instant Messaging and file sharing systems to spread. Furthermore, some sources use an alternative terminology in which a virus is any form of self-replicating malware. Computer Viruses do not generate by itself. They must be written by someone and with a specific purpose.
Generally, there are three main classes of viruses:
Also known as parasitic viruses. These viruses usually attach themselves to selected program files like .COM or .EXE files. They are invoked whenever the infected program is run.
A portion of disk is always set by computer operating systems for code to boot the computer. Boot sector viruses infect these system areas on the disk. It can be DOS boot sector on diskettes or the Master Boot Record (MBR) on hard disks. They hide on the first sector of a disk and are loaded into memory before system files are loaded. This allows it to gain control of DOS interrupts to cause damage. Once the MBR or boot sector of the hard drive is infected, the virus will attempt to infect the boot sector of every floppy disk that is inserted into the computer and accessed.
Macro virusesThese are viruses that infect macro utilities in applications like Microsoft Word or Excel. They are the most common type of virus at present. Macro viruses are application-specific, meaning a Word macro virus cannot infect an Excel document and vice versa. They are however not specific to operating systems.