Anonymous contributor
Anonymous contributor
Published Apr 10, 2023
Contribute to Docs

A virus is a type of malware that can infect a computer system. Viruses have two main functions:

  1. Destruction: Refers to the damage a computer virus can cause to a computer by deleting files or reformatting the hard drive.
  2. Propagation: When a virus self-replicates by placing a copy of itself into other programs across a network.

Virus In-Use

A virus’s payload delivers the destructive power and negatively impacts the confidentiality, integrity, or availability of systems or data. Common signs of computer viruses can include unwanted pop-up windows, programs that self-execute, accounts being logged out, and crashing of the device. The risk of a virus can be mitigated by installing anti-virus software, scanning on a regular basis, and backing up data.

Different Types of Viruses

There are many different types of viruses. They include:

  • Boot Sector Virus: Originated when computers booted from floppy disks, now commonly distributed by USB drives. It injects itself into the boot process of the computer.
  • Macro Virus: Found in programs such as Microsoft Word or Excel that host their own scripting language. These viruses can hide in file formats run by these programs such as .doc or .xlsx.
  • Parasitic Virus: Attaches to an executable file such as a .com or .exe and is executed with the host file.
  • Polymorphic Virus: Attempts to evade anti-virus software by altering its own code each time it’s run.
  • Web Scripting Virus: Exploits vulnerabilities in browsers to install malicious software. Can be found on unsafe websites or even in malicious banner ads.

Other Types of Malware

A virus is a type of malware (malicious software). Malware is any type of software that could harm a computer system. It can make a computer perform actions without the owner’s consent or knowledge. Types of malware aside from viruses include:

  • Adware: Software that spawns unwanted advertisements through popups or other means. Designed to be difficult to remove, they can severly drain resources on a system.
  • Ransomware: Malware that typically encrypts all or part of the data on a system and extorts the user for money, typically cryptocurrency, to retrieve the decryption key.
  • Spyware: Software that tries to monitor and gather information about a user without their knowledge or consent. It can monitor and log activity on a target system, or gather credit card and other personally identifiable information.
  • Trojan Horse: A type of malware that uses code to install seemingly benign software, but it is actually used to create back doors into a system. The result is typically loss or theft of data.
  • Worm: A piece of malicious software that replicates itself in order to spread to other systems. It often traverses across a network, exploiting security flaws on the target system to allow access.

All contributors

Looking to contribute?

Learn Cybersecurity on Codecademy