Computer viruses and ways of protection
A computer virus is a harmful program that copies itself and spreads into other files. The general name is malware. Kinds: a virus attaches to files to spread; a worm spreads by itself through a network without attaching to a file; a trojan enters disguised as a useful program and steals data or takes control; spyware watches your passwords, messages and actions; ransomware encrypts files and demands money to open them; adware shows unwanted advertisements. History: in 1949–1951 John von Neumann developed the theory of self-reproducing machines; in 1971 the experimental program “Creeper” appeared on a network; in 1982 “Elk Cloner” for the Apple II became the first widespread personal computer virus; in 1986 the “Brain” virus appeared for the IBM PC. Ways of spreading: e-mail attachments and links, an infected flash drive, fake or “cracked” programs, suspicious sites, untrustworthy mobile apps, unprotected Wi-Fi and networks. Signs of infection: unexpected messages, windows and ads; the computer slowing down or freezing; unknown programs starting; files disappearing or changing extension; the antivirus switching off; strange activity in accounts. Antivirus methods: searching by signature (the “signature” of known viruses is in a database); heuristic analysis (a suspicious structure); behaviour monitoring (watching what a program does); an integrity checker (auditor) stores the checksums of files in advance and detects changes. The “detector, doctor, auditor, filter” division in older textbooks is now combined in one product. Protection rules: (1) keep the operating system and programs updated; (2) use a trusted antivirus (the Microsoft Defender built into Windows gives a good base too) and let its database update automatically; (3) download programs only from the official site or official store and avoid unlicensed “cracked” programs; (4) do not open unknown attachments and links; (5) scan a flash drive first and switch off autorun; (6) back up important files – the best defence against ransomware; (7) do not give apps unnecessary permissions. If infected: disconnect from the network, run a full scan, change passwords from another clean device, do not pay the ransom and contact an adult or an expert. Ethics: writing and spreading viruses is a crime; studying malware is done only under a teacher's supervision in an isolated environment.
| Kind | How it works |
|---|---|
| virus | attaches to files to spread |
| worm | spreads by itself through a network |
| trojan | enters disguised as a useful program |
| spyware | watches passwords and actions |
| ransomware | encrypts files and demands money |
| adware | shows unwanted ads |
A shopkeeper recognises a forged banknote by its known marks, but may not notice a new type of forgery until its marks are known. An antivirus also recognises known malware by its traces, which is why its database must be kept up to date. If protection is not updated, it is weak against a new threat.
Shopkeepers, bank cashiers and antivirus analysts detect forgeries by known marks and keep learning new ones.
Write a six-digit number and add up its digits; change one digit and check whether the sum changes. What happens if two digits swap places?
1import hashlib 2a = hashlib.sha256("salom".encode()).hexdigest()[:16] 3b = hashlib.sha256("Salom".encode()).hexdigest()[:16] 4print(a) 5print(b) 6print(a == b)
038f270ca678c66f 441f71d48aacacdc False
“Path of a virus”: draw an invented infection event (for example through a flash drive) step by step: where it came in, how it spread, which signs appeared and which protective measures would have stopped it. Do not download or try a real virus.