Malicious code is the general name for unanticipated or undesired effects in programs or program parts caused by an entity intent on damage. The history is people have found effective ways to breach an impregnable fortess by having the defenders bring the enemy inside the fortress. The same approach works for computer systems.
Def: Malicious logic is a set of instructions that cause a site’s security policy to be violated.
The table below indicates to types of malicious logic and their corresponding characteristics.
Trojan Horse Contains unexpected, additional functionality
Virus Attaches itself to a program and propagates copies of itself to other programs
Logic Bomb Triggers action when condition occurs
Time Bomb Triggers action when specified time
Trapdoor Allows unauthorized access to functionality
Worm Propagates copies of itself through a network
Rabbit Replicates itself without limit to exhaust resource
Source: Clemson School of Computing