Computer Science: Class 12 — Chapter 12: Security Aspects

12.1 Threats and Prevention

Network security is concerned with the protection of our devices as well as data from illegitimate access or misuse. A computer with no link to an external device or network is free from security threats, but in a fully connected world, staying aloof is not a practical solution. Threats include all the ways in which an attacker can exploit any vulnerability or weakness in a network or communication system to cause harm or damage reputation.

Core Computer Science Concept Technical Definition / Operational State Structural Parameters & Specifications Computational Function & System Purpose
Network Security Protection of devices and data from unauthorized access, modification, or destruction. Encompasses confidentiality, integrity, and availability (CIA triad) across network nodes. To mitigate vulnerabilities and prevent unauthorized exploitation of communication systems.
12.2 Malware

Malware (Malicious Software) is any software developed with the intention to damage hardware devices, steal data, or cause disruption to the user. Common types include viruses, worms, ransomware, trojans, spyware, adware, and keyloggers.

12.2.1 Virus

A computer virus is a piece of software code created to perform malicious activities and hamper system resources (CPU time, memory, files). Coined by Fred Cohen in 1985, it mimics biological viruses by spreading on contact (copying its code into other executable files). It remains dormant until the infected file is executed by a user.

Examples: CryptoLocker , ILOVEYOU , MyDoom , Sasser , Netsky , Slammer , Stuxnet .

12.2.2 Worms

A worm is a standalone malware program that replicates on its own and spreads to other computers through the network without needing a host program or human triggering.

Examples: Storm Worm , Sobig , MSBlast , Code Red , Nimda , Morris Worm .

12.2.3 Ransomware

A type of malware that targets user data by blocking access or encrypting files, demanding a ransom payment (often in cryptocurrency like Bitcoin) to restore access.

In May 2017, the WannaCry ransomware infected almost 200,000 computers across 150 countries, demanding ransom payments in Bitcoin.


Socio-Technical Analysis & Core Systemic Impact: WannaCry exploited a vulnerability in the Windows SMB protocol. It demonstrated how critical infrastructure (including hospitals and transport networks) can be paralyzed globally by automated, self-propagating ransomware payloads combined with cryptographic locking mechanisms.

12.2.4 Trojan

A Trojan is a malware that masquerades as legitimate software. Once installed, it performs malicious actions (like creating backdoors for unauthorized access) but does not self-replicate.

12.2.5 Spyware

A type of malware that spies on users or organizations by gathering information (internet usage, credit card details, login credentials) without their knowledge or consent and sending it to external entities.

12.2.6 Adware

Malware designed to generate revenue for its developer by displaying unwanted online advertisements (pop-ups, web pages) or using "pay per click" mechanisms.

12.2.7 Keyloggers

A keylogger (software or hardware) records keystrokes pressed by a user to steal sensitive information like passwords and private conversations.

Online Virtual Keyboard vs. On-Screen Keyboard:

  • On-Screen Keyboard : Uses a fixed QWERTY layout which can be exploited by sophisticated keyloggers.
  • Online Virtual Keyboard : Randomizes the key layout every time it is used, making it highly secure against keyloggers.
12.2.8 Modes of Malware Distribution
  • Downloaded from the Internet: Unintentional downloads disguised as free software.
  • Spam Email: Unsolicited emails containing malicious links or attachments.
  • Removable Storage Devices: Infected pen drives, SSD cards, or mobile phones.
  • Network Propagation: Self-propagating malware (like worms) moving across network connections.
12.2.9 Combating Malware

Common signs of infection include frequent pop-ups, changes to browser homepage, mass emails sent without consent, unusually slow performance, and files disappearing.

Preventive measures: regular antivirus updates, configuring browser security, checking for HTTPS lock icons, using FOSS, backing up data, and avoiding suspicious links.

12.3 Antivirus

An antivirus (or anti-malware) is software designed to prevent, detect, and remove a wide range of malicious software.

