Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Virus

Direct answer

A virus is malware that attaches to files or programs and spreads when they are run or shared. Classic file infectors are less common today than trojans and worms.

When to use this

Use this when malware infects files and spreads when they run.

First 30 seconds

1. A virus attaches to files and spreads when they run.

2. Rare today versus other malware.

3. Signatures catch most.

4. Reimage infected systems.

5. Scan removable media.

Operational verification

infected file executed → infects other files

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Incident response and forensics
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformIncident response and forensics
Scope / prerequisiteUse this when malware infects files and spreads when they run.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Infection vectors Narrow the fault
VectorNotes
Executable filesClassic file infectors
MacrosOffice documents (blocked from internet by default)
Boot sectorOld, revived by bootkits
ScriptsVBS, JS, PowerShell

True file-infecting viruses are rare today; most "viruses" in reports are trojans or worms.

Step 2 Common mistakes Narrow the fault
  • Relying only on signatures.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Viruses attach to files and spread when those files run.
  • They spread through shared files and media.
  • Classic viruses are less common than trojans today.
Key checks
  • AV/EDR detections of file infectors — virus
  • Get-MpThreatDetection — Defender detections
  • Clean reimage procedure — recovery
ReferenceWhy it matters1 section · depth on demand

Virus vs worm vs trojan

VirusWormTrojan
Spreads byInfecting files, needs user actionItself over networksUser installs it
Needs a host fileYesNoNo (is the program)
ExampleMacro virusesWannaCryFake installers, RATs

Classic file infectors are rare today; macro and script-based malware and trojans dominate. Defences: EDR, application control, blocking macros from the internet.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

A computer virus is malware that attaches itself to legitimate files or programs and spreads when they are executed or shared. Classic file-infecting viruses are less common today than other malware types, but the term is still used broadly for malicious code.

Defences:

ControlEffect
Antimalware with real-time scanningDetects infected files
Application controlPrevents unknown executables running
No local admin rightsLimits system file infection
Software from trusted sources onlyAvoids infected installers
BackupsRecovery from damaged files

Macro viruses in Office documents were common historically; blocking macros from the internet (default in current Microsoft 365) removes most of that vector.

Defences

  • Up-to-date EDR/antivirus with behaviour detection.
  • Application allow-listing (AppLocker, WDAC) on servers and kiosks.
  • Block macros from the internet (Office default since 2022).
  • Scan removable media; disable AutoRun.
  • Restore infected systems from clean images rather than cleaning in place.
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docIncident response and forensics current

Authoritative/upstream documentation reviewed for bounded claims in Malware → Virus. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://attack.mitre.org/techniques/enterprise/ · confidence 94%
Confirmation

Confirm action

Continue?