A Malware is a malicious software that is designed with an intention of harming your system. Virus and Worm come under the category of malware. Malware is broadly divided into two categories: one which needs a host program and other which don’t need a host for their execution and are independent.
Viruses, logic bombs, and backdoors are the example of fragments of programs that require host program and cannot exist solitary. Worms and zombie programs are the examples of self-contained programs that don’t need the host and can be executed by operating system automatically.
However, both Virus and Worm can be differentiated in some ways. So let’s find how they are dissimilar.
Content: Virus Vs Worm
|Basis for comparison||Virus||Worm|
|Basic||It is a malware which attaches to a file or program and modifies it with the intention of damaging it. ||It is also a malware which creates its copies from one computer to another.|
|Requirement of host ||Host is needed for spreading||It doesn't need a host to replicate from one computer to another.|
|Spreading speed||Spread at a consistent speed.||Worms spread rapidly than the virus.|
|Activation||Requires human action||Triggering does not require human action.
|Consequences||Corrupt and can also erase a file or program.||Consumes system resources and slows down it, and finally coming to halt.
|Destructed through||Recompilation of the affected program.||Rebooting of the system.|
|Can be attached to||Executable files, Main memory, boot record etc.||Electronic mail facility, Remote execution capability, Remote login capability|
Definition of Virus
A virus is a piece of malicious software or mal-intended software which attaches itself to legit program code and runs when the legit program runs. It first modifies the file to which it is attached then it seeks for the other programs appended to that file. It then infects other programs simultaneously leaving a copy. At last, it reloads the original copy of the file which makes it hidden from revealing.
A virus usually carries its instructional code in order to generate its perfect copy. The infection can spread in the whole network connection. The virus causes damage to an extent at which the damage could be recovered if good backup and recovery procedures are employed.
Phases of Virus
- Dormant Phase – The virus is in its idle state. It gets activated by some action or event such as a date, time, presence of another program.
- Propagation Phase – In this phase virus generates its copies.
- Triggering phase – This phase activates the virus to perform the intended function.
- Execution phase – In this phase, the virus performs the actual function which may be harmless or destructive.
Types of virus:
- Parasitic Virus– These type of viruses attaches itself to executable files and replicates itself.
- Memory resident Virus– These types of viruses attach itself to a particular area of the main memory and then it infects each file that is executed.
- Boot sector Virus– This type of virus targets the master boot record of the disk and infect it which after that start spreading when the operating system starts booting the computer.
- Stealth Virus– This virus has the built-in intellect which prevents it from detecting by antivirus software.
- Polymorphic Virus– These types of viruses frequently changes its signature (Identity) at every execution which makes it difficult to identify.
- Metamorphic Virus– This virus is similar to the polymorphic virus but has additional functionality. It keeps on rewriting itself every time including changing its signature.
To escape detection viruses uses a technique in which it resides in the compiled program rather than the readable source which makes it harder to survive recompilation at the time of re-installation of the backup. Although it uses encryption in the scripting language for the same reason, i.e. to hide their purpose form the readers.
Definition of Worm
A worm is a computer program which replicates itself and spread its copies from one computer to another across the network. After arriving at a system, it further propagates and replicates. It comprises of various processes or segments. It communicates through the network when one of the nodes is lost the other plot to replace it on another server and load it with the multiple copies.
A worm is similar to email virus but, it differs from a virus in some way like worm can be triggered automatically without any human action. This is not the case in viruses. Viruses cannot be triggered automatically, by itself. The speed of replication increases as the number of worms increases.
Key Differences Between Virus and Worm
- A virus executes with the help of a host program whereas a worm doesn’t need host program for execution.
- Activation of the virus requires human action. On the other hand, worms are triggered automatically.
- Worms spread rapidly than virus while Virus spreading speed is uniform.
- Simultaneous recompilation of the affected program can destroy the viruses. In contrast, rebooting of the system can result in eradication of worms from the infected systems.
Both Virus and Worm are the types of malware which are particularly designed to damage your system or to breach your system’s security. Although the severity of damage could differ in both virus and worm. Virus includes modification in file or program while worm doesn’t commit any changes in file or program instead it replicates itself again and again.