A virus is a program that in one or another way interrupts the normal working of your computer. Viruses work by copying themselves into files called hosts. From there they often branch out replicating themeselves in more and more files on the disk. While some viruses infects almost every file in sight, others are picky. Some viruses only infect application programs other infect data files and still others invade the operating system itself.
                     The level of destructiveness among viruses varies widely from one program to the next. Some viruses simply display pictures or message on the screen periodically while others erase or distroy both programs and data.
                 Viruses are usually picked via disk. If you buy or are given a disk that already has the virus on it. Some PC viruses only passed if you boot (start computer) from on infected disk, others can infect when you copy a file from an infected disk or even when you attempt to erase an infected disk.
        Computer viruses are classified by how they infect systems.
Types of viruses and their characteristics:-
1. Boot sector virus: The boot sector is the portion of a hard disk that controls how your operating system start when you turn on your computer. A boot sector virus replaces the disks original boot sector with its own and loads the virus in memory. Once in memory the virus can spread to other disks.
2. File Infector:- A file infector virus adds virus code to files that run programs. So the virus is activated whenever you run the program. When the virus is activated it spreads to other program files.
3. Trojan Horse:- A Trojan Horse virus is disguised as a legitimate program. When you run a program infected with a Trojan Horse virus your computer may be damaged. These viruses are much more likely to destroy files or demage disks than other viruses files or disks.
How to protect your computer from viruses:-
There are several steps you can take to protect your system from viruses:-
1. Backup Data Regularly:- You must take backup regularly and do not discard or overwrite all of your old backups. It may take days/weeks to notice and diagnose a virus and many of your files may be damaged in the meantime. Backing up your data everyday may not help in this case and you way just be backing up damaged files. What you need is an older copy of the data which is a copy made before your computer was infected.
2. Write-Protect Floppies when ever Possible:- Since virus cannot infect write-protected disks. You should write protect any disk that you do not need copy files to. In particular always write-protect your original copies of program disks before you insert them into your computer. That way, if you install the programs and the copy that resides on your hard disk becomes infected. You can always reinstall from your write protected floppies.
3. Use Anti-Virus Programs:- Some programs only detect and eliminate viruses on command while others are what is known as " terminate-and-stay-resident" programs or TSR'S. Which means that they remain in memory through out your work session by automatically hunting down viruses from every disk you insert into your computer. If you are really worried about viruses, you may choose to use tha TSR'S type in which case, the program will check your hard disk for viruses as soon as your turn on your computer as well as checking any floppies you use over the course of the day. A simple approach is simply to use a non-resident virus scanning program. Whenever you suspect that a disk might be infected use this program to scan any floppy you set from other people before you insert them into your floppy drive for a good measure. You might also scan your hard disk once a month and then create an infection free backup copy of everything on that disk.
Scanning for viruses:- At best, anti-virus programs can prevent or repair damage caused by already known viruses. These protect your computer from viruses by scanning your computer's memory and disk drives. Anti virus offers the following methods of detecting computer viruses:-
A. Detect:- It scans for virus and displays information about each virus it finds. This method does not automatically remove viruses from your computer.
B. Detect and clean:- It scans for viruses and removes any that it finds. When you start anti-virus for DOS, it reads file information on the drive used to start the program. If you want to search for viruses on different drive. You must select the drive before scanning for viruses.
Virus protection fighting diagnostic tools:-
DOS provides two data protection features:-
1. MSAV (Anti Virus):- It is an external command which scans memory and hard disks for the presence of computer viruses.
Syntax:- MSAV [drive/path][/switches]
           MSAV command used without parameters displays a full screen menu driven system. You may select the drive or directory whose files you want to analyse and specify various options. A mouse or keyboard can be used to move between various menu options. Using keyboard press arrow key to move between menu items and select by pressing space bar for example:-
    C:\>MSAV
Anti-Virus will scan the current drive for more than 1000 different viruses.
/s - Scans files on the specified drive and directories but does not remove virus. This switch is by default.
/C - Scans files on the specified drive ad directories and remove viruses.
/r - Creates a report on disk (MSAV RPT) that lists the number of files checked. Number of viruses found and the number of viruses removed. You can view it by typing from root directory.
/V - No information is displayed during scanning operations and will display MSAV.RPT text report file if it is created.
2. VSAFE:- It is a program that scans continuosly for viruses. Unlike anti-virus, VSAFE is always active as with any memory resident progams (TSR). It requires a positions of your RAM to operate at 44KB.
Syntax: VSAFE [/options +/........../switches]
         Without any option VSAEF detects a potential virus threat by displaying a worming message after loaded in memory using default settings.
         Press Alt+V to see which Vsafe features are active. Different options control how Vsafe displays for virus
 Use a plus or minus sign (+or-) after the option value to turn that option on/off.
/1 - Warns of potential hard disk reformat.
/2 - Warns of any programs attempt to remain resident.
/3 - Prevent disk writes.
/4 - Checks executable files on opening.
/5 - Check disks (Boot sector)
/6 - Warns of attempts to write to hard disk boot sector.
/7 - Warns of attempts to write to floppy disk's boot sector or partition table.
/8 - Warns of attempts to modify, executable files.
Different options are:-
/U - Unloads VSAFE from RAM.
/AX - Uses Alt+X as Hot-Key.
/CX - Use Ctrl-X as the hot key.
Example:- VSAFE/2+/N/AV
            This would ensure that Vsafe will warn you of any programs attempt to stay in memory as /2+ option. Setting will now be ON switch which enables your subsequent network software to be installed. /AV switch specifies that Alt-V is the hot key to display the VSAFE states screen when ever pressed. The status screen display the on/off status if the 8 option settings press Alt+U to uninstall Vsafe and remove it from memory.