Boot Sector Viruses are malicious programs that reside in your hard drive. They infect your machine by replacing your Master Boot Record (MBR) or DOS Boot Sector with their code. In some cases, boot sector viruses will encrypt the MBR. This mode of operation is what makes boot sector viruses are potent.
What is a Boot Sector Virus?
The Master Boot Record is on the first sector of your hard drive and executes whenever you power on your PC. This means that even if you try to remove boot sector viruses using an antivirus, they get loaded back into your computer’s memory on your next boot.
Originating from your boot sector, these viruses will then spread to all the disks on your computer. This makes boot sector viruses tough to remove.
Also, if Windows is running, regular antivirus programs will not have access to the MBR. You can, however, use bootable antivirus disks to remove boot sector viruses. This guide shows you how to do this and other solutions for ridding your computer of boot sector viruses for good.
How to prevent Boot Sector Virus
While removing boot sector viruses is quite challenging, it’s easy to avoid getting them in the first place. The most common way that these malicious programs spread is through shared removable media.
Before inserting any removable storage drive into your computer, you must be sure that it isn’t infected with a boot sector virus. The virus may not get on your machine when you connect the media, but if you leave it connected while you boot up your system, then your hard drive will be infected.
Protecting your machine from boot sector viruses is similar to doing it for viruses in general – you must have reliable antivirus software and defenses and always keep their virus definitions updated. I can’t overemphasize the roles of antivirus software. In this case, you need them for these two functions, primarily:
- To monitor your computer system for malicious activity.
- Detect known malicious actions and patterns in your computer system.
- Scan for viruses and get rid of them from your system’s disks.
In the section that follows, we’ll get more in-depth on how these viruses infect your computer system.
TIP: You can protect your computer’s Master Boot Record with MBR Filter.
How does a Boot Sector Virus get in?
As we’ve emphasized, boot sector viruses enter your PC mainly via physical storage media. However, they may also come bundled in downloads, especially from untrusted sites and email attachments.
When you connect an infected USB pen drive or insert a floppy disk into your computer, the virus gets transferred to your system and infects the MBR. It modifies or completely replaces the existing MBR code, and on your next boot, the virus is loaded into your system and runs with the MBR.
Regarding the download of infected files and email attachments, boot sector viruses remain mostly harmless when you download them. However, when you open the malicious file, it then begins to infect the host machine. In many cases, the proprietor might’ve encoded instructions for the program to multiply and create batches to email your contacts.
Thankfully, the computer BIOS architecture has improved, and this has curbed (to a large extent) the spread of boot sector viruses. This development is due to the inclusion of the option to allow users to block codes from modifying the first sector of PC’s hard drives.
If you’ve never updated your BIOS, now’s a good time to do it.
Read: How to backup & restore Master Boot Record with MBR Backup or MDHacker.
How to remove a Boot Sector Virus
Most boot sector viruses can encrypt the MBR; your drive can get severely damaged if you don’t remove the virus properly.
On the other hand, if the virus doesn’t encrypt the MBR and only infects the boot sector, you can use the DOS SYS command the restore the bad sector.
Further, you can also use the DOS LABEL command to restore affected volume labels. If the infection is severe and beyond repair, you can replace the MBR with the use of the FDISK/MBR command.
While all of these methods may work for some cases, using a free bootable antivirus rescue software is the safest way to remove boot sector viruses. Most importantly, with antivirus software, you are unlikely to lose files and data saved on your hard drive.
Read: How to repair the Master Boot Record.
TRIVIA: The first MS-DOS PC virus was created in 1986 and it was the Brain virus. Brain was a boot sector virus and only infected 360k floppy disks. Interestingly, even though it was the first virus, it had the full-stealth capability. V-Sign was the first polymorphic boot sector virus.