Safekipedia

Computer virus

Adapted from Wikipedia · Adventurer experience

An early computer virus's code displayed in hexadecimal format, showing the first lines of malicious software ever created for PCs.

A computer virus is a type of malware that copies itself by changing other computer programs and adding its own code into them. When this happens, the affected programs are said to be "infected," like how real viruses work in nature.

Hex dump of the Brain virus, generally regarded as the first computer virus for the IBM Personal Computer (IBM PC) and compatibles

Unlike a computer worm, a virus usually needs a host program to work. It places its code inside the host. When that program runs, the virus runs first and can spread.

People who create viruses sometimes do it for different reasons, such as to lock files for profit, to send a message, or just for fun. They can also aim to disrupt services or explore ideas about cybersecurity. Because of the trouble they can cause, many people and companies work to create antivirus software to protect operating systems and keep computers safe.

History

The idea of computer programs that can copy themselves started in 1949. A scientist named John von Neumann talked about how a program could make copies of itself.

In the early 1970s, the first known program that could copy itself appeared on a network called ARPANET. It showed a message that said, "I'M THE CREEPER. CATCH ME IF YOU CAN!"

In 1982, a young student named Richard Skrenta made a virus called Elk Cloner for Apple computers. It spread when people shared floppy disks. After using the computer 50 times, it would show a short poem.

As computers became more common, more of these copying programs appeared. They affected many types of machines and operating systems.

Main article: History of antivirus software

Main articles: History of ransomware and History of malware

Further information: Timeline of computer viruses and worms and Malware research

Design

A computer virus has three main parts: the way it spreads, what it does, and when it starts.

The way it spreads is called the infection mechanism. Some viruses look for files to change, while others start when a file is opened.

The trigger decides when the virus will do its main actions. This can happen on a special date, after something specific happens, or when certain conditions are met.

The part that does the main actions is called the payload. These actions can include hurting files, taking information, or showing messages. Sometimes, the payload might just show a message without hurting anything. When the payload runs, it might make the computer go slower or stop working for a moment.

The life of a virus has four phases. In the dormant phase, the virus is there but not doing anything. It waits for a trigger. In the propagation phase, the virus makes copies of itself and spreads to other files or programs. In the triggering phase, the virus becomes active because of a special event. Finally, in the execution phase, the virus does its main actions, which could be from deleting files to showing messages on the screen.

Targets and replication

Computer viruses can affect many parts of a computer or its software. Some viruses live in programs you can run, like files ending in .EXE or .COM, while others hide in documents such as Microsoft Word files or PDF files. Some even attach to the very start part of a computer's hard drive, called the boot sector.

Certain viruses stay in your computer's memory all the time, from when you turn it on until you shut it down. These can change how the computer works when you try to use certain files. Other viruses scan your disks for files to change and then disappear after they're done. Some viruses hide in documents or emails that let small programs run automatically when you open them. This is why it's important not to open unexpected files or email attachments from people you don't know. These hidden programs can then affect your computer when you open the file.

Detection

Some viruses try to hide by changing how they look. For example, they might keep the same date on files or fit into empty spaces without making files bigger. But special software can still find them by checking for changes.

Sometimes a virus can trick antivirus software by showing clean versions of files. To find these hidden viruses, experts might start the computer using a safe disk and then check the files.

Modern antivirus programs look for patterns that viruses often use. But some viruses change their code each time they infect a new file, making them harder to spot. Even with these tricks, antivirus tools keep getting better to find and remove hidden threats.

Effects

Computer viruses can cause problems like making computers stop working or changing important information. They can also use up the computer's energy and cost more money to fix. Sometimes they might take private details, too.

Even though tools that help protect computers can't find every virus, experts keep working to make these tools better.

Some special programs, called power viruses, can make a computer work too hard and get too hot. Computers are built to handle some heat, but these programs might push it too far and damage the computer. These programs can be harmful, but they are also sometimes used by engineers to test new computers. Other programs that use a lot of computer power are used safely to test how fast a computer can go.

Infection vectors

Computers have safety features to stop unwanted changes, but viruses find ways around them. They often hide inside programs you use, like files that look like pictures but contain hidden code. When you open them, the hidden code runs.

Viruses spread in different ways. They can hide on devices like flash drives left in public places, hoping someone will use them. Most viruses target computers running Microsoft Windows because many people use it. They spread easily because many users have similar setups. Older viruses used floppy disks to move between computers. Today, viruses can also spread through emails or websites, tricking people into visiting harmful links.

Countermeasures

See also: Malware § Vulnerability to malware, Anti-malware, and Browser security § Browser hardening

Many people use special software called antivirus software to help protect their computers. This software can find and remove harmful programs. It’s important to keep this software updated because new harmful programs are created often.

To stay safe, update your computer regularly, be careful when browsing the internet, and only download software from trusted sources. Making copies of your important files can help you recover if something goes wrong.

Popular culture

The idea of a computer virus first appeared in a 1970 short story called The Scarred Man by Gregory Benford. The story described a program called VIRUS that moves from one computer to another through phone lines, trying to copy itself.

This idea showed up again in books and movies in the 1970s and 1980s. In 2016, a special collection named The Malware Museum of Art was made by Jussi Parikka. It lets people see how old computer viruses worked on home computers from the 1980s and 1990s. The collection is hosted at The Internet Archive and was created by Mikko Hyppönen from Helsinki, Finland.

Other malware

Main article: Malware

Sometimes people use the word "virus" to talk about many kinds of harmful software on computers. This software is called malware and includes things like computer "worms", ransomware, spyware, adware, trojan horses, and keyloggers. Most harmful software today is usually a type of program called a trojan horse or a worm, not a virus.

A real computer virus was named this way in 1985 by Fred Cohen. What makes a virus special is that it can copy itself by changing other programs on your computer without you knowing. Some viruses might try to do bad things, like taking up space on your computer or showing strange messages. But not all viruses try to hurt your computer right away—the main thing they all do is copy themselves into other programs without permission.

Related articles

This article is a child-friendly adaptation of the Wikipedia article on Computer virus, available under CC BY-SA 4.0.

Images from Wikimedia Commons. Tap any image to view credits and license.