# What is a Computer Virus?

> A computer virus is self-replicating malicious code that inserts or attaches itself to a host, such as a program, document, script, or boot-related object.

- Canonical URL: https://yellowcube.eu/glossary/computer-virus/
- Publisher: Yellow Cube
- Language: en
- Contact: hello@yellowcube.eu

## Content

It becomes active when that host is opened, loaded, or executed. This host dependence distinguishes a virus from a self-contained worm.

After activation, a virus may find and modify other suitable hosts. Infected objects can move through shared storage, attachments, downloads, synchronization, or removable media, but another action normally transfers or runs the host. Replication is separate from any payload, such as theft, corruption, or further malware installation.

### Key points

- **Host relationship:** The infected object carries or activates the viral code. Hosts and infection methods vary by platform, so “file virus” does not describe every virus.
- **Scoping:** Identify the original execution, potentially infected hosts, distribution paths, privileges, and payload. Checking only the first detected file can miss modified objects elsewhere.
- **Recovery:** Quarantine or replace affected objects using tested procedures, close the entry path, and validate systems and shared repositories. Preserve representative evidence when required.
- **Important limitation:** A signature can identify a known pattern without finding every infected object or action. A suspicious file is not a virus unless host-dependent replication is part of its behavior.

### Related terms

[Malware](<https://yellowcube.eu/glossary/malware/>) · [Computer worm](<https://yellowcube.eu/glossary/computer-worm/>) · [Trojan horse](<https://yellowcube.eu/glossary/trojan-horse/>) · [Antivirus](<https://yellowcube.eu/glossary/antivirus/>) · [Malware analysis](<https://yellowcube.eu/glossary/malware-analysis/>)

### Sources

[NIST glossary: Virus](https://csrc.nist.gov/glossary/term/virus) · [NIST SP 800-82 Rev. 3: Guide to Operational Technology Security](https://csrc.nist.gov/pubs/sp/800/82/r3/final) · [NIST SP 800-83 Rev. 1: Guide to Malware Incident Prevention and Handling](https://csrc.nist.gov/pubs/sp/800/83/r1/final)

## Attribution and scope

This Markdown representation is generated from the same approved content records as the canonical HTML page. Cite the canonical URL above when referencing this material. Product and service descriptions are informational; confirm project-specific requirements with Yellow Cube.

