Lesson
19 of 26
Translate

Cybersecurity & VPN

Zero Trust, DDoS, Ransomware, Phishing, SQL Injection, VPN, firewalls, encryption, and cyber threats for UPSSSC AGTA.

What is Cybersecurity?

Cybersecurity is the practice of protecting computers, networks, programs, and data from unauthorized access, attacks, or damage.

flowchart TD
CIA((CIA Triad))
CIA --> C["🔒 Confidentiality<br/>Only authorized access"]
CIA --> I["✅ Integrity<br/>Data not altered"]
CIA --> A["🌐 Availability<br/>Systems accessible when needed"]
CIA Triad — Foundation of Cybersecurity

CIA Triad — Foundation of Security

PrincipleMeaningExample
ConfidentialityOnly authorized users can access dataEncryption, passwords
IntegrityData is not altered without authorizationHashing, checksums
AvailabilitySystems are accessible when neededBackups, redundancy

Types of Cyber Attacks

Social Engineering Attacks

AttackDescription
PhishingFake emails/websites to steal credentials
Spear PhishingTargeted phishing aimed at specific individuals
WhalingPhishing targeting senior executives (CEO, CFO)
VishingVoice phishing (phone calls)
SmishingSMS phishing (text messages)
BaitingLeaving infected USB drives for victims to pick up
PretextingCreating false scenario to extract information

Network Attacks

AttackDescription
DDoSDistributed Denial of Service — floods server with traffic to make it unavailable
DoSSingle source overwhelming a server
Man-in-the-Middle (MITM)Attacker intercepts communication between two parties
SQL InjectionInserting malicious SQL code to exploit databases
XSS (Cross-Site Scripting)Injecting malicious scripts into web pages
Brute ForceTrying all possible password combinations
SpoofingFaking identity (IP, email, DNS spoofing)

Malware Types

Malware (Malicious Software) is any software designed to harm or exploit computers.

TypeBehavior
VirusAttaches to files, spreads when file is opened, needs host program
WormSelf-replicates across networks without host program
TrojanDisguised as legitimate software, creates backdoor
RansomwareEncrypts victim’s files, demands payment to decrypt (e.g., WannaCry)
SpywareSecretly monitors user activity
AdwareDisplays unwanted advertisements
RootkitHides deep in OS, gives attacker root/admin access
KeyloggerRecords keystrokes to steal passwords
Logic BombActivates on a specific condition/date
BotnetNetwork of infected computers controlled by attacker (for DDoS)

Key difference: Virus needs a host file; Worm spreads independently. Trojan doesn’t replicate — it opens a backdoor.

flowchart TD
M["🦠 Malware"]
M --> V["Virus<br/>(Needs host file)"]
M --> W["Worm<br/>(Self-replicates<br/>via network)"]
M --> T["Trojan<br/>(Disguised,<br/>opens backdoor)"]
M --> R["Ransomware<br/>(Encrypts files,<br/>demands payment)"]
M --> S["Spyware<br/>(Monitors<br/>user activity)"]
M --> K["Keylogger<br/>(Records<br/>keystrokes)"]
Types of Malware

Zero Trust Security Model

Zero Trust = “Never trust, always verify”

  • No device or user is trusted by default, even inside the network
  • Every access request is authenticated and authorized
  • Principle of Least Privilege — give minimum access needed
  • Micro-segmentation — divide network into small zones
  • Continuously monitors and validates users

Traditional security trusts everything inside the firewall. Zero Trust trusts nothing.


VPN (Virtual Private Network)

A VPN creates an encrypted tunnel between your device and a remote server, making your internet connection private and secure.

How VPN Works

sequenceDiagram
participant You as Your Device
participant VPN as VPN Server
participant Web as Internet/Website

You->>VPN: 1. Encrypted data via tunnel
VPN->>Web: 2. Decrypted request forwarded
Web-->>VPN: 3. Response received
VPN-->>You: 4. Re-encrypted response via tunnel
How a VPN Works
  1. Your data is encrypted before leaving your device
  2. Encrypted data travels through a secure tunnel to the VPN server
  3. VPN server decrypts and forwards your request to the internet
  4. Response follows the same encrypted path back

