Science Focus - the home of BBC Science Focus Magazine

What’s the difference between viruses, trojans and worms?

Published: 23rd May, 2016 at 00:00
Subscribe to BBC Science Focus Magazine and get 6 issues for just £9.99

They all sound like human diseases, but if you’re a computer the consequences can be just a devastating.

Asked by: Simon Rankin, Maidstone


A virus is a nasty piece of software that is inserted into a normal piece of software, just as a biological virus infects a cell. When the normal software is run, the virus copies itself into other software while also doing unwanted things such as recording keystrokes to steal passwords.

A trojan is similar, but it does not replicate itself. It hides inside a seemingly innocuous program – run the program and the trojan wreaks havoc, from deleting your files to giving hackers access to your system.

A worm is an independent program that replicates on its own, typically spreading across networks and causing major disruption to systems.


Subscribe to BBC Focus magazine for fascinating new Q&As every month and follow @sciencefocusQA on Twitter for your daily dose of fun facts.


Dr Peter Bentley is a computer scientist and author who is based at University College London. He is the author of books including 10 Short Lessons in Artificial Intelligence and Robotics and Digital Biology: How nature is transforming our technology and our lives.


Sponsored content