Software that is intentionally inserted into a system for causing damage is known as malicious software. Primarily this software is classified into two categories; in the former category, the software requires a host for its execution. The example of such malicious software is virus, logic bombs, trojan horse, etc. Whereas in the latter category, the software is independent and do not need any host for its execution like worms and zombies. So, the virus, worm and trojan horse come under the category of malicious software.
The prior difference between virus, worm and trojan horse is that a virus attaches itself to a program and propagates copies of itself to other programs followed by a human action, while the worm is a solitary program that spreads its copies to other components without modifying it. Whereas a Trojan horse is a program containing an unexpected supplementary functionality.
Content: Virus Vs Worm Vs Trojan Horse
|Basis for comparison||Virus||Worm||Trojan Horse|
|Meaning||A computer program that connects itself to another legitimate program to cause harm to the computer system or the network.||It eats resources of a system to bring it down rather than performing destructive actions.||It permits an intruder to obtain some confidential information about a computer network.|
|Execution||Depends on the transfer of a file.||Replicates itself without any human action.||Downloaded as software and executed.|
|Rate of spreading||Moderate||Faster||Slow|
|Infection||Initiates by attaching a virus to an executable file.||Utilizes system or application weaknesses.||Attaches itself to a program and interpret as useful software.|
|Purpose||Modification of the information.||Halt the CPU and memory.||Steals the user's information.|
Definition of Virus
A virus can be defined as a piece of program code that attaches itself to a permissible program in order to infect it. The virus runs when the legitimate program runs and can perform any function such as deleting a file. The primary operation performed in a virus is that when an infected program is executed it will first execute the virus and then the original program code will execute. It is capable of infecting other programs residing on that computer.
After corrupting all files from the current user’s computer, the virus propagates and send its code through the network to the users whose email address is stored in the current user’s computer. Specific events can also be used to trigger a virus. There are various types of virus such as parasitic, boot sector, memory resident, polymorphic, stealth and metamorphic. The virus infection can be prevented by preventing the entry of a virus.
Definition of Worm
A worm is a program that can replicate itself and send copies from computer to computer like a virus, but it is different in implementation. It does not modify a program rather it is activated upon arrival to replicate and propagate again. The excessive replication result in halting the system, it consumes system resources to bring it down. A worm vigorously searches for more machines to corrupt, and corrupted machine behaves as a worm producing machine for the other machines connected to it.
Network worm programs utilize network connections to spread from system to system, in the following case the network vehicles could be electronic mail facility, remote execution capability and remote login capability to drive the replication.
Definition of Trojan Horse
A trojan horse is a hidden piece of code which when executed, performs some unwanted or harmful function similar to virus. These are used to fulfil a function directly that an unauthorised user could not achieve. For example, the trojan horse could hide its code in a login form by attaching to it. When a user inserts its details trojan send this information to the attacker without the knowledge of the user. Then the attacker can use the user details to gain access to the system.
Another motive of trojan horse can be data destruction. The program appears to be executing a useful function but it may be silently executing destructive functions.
Key Differences Between Virus, Worm and Trojan Horse
- The execution and spreading of a virus rely on the transfer of the infected files, whereas worms replicate without requiring any human action and use a network to embed itself in other devices. On the other hand, trojan horse acts as a utility software and gets executed.
- Viruses and worms can replicate whereas a trojan horse cannot be replicated.
- A virus cannot be controlled remotely. As against, worm and a trojan horse can be controlled remotely.
- Worms can spread very fastly, whereas viruses spread at a moderate speed, and a trojan horse can spread slowly.
- A virus attacks to an executable file and attaches to it to modify the file, while worm exploits the weakness in the system and application. In contrast, a trojan horse seems to be a useful program which contains a hidden code which is invoked for performing unwanted or harmful functions.
- The virus is mainly used to modify the information and worms are used to excessively using system resources and halting it down. Conversely, a trojan horse can be used for stealing user’s information in order to gain access to the user’s system.
Worms are standalone software that does not need any host for its execution. On the contrary, virus and trojan horse do need a host for their execution. Trojan horse creates a backdoor for the information theft. Virus and worm replicate and propagate wherein virus is capable of modifying the information and worm doesn’t.