Many of us have, at some point, had a computer start acting very strangely. There are a lot of threats out there, and many common forms of virus.
Computer viruses got their name from the real viruses that affect humans, animals and plants because they work in a similar way: they replicate and infect many files on a machine.
What is a computer virus?
A computer virus is a program that can copy itself and infect a computer without the user’s permission or knowledge. A computer virus has two main characteristics:
- The ability to replicate itself
- The ability to attach itself to another computer file
By running malicious code, a computer virus can modify programs and files on the infected system.
Types of computer viruses
Boot sector virus
The boot sector virus isn’t one particular virus but a specific way a virus can affect your PC. One of the oldest forms of PC virus, it infects the hard drive’s boot sector or partition table.
An infection can cause booting and start-up problems, trouble retrieving data, unstable computer performance and an inability to find hard drives. Boot sector viruses are especially dangerous because they take control of the computer before any antivirus protection can start.
Boot sector viruses were traditionally spread through infected floppy disks, but they can also spread across networks through file downloads and email attachments.
How to remove it: use antivirus software or a malware removal application.
Web scripting virus
This virus exploits browser vulnerabilities. It disguises itself as a picture or text file by adding an extra file extension (for example, image.png.vbs), which lets it bypass browser security. It can then make significant changes to your device, such as modifying browser pages, changing the registry and stealing important information.
Web scripting attacks are usually carried out on social media sites, which are known for their heavy traffic. There are two types:
- Persistent: the attacker targets your device by stealing your cookies. They can then cause a lot of damage by impersonating you.
- Non-persistent: the attack takes place without your knowledge.
These viruses are triggered when you click or open an infected file or link. They can hide in websites, links, videos, images, ads and more.
How to remove it: delete files that have double extensions, such as .vbs, .js or .vbe, and raise your device’s network security setting above “medium”. Using antivirus software is also recommended.
Browser hijacker
This virus changes a browser’s search and error pages. Its aim is to take over the browsers on a device and redirect the user to fake or infected websites, often pages full of ads.
Some browser hijackers can install keylogging software to capture sensitive information such as banking and email login details, while others can seriously damage the registry on Windows systems, sometimes permanently.
How to remove it: reinstall your browsers, or remove any extra add-ons that have been installed on your device.
Resident virus
A resident virus can hide in the computer’s memory, which lets it infect any file that runs on the computer. It can even attach itself to many antivirus applications, allowing it to infect every file the antivirus scans. It is also triggered each time a file or program is opened. This is unlike a non-resident virus, which only runs when its infected host program runs.
How to remove it: follow these steps carefully, as any mistake could seriously damage your computer.
- Open Task Manager by pressing Ctrl + Alt + Delete. In the Processes tab, look for any suspicious-looking processes and click “End task” to stop them.
- Open the Run box by pressing the Windows key + R, type “regedit” and press Enter. Click “Yes” to authorize it.
- The Windows Registry Editor will open. Expand “HKEY_LOCAL_MACHINE”.
- Press Ctrl + F to open the search box.
- Type the virus’s name in the “Find what” box to search for it.
- When the search is complete, the virus’s entries will be displayed. Delete each one by right-clicking it.
Direct action virus
The direct action virus is classed as a non-resident virus. It works by attaching itself to an .exe or .com file when that file is installed or run, then uses a “FindFirst, FindNext” routine to search for other applications to attack. Its main goals are to replicate and spread the infection whenever its code runs.
When certain conditions are met, the virus starts infecting files in the directory or folder it’s in, as well as files in the directories listed in the AUTOEXEC.BAT path. AUTOEXEC.BAT is a batch file in the root directory of the hard drive that runs certain operations when the computer starts up.
Direct action viruses are easy to spot, and infected files can usually be restored to their original condition.
How to remove it: scan your computer and remove the virus with a virus scanner or antivirus program.
Polymorphic virus
A polymorphic virus is a sophisticated virus that affects data types and functions. It constantly creates modified versions of itself to avoid detection, while keeping the same basic form after each infection.
Because it keeps changing the arrangement and byte values of its code, it has a good chance of slipping past security tools. It can corrupt memory, steal data and credentials, or encrypt data for ransom, and it can launch other processes that cause even more damage.
How to remove it: use an antivirus program with heuristic detection.
Multipartite virus
Also known as a hybrid virus, a multipartite virus can attack both the boot sector and the executable files of an infected computer at the same time, so it can cause much more damage than other viruses. It typically spreads by attaching itself to an executable file. Once triggered, it latches onto the part of the hard drive that holds the files needed to start up the computer.
How to protect yourself: the best defense is preventing infection in the first place.
- Install trusted, high-quality antivirus software.
- Keep the antivirus software’s virus definitions up to date.
- Never open attachments in unsolicited messages.
- Be careful when visiting or downloading from websites you’re not sure you can trust.
Macro virus
A macro virus is written in the same macro language used by software such as Microsoft Excel and Microsoft Word, which makes it easy for the virus to infect documents on the PC. It can also automatically trigger a series of software functions, often with harmful effects.
As well as wreaking havoc on one system, macro viruses are programmed to replicate and spread to other systems. They are most often spread online through fake web links or email attachments.
How to remove it: antivirus software is usually good at detecting and removing macro viruses before they can do much harm.
Armored virus
An armored virus is designed to stop analysts from inspecting its code, using various methods to make tracing, disassembling and reverse engineering more difficult. It may also protect itself from antivirus programs by tricking them into believing it is located somewhere other than where it really is on the system.
How to protect yourself: make sure your antivirus software is up to date and running properly.
Companion virus
The companion virus is an old type of virus that was most common in the MS-DOS era. Unlike other viruses, it doesn’t modify the files it finds. Instead, it creates a copy of a file with a different extension.
It works by finding files that end in .EXE and creating a matching file with the same name ending in .COM. It takes advantage of the fact that, in DOS and Windows, both .COM and .EXE are valid program extensions, and .COM files take priority.
Once the companion virus has been downloaded and unknowingly run, it searches the system when it’s time to spread. Say it finds a file called MGM.EXE: it creates a matching file containing the virus and names it MGM.COM. This file is usually placed in the same directory as the .EXE file, but it can be placed in any directory on the system’s search path. When you open MGM.EXE, the operating system runs MGM.COM instead. The virus runs and goes on to infect other files.
How to remove it: find the .COM files and delete them manually, or use an antivirus scanner. Bear in mind that an integrity checker, which only looks for changes to existing files, won’t detect this kind of virus.
Phage virus
A phage virus edits the executable file it targets, rather than attaching itself to the file and running alongside it. It is lethal because it rewrites its host’s programming with its own code, leaving the host file unusable and the program deleted or corrupted.
A well-known example is PalmOS/Phage, also known as the Palm Virus or Palm.Phage.Dropper, which spread rapidly across handheld devices running the Palm operating system and wiped out programs. It moved between devices when files were downloaded from the web, shared by infrared (IR) beaming or synced with a PC.
Retrovirus
A computer retrovirus actively seeks out and attacks the antivirus program on a computer. It tries to disable and infect the antivirus software to avoid being detected.
Also known as an anti-antivirus, a retrovirus works against the antivirus software already installed on the computer: once it has disabled the antivirus program, it starts infecting the computer.
Stealth virus
A stealth virus can hide itself effectively once it has infected a computer. It usually spreads the same way as any other virus or malicious program, and it can live anywhere in the system, including files, partitions and boot sectors, without any sign that it’s there. Like other viruses, stealth viruses can take control of many parts of your PC.
Once installed, a stealth virus is very difficult for antivirus programs to detect and remove during a scan. It typically keeps a copy of the original, uninfected data on a drive so it can show that clean data to the antivirus program during a scan.
The first known stealth virus, called Brain, spread around the world in the mid-1980s.
How to remove it: you need a clean system, so that no virus can distort the results of a system check. Start the computer from a trusted, clean, bootable disk before running any virus checks. In general, the best countermeasure is strong antivirus software designed to detect viruses and their hidden copies.



