There’s a particular kind of security paper I’ve come to love over the years — the ones that are humble in scope but end up being right for decades. Fred Cohen’s early work on virus defense in the mid-1980s, including the compact, almost understated pieces on practical protection mechanisms, falls into that category. The title I’m riffing on here — “a bit of viral protection” — captures something I want to explore: how a handful of genuinely simple, almost bit-level ideas from the earliest days of antivirus research have outlasted entire generations of more sophisticated tooling built on top of them.
This is my retrospective on those foundational principles — what they were, why they worked, and why I still find myself explaining them to junior analysts in 2026 who assume everything in security had to be invented in the last five years.
The Original Insight: Integrity, Not Just Detection
The earliest and, in my opinion, most durable idea in virus defense wasn’t “scan for known bad patterns” — that came slightly later and is fundamentally reactive. The original insight, dating to Cohen’s foundational virus research, was about integrity checking: if you can cryptographically verify that a program’s bytes haven’t changed since a trusted baseline, you don’t need to know anything about what a virus looks like. You just need to know it changed something it shouldn’t have.
This is the “bit” in “a bit of viral protection” — quite literally, checking whether the bits of a file match what they should be. A checksum, a hash, a cyclic redundancy check (CRC) — the specific algorithm has evolved (from CRC-32, to MD5, to SHA-256 and beyond), but the underlying principle hasn’t changed at all in forty years.
Why Integrity Checking Beats Pattern Matching for Novel Threats
Signature-based detection (pattern matching against known malware byte sequences) is powerful against known threats but structurally blind to anything new. Integrity checking flips the problem: instead of asking “does this match something bad I’ve seen before,” it asks “does this match what I know to be good?” That second question doesn’t require ever having seen the specific threat before.
flowchart TD
A[File on Disk] --> B{Compute Hash}
B --> C{Compare to Trusted Baseline}
C -->|Match| D[File Unchanged - Trusted]
C -->|Mismatch| E[Integrity Violation Detected]
E --> F[Alert / Quarantine / Investigate]
F --> G[Determine Cause: Malware, Update, or Corruption]
The tradeoff, of course, is that integrity checking generates false positives whenever a legitimate update changes a file — which is exactly why modern software distribution relies so heavily on code signing rather than raw hash comparisons: you need a way to distinguish “changed because of an authorized update” from “changed because of an infection.”
A Practical Example: Computing and Verifying File Integrity
Here’s a minimal, purely defensive example — computing a cryptographic hash of a file and comparing it against a known-good baseline, exactly the mechanism underlying tools like Tripwire, AIDE, and modern EDR file-integrity-monitoring modules.
# Generate a baseline hash for a critical system file
sha256sum /usr/bin/critical_binary > baseline.sha256
# Later, verify integrity against the baseline
sha256sum -c baseline.sha256
# Output: /usr/bin/critical_binary: OK (or FAILED if the file changed)
import hashlib
def file_hash(path):
h = hashlib.sha256()
with open(path, "rb") as f:
for chunk in iter(lambda: f.read(8192), b""):
h.update(chunk)
return h.hexdigest()
baseline = {"critical_binary": "known_good_hash_value_here"}
current = file_hash("/usr/bin/critical_binary")
if current != baseline["critical_binary"]:
print("ALERT: integrity violation detected")
else:
print("OK: file matches trusted baseline")
This is defensive tooling — file integrity monitoring (FIM) — and it’s a direct descendant of the earliest “bit-level” protection ideas from the 1980s.
Table: Timeless Principles and Their Modern Descendants
| Original Principle (1980s) | Modern Implementation (2020s-2026) |
|---|---|
| Checksum/CRC integrity checking | File Integrity Monitoring (FIM), code signing, SBOM attestation |
| Least privilege execution | Application allowlisting, sandboxing, container security policies |
| Boot sector protection | Secure Boot, UEFI firmware attestation, TPM-backed measured boot |
| Write-protection on critical files | Immutable infrastructure, read-only root filesystems |
| Behavioral anomaly observation | Behavioral EDR/XDR, machine-learning-based anomaly detection |
| Manual quarantine of suspicious files | Automated isolation/containment via SOAR playbooks |
Case Study: Why Integrity Checking Still Catches What Signatures Miss
Consider a supply-chain compromise scenario — conceptually similar to real incidents like the SolarWinds Orion compromise (2020), where a legitimate, digitally-signed update channel was used to distribute a modified binary. Pure signature-based antivirus, looking for known-bad byte patterns, had nothing to match against because the malicious code was new and specifically crafted to avoid known signatures. What eventually helped identify anomalies in cases like this was exactly the integrity/behavioral angle: unexpected outbound connections, unexpected process behavior, and — where organizations had it — deviations from expected binary hashes across their fleet, allowing correlation once a compromised version was identified.
This is precisely the “bit of protection” argument: the simplest, oldest idea in the toolkit (verify integrity against a trusted baseline) remains one of the most reliable ways to catch threats that are, by design, built to evade the more sophisticated pattern-matching layers stacked on top of it.
Comparing Detection Philosophies
| Method | Detects Known Threats | Detects Novel Threats | False Positive Risk | Resource Cost |
|---|---|---|---|---|
| Signature-based scanning | Excellent | Poor | Low | Low |
| Integrity/hash-based monitoring | Good (indirectly) | Good | Moderate (legit updates) | Low |
| Heuristic/behavioral analysis | Good | Good | Moderate-High | Moderate |
| ML-based anomaly detection | Good | Good-Excellent | Variable, tunable | High |
| Sandboxed dynamic analysis | Excellent | Good | Low | High |
None of these fully replace the others — this is why “defense in depth” isn’t a buzzword, it’s an acknowledgment that every single detection philosophy has blind spots that a different philosophy covers.
Best Practices Rooted in These Timeless Principles
- Maintain trusted baselines for critical system files and configurations, and re-verify regularly — not just at install time.
- Use code signing and verify signatures, not just file hashes alone, so legitimate updates don’t trigger constant false alarms.
- Apply least privilege consistently — many of the earliest virus defense recommendations centered on restricting what programs were allowed to modify, an idea that underlies modern application allowlisting and container security models.
- Layer detection philosophies — signature-based, integrity-based, and behavioral detection each catch different things; none should be your only control.
- Treat firmware and boot integrity as seriously as file integrity — Secure Boot and measured boot (TPM-backed) are the modern extension of 1980s-era boot sector virus concerns, and they remain a common target for advanced persistent threats today.
Common Mistakes
- Relying entirely on signature-based antivirus and assuming “we have AV installed” equals “we’re protected.”
- Never re-baselining integrity monitoring after legitimate changes, leading teams to disable alerts entirely out of alert fatigue.
- Ignoring firmware/boot-level integrity, assuming threats only live in the file system.
- Failing to combine detection layers — treating EDR, FIM, and network monitoring as separate silos rather than correlated signal sources.
FAQs
Is checksum-based integrity checking obsolete now that we have machine-learning detection? No — it’s complementary. ML-based behavioral detection is good at catching things that act suspiciously; integrity checking is good at catching things that shouldn’t have changed at all, regardless of whether their behavior looks “suspicious” in the moment.
What’s the difference between a hash comparison and code signing? A raw hash comparison only tells you a file matches a specific known baseline. Code signing adds a cryptographic guarantee tied to a trusted publisher’s identity, so you can verify authenticity even for files you’ve never seen a hash for before, as long as the signature chain is trusted.
Why did boot sector viruses matter so much historically, and do they still matter? Early viruses frequently targeted the boot sector because it executed before the operating system and any antivirus software loaded, giving the malware first-mover advantage. Modern equivalents — bootkits and firmware-level implants — remain a real, if less common, concern, which is exactly why Secure Boot and measured boot exist.
Are these principles relevant to cloud and container environments, or just traditional endpoints? They’re arguably more relevant — immutable infrastructure, container image signing, and SBOM (Software Bill of Materials) attestation are direct descendants of the same “verify integrity against a trusted baseline” principle, just applied at the infrastructure-as-code level instead of individual files.
Summary and Recommendations
The most durable ideas in cybersecurity tend to be the simplest ones, and few examples illustrate that better than integrity checking’s journey from a niche 1980s virus-defense technique to a cornerstone of modern zero-trust and supply-chain security thinking. Signature-based detection, heuristics, and machine learning have all layered on top of it, but none of them have replaced the fundamental value of being able to say, with cryptographic confidence, “this is exactly what it’s supposed to be.”
For further reading:
- Fred Cohen, “Computer Viruses: Theory and Experiments” (1984)
- NIST SP 800-155, “BIOS Integrity Measurement Guidelines”
- NIST SP 800-218, “Secure Software Development Framework (SSDF)”
- CISA & NSA guidance on Software Bill of Materials (SBOM) — https://www.cisa.gov/sbom
- MITRE ATT&CK, “Subvert Trust Controls” and “Boot or Logon Autostart Execution” techniques — https://attack.mitre.org
- OWASP guidance on supply chain security — https://owasp.org
