What is Logic Bomb?
A logic bomb is malicious code planted inside a legitimate program, script or scheduled job that stays dormant until a specific condition is met, such as a date, a user account being removed or a file disappearing, and then runs a harmful action like deleting data. Most are planted by insiders who already have access.
Definition
- Logic Bomb
- A logic bomb is malicious code planted inside a legitimate program, script or scheduled job that stays dormant until a specific condition is met, such as a date, a user account being removed or a file disappearing, and then runs a harmful action like deleting data. Most are planted by insiders who already have access.
How Logic Bomb Works
NIST defines a logic bomb as a piece of code intentionally inserted into a software system that sets off a malicious function when specified conditions are met. There are two parts, the trigger and the payload. Triggers come in a few shapes:
- time-based ones that run on a date (often called time bombs),
- event-based ones that run when something happens, such as the author's account disappearing from the directory,
- and dead man's switch designs that run unless someone keeps resetting a check.
The payload is usually destructive, because the author wants damage or leverage, not access.
What sets logic bombs apart from most malware is who plants them. The typical author is an administrator, developer or contractor who already has write access to production scripts, database jobs or source code, and who plants the bomb as revenge after a dispute or as insurance against being let go. Because the code sits inside something the organization already trusts, it passes antivirus and often change control without raising anything. It does not beacon, does not spread and does nothing at all until the trigger fires.
In ATT&CK terms the payload of most logic bombs lands in the Impact tactic, usually Data Destruction (T1485), and the trigger often rides on Scheduled Task/Job (T1053): a cron entry or a Windows scheduled task that calls a script on a certain date or checks a condition every night. That is also where detection has a chance. A scheduled job whose only purpose is to call a destructive command, or a script that tests whether one particular username still exists, is unusual enough to stand out in a review, provided someone reviews the jobs a person created before that person leaves.
Logic Bomb in SOC Operations
Logic bombs are an insider-threat problem, so the SOC's best signals are context rather than signatures. A departing administrator creating or editing scheduled tasks, cron jobs or database triggers in their last weeks deserves a look, as do jobs that run under a personal account instead of a service account and scripts that reference specific usernames or dates next to delete, format or drop commands. When someone with privileged access leaves, especially on bad terms, review the jobs and code they touched recently before disabling the account, because disabling it may be the trigger. After a destructive event, the forensic question is when the code was planted and by whom, which pulls change tickets, source control history and file timestamps into the investigation alongside the usual logs.
Practice Logic Bomb in a Real SOC
SOCSimulator provides hands-on training with realistic SIEM, XDR, and Firewall interfaces. Build real analyst skills investigating logic bomb scenarios with zero consequences, free.
Frequently Asked Questions
- What is the difference between a virus and a logic bomb?
- A virus spreads by copying itself into other files or programs. A logic bomb does not spread at all: it sits in one place, inside code or a scheduled job, and waits for its trigger. A virus can carry a logic bomb as its payload, but most real logic bombs are planted by hand by someone who already had access.
- Can you give me an example of a logic bomb virus?
- The clearest examples are not viruses. A typical case is a script left by a system administrator that checks every morning whether their own account still exists in Active Directory and, once it no longer does, deletes backups or wipes servers. Both the trigger and the payload are ordinary admin tooling, which is why these get found in audits and code reviews rather than by antivirus.
- What is the ILOVEYOU virus?
- ILOVEYOU was an email worm that began spreading on 4 May 2000. It arrived as a script attachment posing as a love letter, overwrote files and mailed itself to contacts in the victim's address book. It often comes up next to logic bombs, but it had no dormant trigger: it acted the moment the attachment was opened, which makes it a worm, not a logic bomb.
Sources
Related Terms
An insider threat is a security risk originating from current or former employees, contractors, or b...
Persistence is the set of techniques an adversary uses to keep access to a compromised system after ...
The principle of least privilege states that users, processes, and systems should hold only the mini...
Digital forensics is the scientific process of collecting, preserving, analyzing, and presenting dig...
Ransomware is malware that encrypts victim data or systems and demands payment, typically cryptocurr...
More Threats Terms
Related SOC Training Resources
Threat Hunter Career Guide: Salary & Skills
Threat Hunters do not wait for alerts. You develop hypotheses based on threat intelligence and adversary behavior models…
Read more Career PathIncident Responder Career Guide: Salary & Skills
Incident Responders lead the technical response when confirmed breaches happen. You coordinate containment, run forensic…
Read more Career PathSOC Analyst (Tier 2) Career Guide: Salary & Skills
Tier 2 SOC Analysts handle the investigations that Tier 1 escalates. You dig into multi-stage attacks, coordinate contai…
Read more ComparisonSOCSimulator vs Hack The Box: Comparison
Different tools for different career paths. SOCSimulator trains defensive analysts. Hack The Box trains offensive securi…
Read more ToolSIEM Training Console: SOCSimulator
The SIEM console in SOCSimulator replicates the workflow of enterprise platforms like Splunk Enterprise Security, Micros…
Read more TechniqueMITRE ATT&CK® Techniques: Detection Training Library
Browse all MITRE ATT&CK® techniques with detection strategies and example alerts.
Read more Career PathCybersecurity Career Paths: 2026 Guide
Explore SOC analyst career paths with salary data, required skills, and certification roadmaps.
Read more PlaybookSOC Investigation Playbooks: Step-by-Step Guides
Practitioner investigation playbooks with decision trees and real SIEM queries.
Read more FeatureShift Mode: Real-Time SOC Simulation
Practice alert triage under realistic time pressure with SLA timers and noise injection.
Read more FeatureOperations: Guided Training Operations
Structured CTF-style investigation operations covering real-world attack scenarios.
Read more BlogSOCSimulator Blog: Security Training Insights
Articles on SOC analyst skills, detection engineering, and career development.
Read more FeatureSOCSimulator Pricing: Free Plan Available
Compare free and Pro tiers.
Read more