Definition
A Logic Bomb is malicious code deliberately inserted into a software system that triggers a harmful function when specific conditions are met, such as a particular date, user action, or system event.
People Also Ask
Common questions about Logic Bomb answered by our security experts.
Logic Bomb in Practice
A logic bomb is code that lies dormant until a condition is met, then executes a harmful action. The condition may be a date, the absence of a particular account, a specific input, or the completion of a count.
It is distinctive among threats in that it is overwhelmingly an insider technique. It requires the ability to place code where it will run, which usually means legitimate development or administrative access.
The recurring pattern
A developer or administrator anticipating dismissal inserts code that triggers when their account is disabled or when their name disappears from a payroll file. Prosecutions of exactly this scenario recur regularly.
Sometimes the motive is leverage rather than destruction — code that makes the person's continued employment necessary, because systems fail in ways only they understand.
Why it is unusually hard to find
It does nothing until it triggers. Behavioural detection has no behaviour to observe. Testing does not reveal it unless the test happens to satisfy the condition. Antivirus has no signature for code written specifically for one environment.
It may also be legitimate-looking code with a subtle condition — a maintenance routine with a date check, an error handler that deletes rather than logs.
The controls are procedural
Code review by someone other than the author, which is the single most effective measure. Separation of duties, so the person writing code is not the person deploying it.
Version control with attribution, so every change has an author and a reviewer. And restricted production access, so code cannot be modified directly on live systems — which is where this most often happens, because it bypasses every other control.
Departure is the moment of exposure
Where someone with development or administrative access leaves on poor terms, reviewing their recent changes is proportionate. So is checking scheduled tasks, database triggers and automation they created.
Access removal on the day matters more here than in most contexts, because continued access allows the code to be placed after the decision to leave is known.
Detection, where it is possible at all
Reviewing scheduled tasks, triggers and automation for conditions referencing dates, account names or employee identifiers. Comparing deployed code against the version control record, which finds anything inserted directly.
Backups are the practical safeguard. Since prevention is imperfect, recoverability — tested, and held beyond the reach of the person who might trigger it — is what limits the damage.
Third-party and contractor code
The same risk applies to code written by contractors, agencies and vendors, and the relationship ending is the equivalent trigger point. Contract disputes over payment have produced exactly this behaviour.
The protections are the ordinary ones plus source code escrow and the right to review: independent review of delivered code, a build you can reproduce yourself, and access to source for anything business-critical. Without those, a dependency on the supplier’s goodwill is a technical risk rather than a commercial one.
Where to start
Establish whether anyone can modify production code or database logic without a review step. Where they can, this threat is available and undetectable.
See insider threat. GuardsArm runs security risk assessments.
Related Terms
Insider Threat
An Insider Threat is a security risk posed by individuals within an organization, such as employees, contractors, or partners, who misuse their authorized access to harm the organization's data, systems, or operations.
Malware
Malware (malicious software) is any software intentionally designed to cause damage to a computer, server, client, or network. Common types include viruses, worms, trojans, ransomware, spyware, adware, and rootkits.
Trojan Horse
A Trojan Horse is malware disguised as legitimate software that tricks users into installing it, then provides attackers with unauthorized access to the victim's system for data theft, surveillance, or further attacks.
Related Reading
Insider Threat Monitoring in Healthcare: What to Watch and Why
Most healthcare insider incidents are curiosity, not espionage — and both are reportable. Monitoring that catches real misuse without treating…
Ransomware Prevention and Recovery: Advanced Defense Strategies for 2025
Learn about ransomware prevention and recovery: advanced defense strategies for 2025 and how it impacts your organization's cybersecurity strategy.…
Software Supply Chain Security: Beyond the Vendor Questionnaire
Your software inherits the security of everything it depends on, most of which you did not choose. Dependencies, build pipelines and the update…
Speak With an Expert
Book a free consultation to discuss logic bomb for your organization.
Related Services
Need Help With Logic Bomb?
Our certified security professionals can help you implement the right logic bomb strategy for your organization. Get a free assessment today.