17.-+Logic+Bombs

**Logic Bombs**

In a computer program, a **logic bomb**, also called //slag code// (because all that's left after it detonates is computer slag), is programming code, inserted surreptitiously or intentionally, that is designed to execute (or "explode") under circumstances. For example, a programmer may hide a piece of code that starts deleting files (such as a salry database trigger), should they ever be terminated from the company. To be considered a logic bomb, the payload should be unwanted and unknown to the user of the software.

It's secretly inserted into the code of a computer's existing software, where it lies **dormant** until that event occurs. This event might be a positive trigger, such as a specific date. Trojans that activate on certain dates are often called "**time bombs**". Negative triggers are considered to be more dangerous than positive ones, since the risk of accidentally triggering the bomb increases dramatically.

A logic bomb could also be programmed to wait for a **certain message** from the programmer. The logic bomb could, for example, check a web site once a week for a certain message. When the logic bomb sees that message, or when the logic bomb //stops// seeing that message, it activates and executes its code. A logic bomb, when "exploded," may be designed to display or print a spurious message, delete or corrupt data, or have other undesirable effects.

Because a logic bomb does not replicate itself, it is very easy to write a logic bomb program. This also means that a logic bomb will not spread to unintended victims. In some ways, a logic bomb is the most civilized programmed threat, because a logic bomb must be targeted against a specific victim.