After this chapter you will be able to
- explain the CIA triad and basic security terms
- classify malware and recall famous examples
- recognise common cyber attacks and frauds
- explain defences: antivirus, firewall, encryption, digital signatures, 2FA
- recall key provisions of India’s IT Act and cyber-security bodies
31.1 What Is Cyber Security?
Cyber security is the protection of computers, networks, programs and data from unauthorised access, attack, damage or theft.
The CIA Triad
| Goal | Meaning | Example control |
|---|---|---|
| Confidentiality | Only authorised people can see data | Passwords, encryption |
| Integrity | Data is accurate and not altered secretly | Hashing, digital signatures |
| Availability | Data and systems are available when needed | Backups, DDoS protection |
Also important: Authentication (proving identity), Authorisation (what you may do), Non-repudiation (sender cannot deny sending — digital signatures), Accountability (logs, audit trails).
Data security is the protection of data from accidental or intentional disclosure to unauthorised people, and from unauthorised change or destruction.
| Term | Meaning |
|---|---|
| Threat | Possible danger (e.g., a hacker, malware) |
| Vulnerability | Weakness that can be exploited (e.g., unpatched software) |
| Exploit | Code or method that uses a vulnerability |
| Risk | Chance of loss = threat × vulnerability |
| Attack | Actual attempt to harm a system |
| Zero-day | A flaw unknown to the maker, with no patch yet |
| Impact | The degree of harm a threat could cause if it succeeds |
31.2 Malware (Malicious Software)
- Virus — needs a host file (e.g., Brain)
- Worm — spreads alone over networks
- Trojan horse
- Rootkit
- Backdoor
- Spyware (e.g., Pegasus)
- Keylogger
- Adware
- Ransomware (e.g., WannaCry)
- Scareware
- Bot / botnet (zombies)
- RAT
- Logic bomb / time bomb
| Malware | How it works | Key point / example |
|---|---|---|
| Virus | Attaches to a host file/program; spreads when the infected file is run or shared | Needs human action; e.g., Brain (1986), Michelangelo, CIH/Chernobyl |
| Worm | Self-replicating; spreads across networks on its own — no host file needed | Uses bandwidth; e.g., Morris Worm (1988), ILOVEYOU (2000), Code Red, Stuxnet (2010) |
| Trojan horse | Looks like useful software but does something harmful; does not replicate | Opens backdoors, steals data; e.g., Zeus (banking Trojan) |
| Ransomware | Encrypts files and demands ransom (often in cryptocurrency) | CryptoLocker (2013), WannaCry (May 2017), Petya/NotPetya; AIIMS Delhi attack (2022) |
| Spyware | Secretly monitors user activity and sends it out | Pegasus (NSO Group) |
| Keylogger | Records keystrokes to capture passwords | Hardware or software |
| Adware | Shows unwanted advertisements | Pop-ups, redirects |
| Rootkit | Hides deep in the OS to give an attacker hidden admin control | Hard to detect |
| Backdoor | Secret way to bypass normal login | Often installed by Trojans |
| Bot / Botnet | Infected computers (zombies) controlled remotely as a group | Used for DDoS and spam |
| Logic bomb / time bomb | Triggers on a condition or date; does not replicate (also called slag code) | “Friday the 13th”; CIH triggered on 26 April |
| Scareware | Fake warnings to scare users into buying/installing | Fake “your PC is infected” pop-ups |
| Spam bot / RAT | Sends spam / Remote Access Trojan for full control | — |
| Cryptojacking | Secretly uses your computer to mine cryptocurrency | Slows the system |
| Fileless malware | Runs in memory using legitimate tools; leaves few files | Hard to detect |
Virus Types
| Type | Infects / behaviour |
|---|---|
| Boot-sector virus | Boot sector / MBR — loads before the OS (Brain, Stoned, Monkey, Form) |
| File-infector virus (parasitic virus) | Executable files (.exe, .com); once the infected program runs, it infects other EXE files (e.g., Cascade) |
| Macro virus | Documents with macros (Word, Excel) — Melissa (1999), Concept |
| Polymorphic virus | Changes its code each time it infects, to avoid detection |
| Metamorphic virus | Rewrites itself completely |
| Stealth virus | Hides its changes from antivirus |
| Multipartite virus | Infects both boot sector and files (e.g., Flip) |
| Resident virus (memory-resident) | Loads into RAM and stays active, infecting files that run or open while it is loaded (e.g., Jerusalem) |
| Non-resident virus | Runs, infects its targets, then leaves memory; it does not stay in RAM |
| Direct-action virus | Acts when the infected file is run, then exits; infects files in folders on the AUTOEXEC.BAT path (e.g., Vienna) |
| Browser hijacker | Changes browser homepage/search without consent (e.g., Babylon Toolbar, Conduit Search) |
| Overwrite virus | Deletes the data inside the files it infects, making them useless |
| File-system virus (cluster / FAT / directory) | Attacks the directory and FAT entries that tell the OS where files are stored |
| Web-scripting virus | Attacks web-browser security through malicious scripts |
| Retrovirus | Targets and disables antivirus software |
| Cavity (spacefiller) virus | Fills unused space inside a file so its size does not change, which makes it hard to detect |
Virus vs Worm vs Trojan
| Feature | Virus | Worm | Trojan |
|---|---|---|---|
| Needs host file | Yes | No | No (disguised as a program) |
| Self-replicates | Yes | Yes, by itself | No |
| Needs user action | Yes (run file) | No | Yes (user installs it) |
| Spreads through | Files, drives, email attachments | Networks, vulnerabilities | Downloads, fake apps |
| Main harm | Corrupts files | Consumes network/resources | Theft, backdoor |
Trojan types: backdoor, downloader, rootkit, banking, DDoS-bot and ransomware Trojans. Some exam books group the Trojan horse under ‘virus attacks’, but strictly a Trojan does not self-replicate, so it is malware rather than a virus.
Malware History
| Year | Event |
|---|---|
| 1971 | Creeper (Bob Thomas) — first self-replicating program on ARPANET (“I’m the creeper, catch me if you can”); Reaper was made to delete it — the first antivirus-like program |
| 1982 | Elk Cloner — first microcomputer virus in the wild (Apple II) |
| 1983 | Fred Cohen defined “computer virus” (term suggested by Len Adleman) |
| 1986 | Brain — first PC (MS-DOS) virus, a boot-sector virus by the Alvi brothers of Lahore |
| 1987 | First antivirus programs appear, such as McAfee VirusScan |
| 1988 | Morris Worm — first major internet worm |
| 1989 | AIDS Trojan (also called PC Cyborg) — first known ransomware; created by Joseph L. Popp |
| 1992 | Michelangelo — boot-sector virus set to trigger on 6 March 1992; could destroy hard-disk data |
| 1999–2000 | Melissa (macro), ILOVEYOU (email worm, Philippines) |
| 2001 | Code Red worm (15 July) — attacked Microsoft IIS web servers |
| 2003 | SQL Slammer (fast worm that hit Microsoft SQL Server) and Blaster (exploited a Windows RPC flaw) |
| 2004 | Sasser — worm that spread through Windows networks and crashed systems |
| 2010 | Stuxnet — attacked industrial control systems |
| 2017 | WannaCry ransomware — hit 150+ countries |
⚠ COMMON CONFUSION — “First virus”: Creeper (1971) = first self-replicating program; Elk Cloner (1982) = first virus on personal computers in the wild; Brain (1986) = first IBM-PC/MS-DOS virus. Read the question carefully.
Signs of infection: slow computer, frequent crashes, unexpected restarts, unknown pop-ups, missing/renamed files, programs opening by themselves, unusual network activity, disabled antivirus.