Technical Profile: Antivirus Software

  • Architecture Layer / Tier: System Application / Security Layer
  • Operational Mechanics & Syntax: Scans files and memory using signature databases, sandboxing, heuristics, and real-time monitoring.
  • System Trade-offs & Failures: High CPU/memory overhead during deep scans; potential for false positives; fails to detect zero-day exploits if signature databases (VDF) are outdated.
12.3.1 Methods of Malware Identification
  • Signature-based detection: Compares files against a database of known virus signatures (Virus Definition File - VDF). Fails against polymorphic or encrypted malware.
  • Sandbox detection: Executes files in a secure, isolated virtual environment to observe behavioral fingerprints.
  • Data mining techniques: Uses machine learning to classify file behavior as benign or malicious.
  • Heuristics: Compares source code patterns of suspected programs against known virus structures in a heuristic database.
  • Real-time protection: Continuously monitors active memory and background processes for suspicious activities.
12.4 Spam

Spam refers to unsolicited, unwanted digital messages (primarily email spam) sent in bulk to advertise, phish, or distribute malware. Modern email services use automatic spam filtering algorithms to detect and isolate these messages.

12.5 HTTP vs HTTPS

Both are protocols governing data transmission over the World Wide Web:

12.6 Firewall

A firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predefined security rules, acting as a barrier between a trusted internal network and untrusted external networks.

Technical Profile: Firewall

  • Architecture Layer / Tier: Network / Transport Layer (Hardware or Software)
  • Operational Mechanics & Syntax: Packet filtering, stateful inspection, and rule-based access control lists (ACLs).
  • System Trade-offs & Failures: Can cause network latency; misconfigured rules can block legitimate traffic or leave security gaps.
12.6.1 Types of Firewall
  • Network Firewall: Placed between two or more networks to monitor traffic between them.
  • Host-based Firewall: Installed on an individual computer to monitor traffic to and from that specific device.
12.7 Cookies

A cookie is a small \text file or data packet stored by a website on the client's computer to track browsing information, maintain sessions, and store user preferences (like shopping carts or login states).

12.7.1 Threats due to Cookies

While generally harmless, cookies can be exploited:

  • Supercookies : Track users persistently across different sites.
  • Zombie cookies : Recreate themselves automatically after deletion.
  • Third-party cookies: Used by advertisers to track user behavior across multiple websites without explicit consent.
12.8 Hackers and Crackers

Individuals with deep technical knowledge of computer systems, networks, and programming who find loopholes and vulnerabilities.

12.8.1 White Hats: Ethical Hacker

Security experts who use their skills ethically to find and fix security flaws, helping organizations secure their systems.

12.8.2 Black Hats: Crackers

Individuals who maliciously and unethically exploit system vulnerabilities to break laws, steal data, or disrupt services.

12.8.3 Grey Hats

Neutral hackers who exploit vulnerabilities for fun or challenge without malicious intent or financial gain, often disclosing flaws to owners without authorization.

12.9 Network Security Threats
12.9.1 Denial of Service (DoS) & DDoS

A Denial of Service (DoS) attack overloads a target resource (like a web server) with illegitimate requests, making it unavailable to legitimate users.

A Distributed Denial of Service (DDoS) attack is a variant where the flooding requests originate from multiple compromised systems ( Zombies ) distributed globally, controlled collectively as a Bot-Net .

12.9.2 Intrusion Problems

Unauthorized activities on a network that threaten security and data integrity:

  • Asymmetric Routing: Sending intrusion packets through multiple network paths to bypass intrusion detection sensors.
  • Buffer Overflow Attacks: Overwriting memory areas with malicious code to execute unauthorized commands or crash systems.
  • Traffic Flooding: Overwhelming intrusion detection systems with massive packet volumes to slip through undetected.
12.9.3 Snooping

Snooping (or Sniffing) is the secret capture and analysis of network traffic. Network administrators use it for troubleshooting, but attackers use it to intercept unencrypted data.

12.9.4 Eavesdropping

Eavesdropping is the unauthorized, real-time interception of private communications (like VoIP calls, video conferences, or instant messages) over a network.

Difference: Eavesdropping occurs in real-time, whereas snooping involves capturing and storing traffic for later analysis.