Unit 9 · Session 3
Malware, Ethics, Firewalls, and Encryption
IT 231: IT and Applications (BBA)
Today's focus
- Malware: Viruses, Worms, and Trojans
- Network Security: Firewalls and Encryption
🎯 Learning Objectives
By the end of this session, you will be able to:
- ✅ Define malware and differentiate between a virus, a worm, and a Trojan horse.
- ✅ Describe the threat of ransomware and the primary method of protection against malware.
- ✅ Define network security and its goals.
- ✅ Describe how a firewall acts as a network barrier.
- ✅ Define encryption and decryption and their role in data confidentiality.
Malware: Viruses, Worms, and Trojans
What is Malware? 🔍
Malware, short for malicious software, is any software intentionally designed to cause damage to a computer, server, client, or computer network.
It's a general term for a wide variety of digital threats.
What is Malware? 🔍 (continued)
- Viruses
- Worms
- Trojan Horses
- Ransomware
- Spyware
The Brain Virus (1986)
The Virus 🦠
A piece of malicious code that attaches itself to a legitimate program or file.
- Needs a Host: Cannot exist or spread on its own. It requires a host program to run.
- Replication: When the host program is executed, the virus runs and can replicate itself to infect other programs on the system.
- Example: An infected Microsoft Word macro that runs when you open a document.
The Worm 🐛
A standalone program that can replicate itself and spread to other computers, typically over a network.
- Standalone: Does not need to attach to another program to run or spread.
- Network Propagation: Exploits vulnerabilities in operating systems or networks to travel from one computer to another without human intervention.
- Impact: Often consumes significant network bandwidth, causing network slowdowns or crashes.
The Trojan Horse 🐴
A program that disguises itself as something useful or harmless to trick the user into installing it.
- Deception is Key: Appears to be a legitimate application (e.g., a game, a utility, a software patch).
- User-Activated: Relies on the user to download and execute the program.
- Payload: Once installed, it can perform malicious actions like stealing data, installing a backdoor, or downloading other malware.
📊 At a Glance: Virus vs. Worm vs. Trojan
Virus 🦠
- Attaches to a host file
- Needs user action to spread (e.g., running the file)
- Spreads locally first
Worm 🐛
- Standalone program
- Self-propagates over a network
- Spreads rapidly
Trojan Horse 🐴
- Disguised as legitimate software
- Tricks user into installation
- Doesn't self-replicate
🧪 Activity: Virus, Worm, or Trojan?
1. A free "Photoshop crack.exe" that secretly records everything you type → Trojan
2. Malicious code hidden inside a Word file's macro, which infects other documents when you open it → Virus
3. A program that spreads by itself to every unpatched PC on the office network overnight → Worm
4. A pop-up offering a "Flash Player update" that installs a backdoor → Trojan
The Modern Menace: Ransomware 💰
A type of malware that encrypts a user's files and demands a ransom payment in exchange for the decryption key.
⚡ Threat: Your data becomes inaccessible. Even if you pay, there is no guarantee you will get your files back.
The Modern Menace: Ransomware 💰 (continued)
- Infection: Often delivered via a Trojan (e.g., a malicious email attachment).
- Encryption: Silently encrypts documents, photos, and other important files.
- Demand: A ransom note appears on the screen demanding payment, usually in cryptocurrency.
🌍 Real Case: WannaCry, a Worm Carrying Ransomware (2017)
- 12 May 2017: WannaCry spread by itself (like a worm) through a flaw in older Windows file sharing.
- In about a day, it encrypted files on more than 200,000 computers in about 150 countries, and demanded payment in bitcoin.
- The UK's National Health Service was badly hit, and thousands of appointments and operations were cancelled.
- Microsoft had released a fix in March 2017, two months earlier. The victims simply hadn't installed it.
Lesson: antivirus helps, but installing updates would have stopped WannaCry.
Where WannaCry Hit
Practical Application: The Threat in Nepal
Real-World Example
In recent years, Nepal has seen a rise in phishing and ransomware attacks targeting individuals and businesses.
- Phishing Scams: Fake emails or SMS messages pretending to be from banks or popular services like eSewa or Khalti, trying to steal login credentials.
- Business Impact: Small businesses and even government portals have been targeted by ransomware, disrupting services and leading to data loss.
- Lesson: Always be skeptical of unsolicited messages and verify the source before clicking links or downloading attachments.
🛡️ Primary Defense: How to Protect Yourself
The single most important defense is up-to-date antivirus software.
Antivirus software performs several critical functions:
- Scans: Actively checks files and programs for known malware signatures.
- Removes: Quarantines or deletes malicious files it discovers.
- Prevents: Monitors system activity to block new infections in real-time.
Also critical: Keep your operating system and all applications updated with the latest security patches!
Summary & Key Takeaways
- Malware is a broad term for any software designed to cause harm.
- A virus needs a host program to spread, while a worm is a standalone program that can spread on its own across networks.
- A Trojan horse deceives you into installing it by pretending to be legitimate software.
- Ransomware is a dangerous form of malware that encrypts your files and demands a payment for their release.
- Your primary defense is using up-to-date antivirus software and practicing safe computing habits.
⚖️ Morality, Ethics, and Law
🧭 Morality
A person's own sense of right and wrong, shaped by family, culture and religion.
📜 Ethics
Shared, written principles for a group or profession. For example, the ACM Code of Ethics for computing professionals.
🏛️ Law
Rules enforced by the state, with penalties.
In a company: an IT admin can read every employee's email, and it may even be legal. Company ethics policies say they should only do it for a valid, approved reason.
🧪 Activity: What Would You Do?
Vote: A report it, B ignore it, C use it. Then defend your choice.
1. While fixing a manager's PC, you see a spreadsheet of everyone's salaries left open.
2. Your boss asks you to install unlicensed software on 10 PCs "just until next budget".
3. You discover that changing one number in the college portal's web address shows other students' marks.
For all three, a professional code of ethics points to A: protect privacy, follow licences, and report security flaws responsibly.
Network Security: Firewalls and Encryption
What is Network Security?
Network Security: The policies and practices adopted to protect a computer network and its resources.
The primary goals are to:
- 🛡️ Prevent unauthorized access.
- 🔍 Monitor for misuse or modification.
- 🚫 Deny attacks and disruptions.
Our First Line of Defense: The Firewall
Think of a firewall as a digital gatekeeper for your network.
Trusted Network
(Your Home or Office)
Untrusted Network
(The Internet)
A firewall stands between these two, inspecting all traffic.
How a Firewall Works
The Definition 📖
A network security device that monitors incoming and outgoing traffic, allowing or blocking it based on a set of security rules.
The Analogy 🤔
It's like a security guard at a building entrance.
- Checks everyone's ID (IP Address).
- Has a list of allowed visitors (Rules).
- Denies entry to anyone suspicious (Blocks Traffic).
Where are Firewalls Located?
They can be software on your computer or dedicated hardware.
🏠 Home Network
Often built directly into your Wi-Fi router (e.g., from WorldLink, Vianet).
🏢 University/Corporate
Powerful, dedicated hardware devices protecting the entire campus network.
💻 Personal Computer
Software firewalls like Windows Defender or macOS Firewall protect your individual device.
🧱 Types of Firewalls
| Type | What it checks | Analogy |
| Packet-filtering | Each packet's address and port, against a rule list | A guard checking only the address on each envelope |
| Stateful inspection | Also remembers ongoing conversations and lets replies back in | A guard who remembers who went out and expects them back |
| Proxy / application | The actual content (websites, files), acting as a middleman | A guard who opens the parcel and looks inside |
| Next-generation (NGFW) | All of the above, plus app awareness and intrusion prevention | A full security team with cameras |
Hardware firewalls protect a whole network, and software firewalls protect one device. Most organisations use both.
Protecting the Data Itself ⚡
A firewall protects the network, but what about the information traveling across it?
This is where Encryption comes in.
Encryption and Decryption
Encryption 🔒
The process of converting readable data (plain text) into an unreadable, coded format (ciphertext).
Hello World ➡️ aJk8$Lp#wQ!z
Decryption 🔓
The process of converting ciphertext back into plain text. This requires a secret key.
aJk8$Lp#wQ!z ➡️ Hello World
The Role of the Key 🔑
Encryption uses an algorithm and a key.
Analogy: The algorithm is the type of lock (e.g., a padlock). The key is the unique physical key that can open that specific lock.
- Without the correct key, the ciphertext is just random, meaningless data.
- This is the most effective way to ensure data confidentiality.
🧪 Activity: Crack the Caesar Cipher
Julius Caesar shifted each letter 3 places forward: A→D, B→E, C→F … X→A, Y→B, Z→C. The key is 3.
1. Decrypt: KHOOR → HELLO
2. Encrypt: IT → LW
3. Decrypt: PRPR → MOMO
With only 25 possible keys, a computer breaks this instantly. Modern AES-256 has 2256 possible keys, about 1.2 × 1077, far too many for any computer to try them all.
Practical Application in Nepal 🇳🇵
Why is encryption vital for online services?
When you use services like eSewa, Khalti, or Daraz, encryption protects your:
- 💳 Payment details (bank account, card numbers).
- 👤 Personal information (name, address, phone number).
- 🔑 Login credentials (username and password).
It ensures that even if a hacker intercepts the data, they cannot read or use it.
Summary & Key Takeaways
- 🛡️ Network security is a set of practices to protect a network from unauthorized access and misuse.
- 🧱 A firewall acts as a barrier or gatekeeper, filtering network traffic based on predefined security rules.
- 🔒 Encryption scrambles data into an unreadable format to protect its confidentiality, while decryption unscrambles it with a key.
💬 Discussion Questions
- If ransomware locks a hospital's records, should the hospital pay the ransom? Who gets hurt either way?
- Many people in Nepal use cracked Windows that never updates. How does that connect to the WannaCry story?
- Governments sometimes ask for a "back door" into encrypted apps like WhatsApp to catch criminals. Is that a good idea?
Image & Video Credits
Images
- Brain virus hex dump: Avinash Meetoo, CC BY 2.5, via Wikimedia Commons
- Countries initially affected in WannaCry ransomware attack: User:Roke, CC BY-SA 3.0, via Wikimedia Commons
- Unbalanced scales of justice, bookstore: P1898, CC BY 4.0, via Wikimedia Commons
- Cisco ASA 5510: ShakataGaNai, CC BY-SA 3.0, via Wikimedia Commons
- Enigma machine: Rama, CC BY-SA 2.0 fr, via Wikimedia Commons
- HTTPS and padlock in website address bar: Santeri Viinamäki, CC BY-SA 4.0, via Wikimedia Commons
Videos (YouTube)
- TRT World, "WannaCry cyberattack explained" (0–77 s)
- Simply Explained, "Asymmetric Encryption - Simply explained" (8–96 s)
📖 Related chapter notes
Read first, then revise with this deck: