Computer Security: Tell Malware and Online Threats Apart, and Match Each to Its Defence
Learn what computer security protects through the CIA triad, how a virus, worm, Trojan horse, ransomware, spyware, adware and keylogger differ, how phishing, vishing and smishing trick people, and which defence does which job: strong passwords, multi-factor authentication, antivirus, firewalls, encryption, HTTPS, VPNs, backups and updates. It ends with India's CERT-In and the IT Act, 2000.
By the end of this lesson you will be able to name the security goal a threat attacks, tell the kinds of malware apart, recognise phishing and its phone and text-message forms, and pick the defence that fits each threat. The core idea: computer security protects information and systems so that only authorised people can see the data, nobody can change it improperly, and it is there when it is needed. The threats below work against those three goals, and the defences protect them.
Short on time? Revise with the Computer Security cheat sheet
Already confident? Skip to practice: Computer Security quiz
Before this: the Networking lesson explains LANs and WANs, the networks a firewall stands between; the Internet and Email lesson introduces websites, email and HTTPS.
The three goals: confidentiality, integrity, availability
NIST (the US National Institute of Standards and Technology) defines information security as protecting information and systems "from unauthorized access, use, disclosure, disruption, modification, or destruction in order to provide confidentiality, integrity, and availability". Their initials give the CIA triad on the cheat sheet.
| Goal | NIST definition (FIPS 200) | Broken when … |
|---|---|---|
| Confidentiality | "preserving authorized restrictions on information access and disclosure" | someone reads data they are not allowed to see |
| Integrity | "guarding against improper information modification or destruction" | data is altered or destroyed without authority |
| Availability | "ensuring timely and reliable access to and use of information" | genuine users cannot reach the data or service |
Example 1: Which goal was hit?
Question: Match each incident with the goal it breaks. 1. A clerk opens salary records he is not permitted to see. 2. A student's marks are changed in the results database without authority. 3. A railway booking site is flooded with requests and genuine users cannot reach it. Goals: P. Integrity, Q. Availability, R. Confidentiality. (a) 1-P, 2-R, 3-Q (b) 1-Q, 2-P, 3-R (c) 1-R, 2-Q, 3-P (d) 1-R, 2-P, 3-Q
- Reading what you may not see is a breach of confidentiality: 1-R. Only (c) and (d) remain.
- An unauthorised change is a breach of integrity: 2-P. Only (d) remains.
- Check: genuine users locked out is a loss of availability, 3-Q.
Answer: (d) 1-R, 2-P, 3-Q.
Malware: software written to do harm
Malware is short for MALicious softWARE: in NCERT's words, software "developed with an intention to damage hardware devices, steal data, or cause any other trouble to the user". The types differ in two ways: how they spread and what they do once inside.
| Malware | How it spreads | What it does |
|---|---|---|
| Virus | copies its code into other programs (a host file), so it self-replicates, but only when a user opens or runs the infected file; until then it stays dormant | harms files, data and the computer's resources |
| Worm | a standalone program; needs no host and replicates on its own across a network | can spread to other computers by itself |
| Trojan horse | looks like legitimate software and tricks the user into installing it; does not self-replicate | once inside, it can do the same kind of damage as a virus or worm; some open a "backdoor" for attackers |
| Ransomware | (any of the routes below) | blocks access to the user's data, often by encrypting it, or threatens to publish it, and demands a ransom |
| Spyware | installed secretly | gathers information about the user without their knowledge and sends it to someone else |
| Adware | (any of the routes below) | shows unwanted advertisements to earn money for its maker; usually annoying, but its ads can carry unsafe links (NCERT) |
| Keylogger | software, or a hardware device (NCERT's example is a thin overlay placed on the keyboard) | records the keys a user presses, so passwords and private messages can be revealed |
| Rootkit | installed on a computer after an attacker gets in | changes the computer's normal working "in a malicious and stealthy way" (NIST), hiding the attacker's activity |
NCERT names some common routes malware takes: files downloaded from the Internet, attachments and links in spam email, infected removable storage such as pen drives, and, for worms, propagation across a network.
Against keyloggers, NCERT suggests an online virtual keyboard when signing in from an unknown computer: it shuffles the key layout each time it is used, so a keylogger cannot easily tell which keys were pressed.
Example 2: The false statement
Question: Which statement about malware is NOT true? (a) A virus is activated when the infected file is opened. (b) A Trojan horse copies itself into other files without any action by the user. (c) A worm can spread across a network without a host program. (d) Ransomware may encrypt a user's files and demand payment.
- (a), (c) and (d) match the table.
- NCERT says a Trojan "does not self-replicate or infect other files"; it spreads only when a user opens or installs it.
Answer: (b).
The principle: virus = needs a host; worm = needs nothing; Trojan = needs you to let it in.
Tricking people: social engineering and phishing
Not every attack breaks software; many trick the person instead. Social engineering is "an attempt to trick someone into revealing information (e.g., a password) that can be used to attack systems or networks" (NIST).
Phishing is a form of social engineering (CISA). NIST describes it as an attempt "to acquire sensitive data, such as bank account numbers, through a fraudulent solicitation in email or on a web site, in which the perpetrator masquerades as a legitimate business or reputable person." NCERT describes phishing by email spoofing: a forged sender address that looks like your bank's. Phishing through phone calls and text messages has its own names:
- Vishing (voice phishing) uses voice communication (CISA): a phone call.
- Smishing (SMS phishing) uses SMS, or text, messages (CISA).
Microsoft's warning signs include a link whose real destination differs from the text shown, a request for personal or financial details, a sender address with changed letters, and an unexpected message. If in doubt, contact the organisation through a channel you already know.
Example 3: Name the channel
Question: Rakesh gets a phone call from a man who says he is a bank officer and asks for his card PIN "to stop your account being blocked". What is this? (a) Smishing (b) Vishing (c) Spam (d) Denial of service
- It tricks a person into handing over a secret: social engineering. (d) attacks a service, and spam is bulk messaging, not a call aimed at one person.
- It arrives by voice, not SMS, so it is not (a).
Answer: (b) Vishing.
Attacks on networks and services
| Attack | What happens |
|---|---|
| Denial of service (DoS) | the attacker floods a website or other resource with illegitimate requests so genuine users cannot use it; an attack on availability |
| Distributed DoS (DDoS) | the flood comes from many compromised computers ("zombies", together a botnet) spread over a wide area, so blocking one source does not stop it |
| Snooping or sniffing | secretly capturing and analysing network traffic; unencrypted data is exposed |
| Man-in-the-middle | the attacker sits between two parties to intercept or alter what passes between them (NIST) |
NCERT calls a hacker who finds and helps fix security flaws a white hat (ethical hacker), and one who breaks the law to exploit them a black hat, or cracker.
Passwords and multi-factor authentication
Authentication is "verifying the identity of a user, process, or device" (NIST). A password is one such check, so make it hard to guess:
- Make it long. NIST: "Password length is a primary factor in characterizing password strength"; a passphrase of several words is often an effective way to make a password longer.
- NCERT advises mixing letters, digits and special characters, avoiding common words and names, and not using the same password on every website. NIST adds that length matters more than a forced mix: it tells services to require a minimum length but not to force a mix of character types, because people meet mixing rules in predictable ways, such as turning "password" into "Password1!".
- Never share a password or PIN with anyone (NCERT).
A strong password still fails against some attacks. NIST notes that keystroke logging, phishing and social engineering "are equally effective on lengthy and complex passwords as they are on simple ones". That is why multi-factor authentication (MFA) asks for factors of different kinds. NIST names three:
| Factor | Examples (NIST) |
|---|---|
| Something you know | password, PIN |
| Something you have | a token or device you hold |
| Something you are | a biometric, such as a fingerprint |
Two-factor authentication uses two of them, for example a password plus a code sent to a phone you hold. Microsoft puts the benefit simply: "Even if someone else finds your password, they'll be stopped if they don't have access to your security info."
Example 4: Two different factors
Question: Which login uses two DIFFERENT authentication factors? (a) A password and then a PIN (b) A password and then a security-question answer (c) A password and then a fingerprint scan (d) Two passwords, one after the other
- A password, a PIN and a security-question answer are all things you know; (a), (b) and (d) are one kind of factor used twice.
- A fingerprint is something you are, a second kind of factor.
Answer: (c).
The defences, one job each
Antivirus software
Antivirus (also called anti-malware) began as software to detect and remove viruses; NCERT says it now covers "the prevention, detection, and removal of a wide range of malware". It runs scans of your files, and real-time protection keeps it watching in the background. Its signature-based detection relies on a database of known malware signatures; with an outdated database it "is as good as having no antivirus software installed" (NCERT).
Firewall
A firewall is "a network security system designed to protect a trusted private network from unauthorised access or traffic originating from an untrusted outside network" (NCERT). It works as a filter: using predefined rules, it monitors and controls incoming and outgoing traffic. It can be hardware, software or both. A network firewall sits between networks; a host-based firewall, such as Windows Firewall, protects one computer.
What a firewall does not do (CISA): "Firewalls primarily help protect against malicious traffic, not against malicious programs (i.e., malware)", and they "do not guarantee that your computer will not be attacked". Removing malware already on the disk is the antivirus's job.
Encryption
Encryption turns readable data, called plain text, into an unreadable form, called cipher text, using an algorithm and a key; decryption restores the original (NIST). It protects confidentiality: NIST names encryption as a technique for preventing "compromise of data to unauthorized entities". Do not confuse it with compression, which makes files smaller so they take less storage and transfer faster (Microsoft) but does not hide them.
Example 5: Before, after and back again
Question: Data before encryption, the scrambled data after it, and the process that turns the scrambled data back, are called, in order: (a) cipher text, plain text, decryption (b) plain text, cipher text, compression (c) cipher text, plain text, encoding (d) plain text, cipher text, decryption
- Encryption starts from readable plain text: (a) and (c) are out.
- It produces cipher text, and the reverse is decryption; compression only shrinks data.
Answer: (d).
HTTPS and the padlock
As the Internet and Email lesson explains, HTTPS (Hypertext Transfer Protocol Secure) encrypts data before it is sent, which plain HTTP does not (NCERT). Check for https:// and the lock in the address bar before paying online. But the lock describes the connection, not the site's honesty: Microsoft warns that "even websites with valid certificates may have a poor reputation", so also check that the address is the site you meant.
VPN (Virtual Private Network)
A VPN is a private, restricted-use network built on top of a public network such as the Internet, "often by using encryption" and by "tunneling" its links across the real network (NIST). Microsoft notes that a VPN "can help provide a more secure connection and access to your company's network and the internet", for example "when you're working from a coffee shop or similar public place". So on public Wi-Fi, where NCERT advises against entering sensitive data, a VPN helps protect the data your device sends.
Digital signatures
A digital signature shows who signed an electronic document and whether it was altered afterwards: NIST lists "origin authentication, data integrity, and signatory non-repudiation" (the signer cannot easily deny signing). NIST explains that the signer's private key creates it and the matching public key verifies it; section 3 of the IT Act, 2000 likewise lets anyone verify a signed record with the signer's public key.
Example 6: What a signature does not give
Question: A digital signature on an emailed PDF does NOT provide which of these? (a) Proof of who signed it (b) Detection of any change made after signing (c) Secrecy of its contents from other readers (d) Difficulty for the signer in denying the signature later
- NIST lists origin authentication (a), data integrity (b) and non-repudiation (d).
- NIST also states that digital signatures provide authenticity, integrity and non-repudiation "but not confidentiality". Secrecy needs encryption.
Answer: (c).
Backups
A backup is "a copy of files and programs made to facilitate recovery" (NIST). It lets you get the data back: if ransomware or another loss strikes, the files can be restored from the copy. NCERT lists regular backup of important data among its first defences. Microsoft's advice to ransomware victims is not to pay: "there is no guarantee that you'll regain access to your PC or files."
Updates and patches
A patch is a "repair job" for a piece of software, a fix supplied by its maker (NIST). Updates carry such security fixes, which is why NCERT tells users to apply "software updates and patches released by its manufacturers", and to update the browser and other applications too.
Example 7: Match the threat to the defence
Question: Match each problem with its defence. 1. Ransomware has encrypted an office PC's files. 2. A password was stolen by phishing. 3. Internet traffic must be kept away from a school's finance server. 4. A traveller must send office data over hotel Wi-Fi. Defences: P. Firewall, Q. VPN, R. Restore from a backup, S. Multi-factor authentication. (a) 1-R, 2-Q, 3-P, 4-S (b) 1-S, 2-R, 3-P, 4-Q (c) 1-R, 2-S, 3-P, 4-Q (d) 1-P, 2-S, 3-R, 4-Q
- Encrypted files come back from a backup: 1-R. Only (a) and (c) remain.
- A stolen password alone fails against MFA: 2-S. Only (c) remains.
- Check (c): the firewall filters traffic into a network, 3-P; the VPN protects data over a public network, 4-Q.
Answer: (c).
Safe practice online
Beyond the defences above, NCERT advises: avoid pirated software; do not open links or attachments in unsolicited email; scan pen drives before using them; avoid typing passwords and PINs on public computers or public Wi-Fi; and never install a "security" program offered in a pop-up or advertisement.
India: CERT-In and the IT Act, 2000
CERT-In (the Indian Computer Emergency Response Team) is part of the Ministry of Electronics and Information Technology (MeitY). Its website describes it as "the national nodal agency for responding to computer security incidents as and when they occur", operational since January 2004. Section 70B of the IT Act, as amended in 2008, makes it the national agency for collecting information on cyber incidents, issuing alerts, coordinating incident response, and issuing guidelines, advisories and vulnerability notes.
The Information Technology Act, 2000 (Act No. 21 of 2000) is India's law on electronic records and cyber offences. Its preamble says it provides legal recognition for transactions carried out by electronic communication ("electronic commerce") and facilitates electronic filing of documents with government agencies. Its chapter titled "Electronic Governance" gives legal recognition to electronic records and electronic signatures, and its chapter on offences, as amended in 2008, includes punishments for identity theft (section 66C) and for cheating by personation using a computer resource (section 66D). The Information Technology (Amendment) Act, 2008 brought in the broader term "electronic signature", which the Act defines to include digital signatures.
Look-alikes: telling them apart
| Pair | The difference |
|---|---|
| Virus vs worm | both copy themselves; a virus needs a host file and a user to open it, while a worm is standalone and spreads itself over a network |
| Worm vs Trojan horse | a worm replicates itself; a Trojan does not, but poses as useful software so you install it |
| Spyware vs keylogger | spyware gathers information about you in general; a keylogger records keystrokes, and can be a hardware device |
| Phishing vs spam | phishing poses as a trusted sender to steal your details; spam is unwanted bulk messaging, often advertising |
| Phishing vs vishing vs smishing | email or fake website vs voice call vs SMS |
| Firewall vs antivirus | a firewall filters network traffic; antivirus detects and removes malware on the computer |
| Encryption vs compression | encryption hides data and needs a key to undo; compression shrinks data and hides nothing |
In the exam
Computer Knowledge is a named module in SSC CGL Tier-II and SSC CHSL, and part of General Awareness in RRB NTPC. Security questions come in a few shapes:
- "Which malware …?" How to spot it: find the clue. Attaches to a file is a virus; spreads by itself a worm; disguised as useful software a Trojan; demands payment ransomware; records keystrokes a keylogger; shows advertisements adware; gathers information secretly spyware.
- "Which defence or attack is this?" How to spot it: controls traffic is a firewall; removes malware antivirus; coded form encryption; code sent to your phone two-factor authentication; public Wi-Fi a VPN; fake email or website phishing; flooded denial of service.
- "What does it stand for, or which law?" How to spot it: VPN = Virtual Private Network; HTTPS = Hypertext Transfer Protocol Secure; CERT-In = Indian Computer Emergency Response Team; the Act for e-governance and cyber offences = the Information Technology Act, 2000.
Common mistakes
- Saying a firewall removes viruses. It filters traffic; antivirus removes malware.
- Saying a Trojan replicates. It does not; it gets in by looking useful.
- Trusting the padlock as proof the site is genuine. It shows only that the connection is encrypted.
- Counting a password and a PIN as two factors. Both are something you know.
- Calling every unwanted email phishing. Spam is unwanted bulk mail; phishing poses as a trusted sender to steal details.
At a glance
- CIA triad: confidentiality (no unauthorised reading), integrity (no improper change), availability (there when needed).
- Virus needs a host; worm spreads alone; Trojan poses as useful; ransomware locks or encrypts and demands payment; spyware gathers secretly; adware shows ads; keylogger records keys; rootkit hides the attacker.
- Phishing = fake email or site; vishing = voice; smishing = SMS.
- DoS floods a service; DDoS uses many zombie computers.
- Passwords: long, unique, never shared. MFA: know + have + are.
- Antivirus removes malware; firewall filters traffic; encryption plain text → cipher text; VPN private network over a public one; digital signature signer + integrity, not secrecy; backup restores; patch fixes.
- CERT-In (MeitY; IT Act section 70B) responds to cyber incidents; IT Act, 2000 covers e-governance and cyber offences.
Next
This is the last lesson in the Basic Computer series. To revise, go back to the start with the Computer Fundamentals lesson, or browse every topic and quiz under Basic Computer.
Ready to test this lesson? Take the Computer Security quiz
How this was made: Drafted with AI assistance; every answer re-solved by a separate check that had not seen the key; every fact checked against the source it cites.