Article
Malware: viruses, ransomware and keyloggers
You find a free copy of a game that normally costs money. You download it, run it, and the game works. But in the background, a second program is also running. It copies what you type, including the password for your email. The word for this kind of program is malware.
What malware is
Malware (short for "malicious software") is software made to damage a computer, steal data, or take control of a computer. Malware has many kinds. Each kind does something different.
| Kind | What it does |
|---|---|
| Virus | Attaches itself to other programs and copies itself |
| Worm | Spreads by itself from one computer to another over a network |
| Ransomware | Locks your files and demands money to unlock them |
| Spyware | Secretly watches what you do and sends it to the attacker |
| Keylogger | A kind of spyware that records the keys you press, so passwords can be stolen |
| Trojan | A program that pretends to be useful (a free game, a "fix") but hides something harmful |
Keylogging means recording every key pressed on a keyboard. Whatever you type, including usernames and passwords, can then be read by the attacker.
Check your understanding
What is malware?
How a computer virus works
A computer virus is a malicious program that attaches itself to a legitimate program and makes copies of itself. It is named after a biological virus, which also needs a host and spreads by copying.
How a virus spreads
A program is infected
The virus is hidden inside a program that looks normal.
you run itThe virus runs too
Often without your permission or knowledge.
it copies itselfOther programs are infected
It attaches itself to more programs and files.
you share a fileAnother computer is infected
The cycle starts again.
A worm does not wait for you. It finds other computers on the network and copies itself there. This is why a worm can spread very fast.
How malware gets in
Most malware needs a way in. The usual ways are:
- Downloads from untrusted sources, such as a "free" copy of a paid program or a file from an unknown site.
- Email attachments and links from people you do not know, or messages that are a phishing trick.
- Unpatched software. A security hole is a mistake in a program that an attacker can use. The company that made the program fixes it in an update (also called a patch). If you do not install the update, the hole stays open.
- USB sticks from unknown places. If you plug one in and open a file on it, malware can start.
Many of these depend on a person's choice: clicking, downloading, plugging in. Remember that human error is often the weakest point.
Check your understanding
Why are regular software updates (patches) important for protection against malware?
Protection
Protecting a computer from malware
Keep software updated
- install updates and patches
- they fix security holes
- turn on automatic updates
Use security software
- antivirus scans files for malware
- a firewall filters network traffic
- keep both switched on and updated
Be careful
- download only from trusted sources
- do not open unexpected attachments
- do not use unknown USB sticks
Keep backups
- copy your files to a separate place
- backups beat ransomware
- test that you can restore
- Antivirus software scans files and programs, compares them with the signs of known malware, and blocks or removes what it finds. It must be kept updated, because new malware appears all the time. It can miss very new malware.
- A firewall is software or a device that watches the data coming into and going out of a computer or network, and blocks what the rules do not allow. Antivirus checks files. A firewall checks network traffic.
- Backups are copies of your files kept in a separate place. If ransomware locks your files, you can wipe the computer and restore your files from the backup. Paying the attacker is not a good plan: there is no promise that the files will come back. A backup that stays plugged in can be locked as well, so keep one that is separate.
Worked example
Mia's school laptop suddenly shows: "Your files are locked. Pay in 24 hours to get them back."
- Which type? Locking files and demanding money is ransomware.
- How might it have arrived? Mia opened an attachment from an unknown address. That is human error.
- What is the best step now? She disconnects the laptop from the network, tells her teacher, and does not pay.
- What would have helped? A recent backup on a separate drive, and not opening the attachment.
Common mistakes
- "Antivirus makes me safe from everything." It cannot catch everything. Careful habits still matter.
- "A virus and a worm are the same." A virus attaches to a program and needs it to run. A worm spreads by itself.
- "Updates only add new features." Many updates fix security holes.
- "Only strangers' files are dangerous." A friend's computer may be infected and send you a file without knowing.
- "I will pay, then I will get my files." There is no guarantee.
On the exam
Typical questions give a short story and ask "Which type of malware is this?" or "Which action would best protect the computer?". For a computer virus, remember: it attaches to legitimate programs and copies itself. For protection, think updates, antivirus and firewall, trusted downloads, and backups. Look for the answer that closes the gap in the story.
Key words
Malware: software made to damage a computer, steal data or take control.
Computer virus: a malicious program that attaches itself to legitimate programs and copies itself.
Keylogging: recording the keys a person presses, to steal passwords and other data.
Ransomware: malware that locks files and asks for money.
Antivirus software: software that scans for and removes malware.
Firewall: software or a device that filters network traffic using rules.
Patch (update): a fix that closes a security hole in a program.