Types of VPN

TypeUse
Remote Access VPNIndividual connects to company network from home
Site-to-Site VPNConnects two office networks permanently

VPN Tunneling Protocols

ProtocolDetails
PPTPPoint-to-Point Tunneling Protocol — fast but weak security
L2TP/IPSecLayer 2 Tunneling + IPSec encryption — more secure
OpenVPNOpen-source, strong security, widely used
WireGuardNewest, fastest, simplest code

Firewalls

A Firewall monitors and controls incoming/outgoing network traffic based on security rules. It acts as a barrier between trusted and untrusted networks.

TypeFunction
Packet FilteringChecks packet headers (IP, port) — basic
Stateful InspectionTracks active connections — more intelligent
Proxy FirewallActs as intermediary, hides internal network
Next-Gen (NGFW)Deep packet inspection, application awareness, IPS

Encryption & Cryptography

Encryption converts readable data (plaintext) into unreadable form (ciphertext) using a key.

sequenceDiagram
participant A as Alice (Sender)
participant B as Bob (Receiver)

Note over A,B: Asymmetric Encryption (RSA)
A->>A: Encrypt with Bob's PUBLIC key
A->>B: Send encrypted message
B->>B: Decrypt with own PRIVATE key
Asymmetric Encryption (RSA)

Symmetric vs Asymmetric Encryption

FeatureSymmetricAsymmetric
KeysSame key for encrypt & decryptTwo keys (public + private)
SpeedFasterSlower
ExamplesAES, DES, 3DES, BlowfishRSA, ECC, Diffie-Hellman
UseBulk data encryptionKey exchange, digital signatures

Hashing

Converts data into a fixed-length string. One-way — cannot be reversed.

AlgorithmOutput LengthUse
MD5128-bitChecksum (insecure for passwords)
SHA-256256-bitBlockchain, SSL certificates
SHA-512512-bitHigh-security applications

Digital Signature & Certificate

  • Digital Signature — proves the sender’s identity and data integrity (uses sender’s private key)
  • Digital Certificate — issued by Certificate Authority (CA), verifies website identity (SSL certificate)
  • SSL/TLS — encrypts data between browser and server (used in HTTPS)

Authentication Methods

MethodDescription
PasswordSomething you know
OTPOne-Time Password sent to phone
2FA (Two-Factor)Combines two different methods (password + OTP)
MFA (Multi-Factor)Three or more factors
BiometricFingerprint, face recognition, iris scan
CAPTCHAProves user is human, not bot

Three authentication factors: Something you know (password), something you have (phone/token), something you are (biometric).


Indian Cyber Security Framework

Entity/LawRole
IT Act 2000India’s primary law for cybercrime and e-commerce
IT Amendment Act 2008Added sections on cybercrime (66A-removed, 66C, 66D)
CERT-InComputer Emergency Response Team — handles cyber incidents
NCIIPCNational Critical Information Infrastructure Protection Centre
Cyber Swachhta KendraBotnet Cleaning and Malware Analysis Centre
National Cyber Security Policy 2013Framework for protecting cyberspace

Famous Ransomware Attacks

AttackYearDetails
WannaCry2017Exploited Windows SMB vulnerability; affected 150+ countries, 200,000+ computers; demanded Bitcoin ransom
Petya / NotPetya2017Primarily targeted Ukraine; spread globally; disguised as ransomware but was actually a wiper (destroyed data permanently)

WannaCry was stopped by a security researcher who found a “kill switch” domain. It highlighted the danger of unpatched systems.


Important Sections of Indian IT Act

