Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
A logic bomb is code placed inside a trusted system that waits for a condition before doing damage. The waiting is the point: by the time it fires, nobody is looking at who wrote it.

What Is a Logic Bomb?
A logic bomb is malicious code hidden inside otherwise legitimate software that stays inert until a condition is met, then executes a payload. The condition can be a date, the absence of a record, a counter reaching a value, or simply a particular user failing to log in. Until it fires, the code does nothing observable, which is why logic bombs are so often discovered after the damage rather than before it.
They are overwhelmingly an insider technique. Placing one requires write access to the system, knowledge of what would hurt, and a reason to delay. That combination describes an employee or contractor far more often than an outsider.
Nothing about the mechanism is sophisticated, and that is part of the difficulty: the code looks like ordinary maintenance logic.
The payload is usually destructive, because destruction is what a disgruntled author wants. Deleting data, dropping database tables, corrupting backups, and wiping configuration are the common choices, closely related to wiper malware in effect if not in distribution.
In March 2002, Roger Duronio, a systems administrator at UBS PaineWebber, planted code that activated on 4 March and deleted files across roughly 2,000 servers, disrupting trading. He had bet against the company’s share price in anticipation. He was convicted in 2006 and sentenced to eight years in prison with substantial restitution.
A database administrator at Medco Health Solutions built a logic bomb in 2004, tied to a date, intended to destroy prescription data after he expected to be made redundant. He was not made redundant, reset the trigger to a later date, and was caught when another administrator found the code. He received a 30-month sentence in 2008.
The most instructive case is smaller. David Tinley, a contractor, placed logic bombs in spreadsheet automation he had written for Siemens. They caused failures at intervals, and he was called back, paid, to fix each one. The scheme worked for years and unravelled only when he was away and handed over the password. He was sentenced in 2020. The lesson is not about the technology but about the arrangement: one person owned a critical system entirely, and nobody else had ever read the code.
Detection is a software engineering problem more than a security tooling problem. Scanners look for known patterns, and a logic bomb written for your environment has no pattern to know.
Hunting after the fact means looking for conditional logic that references dates, usernames, or employee identifiers in places with no business reason to care about them, plus scheduled tasks with no owner and no ticket.
Planting a logic bomb engages section 3 of the Computer Misuse Act 1990, an unauthorised act with intent to impair the operation of a computer or the reliability of data, which carries up to ten years on indictment. Where the act creates a significant risk of serious damage to human welfare or national security, section 3ZA allows a life sentence. Destroying personal data is also a security failure under UK GDPR, and the ICO expects to see the access controls and change management that should have prevented it. Insurers will ask the same questions.
At Privia Security, our cyber risk analysis services examine where a single individual still has unreviewed control of a critical system, which is the condition every one of these cases shares. The related risk of a hostile insider threat is rarely solved by tooling alone.
No. A virus spreads by copying itself into other files or systems; a logic bomb does not spread at all. It is a payload with a condition attached, placed deliberately in one environment. Viruses and other malware sometimes include a logic bomb as their trigger mechanism, which is where the confusion comes from, but the two describe different parts of an attack.
Rarely. Bespoke code written for one organisation by someone with legitimate access matches no signature and behaves normally until the condition is met. Detection comes from code review, change control, version history, and integrity monitoring of scripts and scheduled jobs. Endpoint tools may catch the payload once it executes, which is useful for containment but too late to prevent loss.
Revoke access the same day, including shared accounts, service accounts, remote access, and any personal keys in repositories. Review the individual’s recent commits, scheduled tasks, and privileged actions, particularly in systems where they worked alone. Make sure at least one other person can read and rebuild anything they owned, since undocumented sole ownership is the underlying risk rather than the person leaving.
Preserve evidence before touching anything, because employment and criminal proceedings may follow and a hasty clean-up destroys the record. Take backups and images, then review version history and deployment logs to identify when the code was introduced and by whom. Bring in HR and legal early, and test any suspect logic in an isolated copy of the environment rather than in production.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.