| Worm | Trojan horse |
|---|---|
| Worms are self-replicating viruses that exploit security vulnerabilities to automatically spread themselves across computers and networks. | Malware disguised in what appears to be legitimate software are known as Trojan horse. |
| It can replicate itself and spread automatically. | Trojans do not replicate or reproduce through infection, instead, it performs whatever actions it has been programmed to carry out. |