A logic bomb is a piece of code intentionally inserted into a software system that will set off a malicious function when specified conditions are met.
Software that is inherently malicious, such as viruses and worms, often contain logic bombs that execute a certain payload at a pre-defined time or when some other condition is met.
Thomas C. Reed wrote in his 2004 book At the Abyss: An Insider's History of the Cold War that in 1982, a sabotage occurred on the Trans-Siberian Pipeline because of a logic bomb.
According to Reed, a KGB operative stole the plans for a sophisticated control system and its software from a Canadian firm, for use on its Siberian pipeline.
The Central Intelligence Agency (CIA) was tipped off by documents in the Farewell Dossier, and had the company insert a logic bomb in the program for sabotage purposes.