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