SectionOffencePenalty
Section 43Unauthorized access to computer, data theft, virus introductionCompensation up to Rs. 1 crore
Section 66Hacking — dishonestly/fraudulently accessing computerUp to 3 years imprisonment + fine
Section 67Publishing obscene content electronicallyUp to 5 years + Rs. 10 lakh fine
Section 72Breach of confidentiality and privacyUp to 2 years imprisonment + fine

IT Act 2000 — Key Facts

  • India’s first cyber law, enacted on 17 October 2000
  • Amended in 2008 — added new cybercrime sections (66A-66F, later 66A struck down by Supreme Court in 2015)
  • Governs e-commerce, digital signatures, and cybercrime
  • Recognizes electronic documents and digital signatures as legally valid

HTTPS, TLS & End-to-End Encryption

ConceptDetails
HTTPS Port443
TLSTransport Layer Security — latest version is TLS 1.3 (faster, more secure than TLS 1.2)
E2EE (End-to-End Encryption)Only sender and receiver can read the message; even the service provider cannot access it
E2EE ExampleWhatsApp uses Signal Protocol for E2EE

Advanced Security Concepts

ConceptDescription
HoneypotA decoy system designed to attract attackers — used to study attack methods and divert hackers from real systems
Zero-day VulnerabilityA security flaw exploited by attackers before the vendor releases a patch — “zero days” of protection
Ethical HackingAuthorized penetration testing to find and fix vulnerabilities before criminals exploit them
PKIPublic Key Infrastructure — framework for managing digital certificates and public-key encryption; enables HTTPS, digital signatures

Types of Hackers

TypeDescription
White HatEthical hackers — authorized security testing, work with organizations
Black HatCriminal hackers — unauthorized access for personal gain or damage
Grey HatBetween white and black — may hack without permission but without malicious intent, often report vulnerabilities

CERT-In Mandatory Reporting (2022)

In April 2022, CERT-In issued a directive requiring:

  • All organizations must report cybersecurity incidents within 6 hours of detection
  • Applies to data breaches, ransomware, DDoS attacks, unauthorized access
  • VPN providers must maintain user logs for 5 years
  • Cloud and VPN service providers must register user details

This is one of the strictest incident reporting timelines in the world. Non-compliance can lead to penalties under IT Act.


Key Takeaways

  • CIA Triad: Confidentiality, Integrity, Availability — foundation of security
  • Phishing = fake emails; Spear Phishing = targeted; Whaling = executives; Vishing = voice; Smishing = SMS
  • Virus needs host; Worm self-replicates; Trojan opens backdoor; Ransomware encrypts & demands payment
  • WannaCry (2017): exploited Windows SMB vulnerability, 150+ countries, 200K+ computers, Bitcoin ransom
  • Petya/NotPetya (2017): targeted Ukraine, spread globally, actually a wiper (destroyed data permanently)
  • Zero Trust = “Never trust, always verify” — Least Privilege + Micro-segmentation
  • VPN creates encrypted tunnel; WireGuard (newest, fastest) & OpenVPN (open-source, strong)
  • Symmetric (same key, AES/DES) is faster; Asymmetric (2 keys, RSA/ECC) is for key exchange
  • Hashing: MD5 (128-bit, insecure), SHA-256 (256-bit, blockchain), SHA-512 (512-bit)
  • Digital Signature proves identity (private key); Digital Certificate issued by CA; PKI manages certificates
  • TLS 1.3 = latest, faster & more secure; HTTPS uses port 443
  • E2EE (End-to-End Encryption): only sender & receiver can read — WhatsApp uses Signal Protocol
  • Honeypot = decoy system to attract hackers; Zero-day = flaw exploited before patch exists
  • White Hat = ethical; Black Hat = criminal; Grey Hat = unauthorized but non-malicious
  • IT Act 2000: enacted Oct 17, 2000; India’s first cyber law; governs e-commerce, digital signatures, cybercrime
  • Section 43 = unauthorized access (up to Rs 1 crore); Section 66 = hacking (3 yrs); Section 67 = obscene content (5 yrs); Section 72 = privacy breach (2 yrs)
  • CERT-In 6-hour rule (April 2022): mandatory incident reporting within 6 hours; VPN providers must keep logs 5 years
  • Authentication factors: Know (password), Have (phone/token), Are (biometric)

Summary Cheat Sheet

ConceptKey Details
CIA TriadConfidentiality, Integrity, Availability
PhishingFake emails to steal credentials
Spear PhishingTargeted phishing at specific individuals
WhalingPhishing targeting senior executives (CEO, CFO)
Vishing / SmishingVoice phishing / SMS phishing
DDoSDistributed Denial of Service — floods server with traffic
MITMMan-in-the-Middle — intercepts communication
SQL InjectionMalicious SQL code in database queries
XSSCross-Site Scripting — injects scripts into web pages
Brute ForceTries all possible password combinations
Virus vs WormVirus needs host file; Worm self-replicates across networks
TrojanDisguised as legit software, opens backdoor
RansomwareEncrypts files, demands money
WannaCry (2017)Exploited Windows SMB vulnerability; 150+ countries; Bitcoin ransom
Petya/NotPetya (2017)Targeted Ukraine; actually a wiper (destroyed data permanently)
KeyloggerRecords keystrokes to steal passwords
RootkitHides deep in OS, gives root/admin access
Logic BombActivates on specific condition/date
BotnetNetwork of infected computers (used for DDoS)
Zero TrustNever trust, always verify — Least Privilege + Micro-segmentation
VPNEncrypted tunnel for private internet
PPTPFast but weak VPN security
L2TP/IPSecSecure VPN — Layer 2 + IPSec encryption
OpenVPNOpen-source, strong security, widely used
WireGuardNewest, fastest, simplest VPN protocol
Packet Filtering FWChecks packet headers (basic firewall)
Stateful FWTracks active connections (smarter)
NGFWDeep packet inspection, app awareness, IPS
AES / DES / 3DESSymmetric encryption (same key, fast)
RSA / ECCAsymmetric encryption (2 keys, key exchange)
MD5128-bit hash — insecure for passwords
SHA-256256-bit hash — blockchain, SSL certificates
Digital SignatureProves sender identity (uses private key)
Digital CertificateIssued by CA — verifies website identity
PKIPublic Key Infrastructure — manages certificates & public-key encryption
TLS 1.3Latest TLS — faster, more secure than TLS 1.2
E2EEEnd-to-End Encryption — only sender & receiver can read
WhatsApp E2EEUses Signal Protocol for E2EE
HTTPS Port443
HoneypotDecoy system to attract & study attackers
Zero-dayVulnerability exploited before vendor releases patch
Ethical HackingAuthorized penetration testing
White HatEthical hackers — authorized security testing
Black HatCriminal hackers — unauthorized access
Grey HatUnauthorized but non-malicious — often report vulnerabilities
2FA / MFATwo-factor / Multi-factor authentication
3 Auth FactorsKnow (password), Have (phone/token), Are (biometric)
CAPTCHAProves user is human, not bot
IT Act 2000India’s first cyber law — enacted 17 October 2000
IT Act Amendment 2008Added sections 66A-66F (66A struck down by SC in 2015)
Section 43Unauthorized access — compensation up to Rs 1 crore
Section 66Hacking — up to 3 years imprisonment + fine
Section 67Obscene content — up to 5 years + Rs 10 lakh fine
Section 72Privacy breach — up to 2 years imprisonment + fine
CERT-InComputer Emergency Response Team — handles cyber incidents
CERT-In 6-hour RuleApril 2022 — mandatory incident reporting within 6 hours
VPN Log MandateVPN providers must maintain user logs for 5 years (2022)
NCIIPCNational Critical Information Infrastructure Protection Centre
Cyber Swachhta KendraBotnet Cleaning and Malware Analysis Centre

Knowledge Check

Take a dynamically generated quiz based on the material you just read to test your understanding and get personalized feedback.

Lesson Doubts

Ask questions, get expert answers

Lesson Doubts is a Pro feature.Upgrade