Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
🌐 Unit 2 – Computer Networks  ·  Lesson 19

Network Security Threats

Why network security?

When devices are connected, data can be stolen, changed or destroyed by attackers. Network security means protecting devices, data and users from such threats.

Malware

Malware (malicious software) is any program written to harm a computer, steal data or take control without permission.

🦠
VirusAttaches to files; spreads when the file runs.
🐛
WormCopies itself over the network on its own.
🐴
TrojanLooks useful but does harm secretly.
🔒
RansomwareLocks files and demands money.
🕵️
SpywareSecretly records what you do.
📢
AdwareShows unwanted ads, slows the system.
⌨️
KeyloggerRecords keystrokes to steal passwords.
Types of malware

Virus, worm and Trojan

Virus

  • Needs a host file
  • Spreads when the user runs the file
  • Can delete or corrupt data

Worm

  • Standalone program
  • Spreads automatically over networks
  • Uses bandwidth, slows networks

A Trojan horse pretends to be a game, crack or free tool. Once installed it opens a back door for the attacker. Unlike a virus it does not copy itself.

Ransomware, spyware, adware, keylogger

Ransomware (e.g. WannaCry, 2017) encrypts files and asks for payment. Spyware collects browsing and personal data. Adware floods the screen with ads. A keylogger – software or a tiny hardware device – records every key you press, including passwords; online on-screen keyboards help against them.

How malware spreads

  • Email attachments and links from unknown senders
  • Pirated software, cracks and fake apps
  • Infected pen drives
  • Unsafe websites and pop-ups
  • Systems that are never updated

Antivirus and firewall

Antivirus software scans files, detects malware using signatures and behaviour, and removes or quarantines it. Keep it updated.

InternetFirewall (checks rules)Your network
A firewall stands between your network and the Internet

A firewall – hardware or software – filters network traffic by rules (allowed ports, addresses, programs) and blocks suspicious connections.

HTTP vs HTTPS

HTTP

  • Data sent as plain text
  • Anyone on the path can read it
  • URL starts http://
  • Never enter passwords here

HTTPS

  • Data encrypted with TLS/SSL
  • Only browser and server can read it
  • URL starts https:// with 🔒
  • Use for login, banking, shopping

Cookies and privacy

Cookies make sites convenient, but third-party cookies can track you across websites. Clear cookies regularly, use private browsing on shared computers and accept only necessary cookies.

Strong passwords

Python
# A simple password-strength checker
def strength(pw):
    score = 0
    score += len(pw) >= 8
    score += any(c.islower() for c in pw)
    score += any(c.isupper() for c in pw)
    score += any(c.isdigit() for c in pw)
    score += any(not c.isalnum() for c in pw)
    return ['Very weak', 'Weak', 'Weak', 'Medium', 'Strong', 'Very strong'][score]
for p in ['12345', 'rahul2008', 'Rahul2008', 'R@hul_2008!']:
    print(p.ljust(12), strength(p))
12345 Weak rahul2008 Medium Rahul2008 Strong R@hul_2008! Very strong

Phishing

Phishing is a fake email, SMS or website that pretends to be a bank, school or company to steal passwords, OTPs or card details. Check the real domain before clicking.

Python
# Spotting a suspicious link (very simple rules)
def suspicious(url):
    reasons = []
    if not url.startswith('https://'):
        reasons.append('no HTTPS')
    if '@' in url:
        reasons.append('@ hides real address')
    host = url.split('//')[-1].split('/')[0]
    if host.count('-') >= 2 or host.replace('.', '').isdigit():
        reasons.append('odd domain')
    return reasons or ['looks OK']
for u in ['https://www.sbi.co.in/login', 'http://sbi-login-verify-kyc.xyz/win',
          'https://203.0.113.5/pay', 'https://bank.com@evil.ru/']:
    print(u, '->', suspicious(u))
https://www.sbi.co.in/login -> ['looks OK'] http://sbi-login-verify-kyc.xyz/win -> ['no HTTPS', 'odd domain'] https://203.0.113.5/pay -> ['odd domain'] https://bank.com@evil.ru/ -> ['@ hides real address']

Safety checklist

  1. 1Install antivirus and keep OS and apps updated
  2. 2Keep the firewall ON
  3. 3Use strong, different passwords + two-factor authentication
  4. 4Open only HTTPS sites for login and payment
  5. 5Never share OTP; ignore prize / KYC messages
  6. 6Scan pen drives; avoid pirated software
  7. 7Back up important files regularly
Stay safe online

Frequently Asked Questions

What is the difference between a virus and a worm?
A virus attaches to a file and needs a user to run that file to spread. A worm is standalone and spreads by itself across a network.
What does a firewall do?
It monitors incoming and outgoing network traffic and blocks anything that does not follow the set security rules.
What is ransomware?
Malware that encrypts or locks your files and demands payment to unlock them. Regular backups are the best defence.
← Class 12 Computer Science
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Next topicDBMS, Relational Model & Keys Your progress: 19 / 26 (73%) · Lesson 20 / 26 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free