Understanding how computer viruses work
What are computer viruses?
Despite the widespread popularity of computers, mobile devices, and the internet, most people still don’t know very much about computer viruses or how they work. For a lot of us, the most important thing to know is that computer viruses are bad, and that they’re best avoided. Viruses damage machines, reduce workflow, and generally make using a computer a nuisance instead of a technological miracle.
When a popular piece of technology fails at a catastrophically large level – like in the case of the Heartbleed and Shellshock bugs – people are quick to point fingers and lay the blame at a host of different causes. Ultimately, however, simplicity overpowers logic, and we say that a computer virus is the cause of our concerns.
Computer viruses are incredibly simple to understand. Like an actual biological virus, computer viruses are malicious, self-replicating pieces of software that insert themselves into data. One will notice that my definition includes the word “malicious;” it must be mentioned that the only single defining characteristic of every computer virus is its self-replicating nature. Additionally, not all computer viruses are contagious – not all computer viruses spread beyond a single machine.
How do Computer Viruses Work?
There is a distinction between computer viruses and computer bugs. A virus is a program specifically designed to take advantage of a weakness. A bug, on the other hand, is an unintentional defect found in a piece of software. Computer viruses take advantage of computer bugs – viruses take advantage of weaknesses in computer security.
There are many different kinds of computer viruses, and many different ways to infect a computer, but it’s important to recognize that computer viruses are not self-created. Every computer virus was programmed, and no computer virus is ever born “out of nothing.”
Viruses damage machines, reduce workflow, and generally make using a computer a nuisance…
Resident viruses, also known as memory-resident viruses, infect a computer’s internal memory. This means that resident viruses remain in a computer from the moment the computer is booted up until it is shut down. Non-resident viruses – non-resident-memory viruses – infect a computer when executed, but do not remain in a computer’s memory. Resident viruses are especially harmful because they intercept regular computer functions and redirect a computer to carry out virus functions every time a regular computer function is executed. To put simply, a resident virus could intercept the mouse-click signal so that every time a computer-mouse is clicked, a pop-up activates. In contrast, non-resident viruses are executed manually, and are often a result of poor computer etiquette.

This week Science Avenue teaches us about computer viruses; what they are, how they work, and how to protect your computer from them. Photo Courtesy Brian Klug via CC BY-NC 2.0.
Why are Computer Viruses Important?
Viruses take advantage of both human and computer-based weaknesses. The spread of most viruses can be avoided just by maintaining healthy computer etiquette. In fact, most early viruses took advantage of human curiosity, encouraging early email users to open file attachments, or to click on certain internet links. Viruses are important because they allow us to recognize weaknesses in our computers and ourselves.
Today’s average user knows to update all of their software, to not go online without antivirus programs installed, to avoid potentially harmful websites, and to have an active firewall for protection. However, a surprisingly large population of users still insist on putting their machines – and the machines of others – at risk.
What is the future of Computer Viruses?
It goes without saying that computer viruses are always going to be a problem. There is no such thing as a perfect system, and as long as there are vulnerabilities in computers, there will be people who insist on exploiting those weaknesses. It’s important to remember that computers are used by humans, and as long as there are first-year Computer Science majors, there will be people who try to exploit a machine “just to see if they can.”
As always, I’m excited for the truly absurd possibilities. Until computer science is able to properly program an artificial intelligence, computer viruses might very well be the closest we’ll ever get to a living digital organism. Well-programmed computer viruses are able to self-modify, repair parts of their own damaged code, spread in any way possible to fulfill the parameters of their programming, and even change entire parts of their code to avoid recognition by antivirus software.
Computer viruses are an absolute nuisance, but at the very least, studying how they work puts humankind one step closer to understanding how life and consciousness is able to function.
