Open In App

Types of Viruses

Last Updated : 11 Jul, 2025
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report

A virus is a small piece of code hidden inside a normal program. It can make copies of itself and infect other programs. Viruses can damage the system by changing or deleting files, which may cause the computer to crash or not work properly. A virus dropper, usually a trojan horse, helps put the virus into the computer.

A computer virus is a malicious program designed to replicate itself and spread by inserting its code into other programs or files on your computer. Different types of viruses can impact your device in various ways. In essence, a computer virus alters how your system functions and tries to infect other computers by attaching itself to legitimate software or documents that support executable code, such as macros.

Various types of viruses

There are various different types of viruses are there which ae discussed below :

File Virus

A File Virus is a type of computer virus that attaches itself to executable files (such as .exe or .com files). When the infected file is run, the virus becomes active and can spread by infecting other executable files on the system. This type of virus infects the system by appending itself to the end of a file. It changes the start of a program so that the control jumps to its code.

After executing, it usually transfers control back to the original program, making the infection less noticeable. File viruses are also known as parasitic viruses because they depend on host files to function but keep the host operational.

Boot sector Virus 

A Boot Sector Virus is a type of virus that infects the part of a storage device that helps start the computer, called the boot sector or master boot record (MBR). When the computer turns on, this virus loads into memory before the operating system starts. Because it runs so early, it can take control of the system and is hard for antivirus programs to find and remove. It can spread through infected devices like hard drives or USB drives.

They are sometimes referred to as memory resident viruses because they stay active in the system's memory after execution. 

boot sector virus flowchart

Macro Virus

A Macro Virus is a kind of virus that is written using simple programming languages like Visual Basic. It hides inside files like Word documents or Excel spreadsheets. When you open an infected file, the virus runs automatically and can spread to other files on your computer. It may also send itself to other people through email. Because it uses common programs like Microsoft Word and Excel, it can spread quickly through shared files and attachments.

Source code Virus 

A Source Code Virus is a type of virus that searches for source code files on a computer and adds harmful code to them. When the changed source code is compiled or run, the virus becomes active and can spread further. These viruses usually affect software development tools and are hard to find because they look like normal code. Their main purpose is to secretly add dangerous commands to programs while they are being created.

Polymorphic Virus

The word "poly" means many, and "morphic" means forms. So, a Polymorphic Virus is a complicated computer virus that changes its form every time it spreads to avoid being caught by antivirus programs. It is a self encrypting virus that uses a special part called a mutation engine to constantly change its code while still doing the same harmful actions. This makes it hard for antivirus software to detect and stop it. 

A virus signature is a pattern that can identify a virus(a series of bytes that make up virus code). So in order to avoid detection by antivirus a polymorphic virus changes each time it is installed. The functionality of the virus remains the same but its signature is changed.

Encrypted Virus

This type of virus hides by keeping its code scrambled so antivirus programs cannot easily find it. It also has a small program that unscrambles (decrypts) the code first, then the virus runs.

Email Virus

An email virus is defined as an email that consists hidden malicious program that affects the system. The malicious program inside the email gets activated once the user opens the malicious attachments with emails or when clicking on infected links.

Stealth Virus

A Stealth Virus is a sneaky virus that hides from antivirus programs. It changes or hides the parts of the computer that antivirus looks at. For example, when you open a file, the virus shows the clean, original file instead of the infected one. This makes it hard to find. 

Tunneling Virus 

A Tunneling Virus is a virus that hides from antivirus programs by attaching itself to important parts of the computer, like system controls or drivers. This helps the virus block antivirus from finding it and keeps it active on the computer.

Multipartite Virus 

A Multipartite Virus is a virus that can infect different parts of a computer, such as files, the boot sector, and memory. Because it attacks in many ways at the same time, it is harder to detect and remove.

Armored Virus

An Armored Virus is a virus designed to protect itself from being discovered and studied by antivirus programs. It uses tricks like hiding where it really is or making its code confusing, so it’s harder for security tools to find and remove it.

Browser Hijacker

As the name suggests Browser Hijacker virus is coded to target the user's browser and can alter the browser settings. It is also called the browser redirect virus because it redirects your browser to other malicious sites that can harm your computer system.

Memory Resident Virus

A Memory Resident Virus is a virus that stays active in a computer’s memory (RAM) after it runs. Because it remains in memory, it can keep running in the background, interfering with normal system operations and making it harder to detect and remove.

Direct Action Virus

A Direct Action Virus is a virus that activates and spreads only when it is executed. Once triggered, it quickly infects files in specific locations, often targeting files in certain folders or directories. Its main goal is to replicate and cause damage during its active phase.

Overwrite virus

An Overwrite Virus is a type of virus that destroys the data in the files it infects by overwriting them. This usually makes the infected files partly or completely useless because the original information is lost and cannot be recovered.

Directory Virus

A Directory Virus is a virus that changes the computer’s directory information. It modifies the file paths that tell where files are stored, making it difficult to find or open those files. This type of virus is also known as a File System Virus or Cluster Virus.

Companion Virus

A Companion Virus is a virus that creates a new file with a similar name to an existing program but with a different file extension. For example, if there is a file named Hello.exe, the virus might create a file called Hello.com. When the user runs the program, the virus runs instead, allowing it to spread and cause damage.

FAT Virus

A FAT Virus targets the File Allocation Table (FAT), which is a part of the disk that keeps track of where files are stored. This virus can damage or change the FAT, making it hard to find or open files and possibly causing data loss. Because the FAT is important for file management, any damage to it can affect the whole system.

For more information on viruses you can refer to Computer Virus article.


Article Tags :

Similar Reads