Learning Objectives
- Define malware as hostile software and name its major families.
- Distinguish virus, worm, and Trojan by host, replication, and trigger.
- Explain ransomware, spyware, keylogger, adware, and botnet in one line each.
- Trace how malware spreads and what infection looks like.
- Select protection controls that a small business can verify and afford.
What Malware Is
Malware is software written to harm a computer, network, or its owner. It steals, corrupts, locks, or uses the machine for someone else. The word covers many forms, but examiners most often test four: virus, worm, Trojan, ransomware. Know how each attaches, spreads, and activates.
Grouped Framework: Families by Behaviour
Family A: How It Lives and Moves
| Type | Needs host file | Self replicates | How it spreads | Main effect |
|---|---|---|---|---|
| Virus | Yes, attaches to a program | Yes, when host runs | Infected files, USB, email attachments | Corrupts or deletes files |
| Worm | No, standalone | Yes, automatically over network | Network flaws, mail, shares | Floods bandwidth, spreads fast |
| Trojan horse | No, pretends to be useful | No, waits for user to install | Download from untrusted source, fake update | Opens backdoor, steals data |
| Ransomware | Often arrives as Trojan or worm | Encrypts, may then worm | Attachment, pirated software, unpatched service | Locks files until payment |
Quick test: virus needs a host and human to run the host, worm needs a network and no host, Trojan needs a human to install the disguise. Ransomware is defined by what it does after it arrives.
Family B: What It Does After It Arrives
- Spyware watches and sends data, such as browsing and credentials.
- Keylogger records each keystroke to steal passwords and card numbers.
- Botnet links infected PCs as bots under remote control, used to send spam or flood a site.
## How Malware Spreads in Nepal Businesses
- Opening infected **email attachments** and links, especially fake invoices and courier notices.
- Downloading **cracked software, games, or films** from untrusted sites, the same activators that violate licences.
- Plugging in **USB drives** that carry infected files between shops and printers.
- Installing **APK files** from outside official stores.
- Leaving systems **unpatched** so a worm can use a known flaw.
- Clicking **scareware** pop ups that claim the PC is infected.
### Symptoms That Suggest Infection
- Machine slow or crashing, new toolbars, changed home page.
- Files missing, renamed, or encrypted with a ransom note on screen.
- Antivirus disabled without action by owner.
## Grouped Framework: Protection Layers
No single tool blocks all malware. Layer preventive, detective, and corrective.
| Layer | Control | What it stops |
| --- | --- | --- |
| **Preventive** | Patch OS and apps promptly; use firewall and standard user accounts | Worm that uses known flaw, Trojan that needs admin install |
| **Preventive** | Avoid pirated software, use official stores | Trojan and ransomware hidden in cracks |
| **Detective** | Antivirus with real time scan and browser filter | Virus on file open, known signatures |
| **Detective** | Staff reports of odd mail, log alerts | Early lateral movement |
| **Corrective** | Regular backup with one offline or cloud copy, tested restore | Ransomware recovery without paying |
| **Corrective** | After incident: isolate, remove, rebuild, review logs | Reinfection and repeat loss |
Antivirus is the primary defence, but updates and backups decide whether ransomware is an inconvenience or a closure. A backup that stays connected is not a backup if ransomware reaches it.
## Nepal Context
Wallets, courier SMS, and Facebook page recovery mails are common lures. Moving daily work to standard accounts blocks silent installs. Scanning USB drives cuts common spread.
## Worked Example: NPR Cost on BS 2081
**Scenario dated Falgun 10, 2081.** Himalaya Traders, Pokhara, 8 PCs, turnover NPR 28,000,000, holds invoices and VAT files on one file server.
Two choices for the next year:
- **Do little:** keep free antivirus trial and manual copy when remembered. Estimated chance of a major malware incident is 35 percent. Single incident cost is NPR 450,000 (recovery plus overtime plus late VAT penalty) plus ransom pressure even if not paid.
- **Layered controls:**
- Business antivirus 8 seats at NPR 3,200 each = NPR 25,600
- Patch schedule plus standard accounts setup, one time NPR 18,000
- Two external drives rotated weekly, one always offline, NPR 12,000 plus cloud vault NPR 9,600 per year
- Quarterly 45 minute training: NPR 10,000 x 4 = NPR 40,000
Total Year 1 = 25,600 + 18,000 + 12,000 + 9,600 + 40,000 = NPR 105,200. Expected loss with layers falls to 8 percent, so expected loss = 0.08 x 450,000 = NPR 36,000. Total expected = 141,200 versus 0.35 x 450,000 = NPR 157,500 for do little. The layered path is slightly cheaper on expectation, and unlike do little, it keeps VAT filings on time and avoids a forced ransom choice. Year 2 without the one time setup is NPR 123,200, clearly cheaper.
## Self-Check
<div class="cq-note" id="it231-u9-c5-malware-families">
<h3 class="cq-note-title">Self-check</h3>
<div data-cq="classify">
<script type="application/json" class="cq-data">
{"mode":"practice","prompt":"Place each case in its family.","buckets":"Virus needs host|Worm stands alone|Trojan needs install|Ransomware effect|Spyware or keylogger|Botnet command","items":"Code attaches to tally.exe and runs when tally runs: Virus needs host|Program scans network and copies itself without user help: Worm stands alone|Fake invoice PDF asks to enable macros, then steals data: Trojan needs install|Files renamed to .locked and note asks for Bitcoin: Ransomware effect|Secretly sends browsing and passwords to outsider: Spyware or keylogger|200 PCs send spam at midnight on command: Botnet command","explain":"Host and replication decide virus versus worm. Disguise and user install decide Trojan. Encryption and ransom define effect."}
</script>
</div>
</div>
## Try This
Himalaya Traders has 420 GB of data. Full backup to external drive at 80 MB per second, incremental nightly change is 6 GB.
1. How long does a full backup take in minutes?
2. How long does the nightly incremental take?
3. Ransomware strikes at 14:00 on Chaitra 5, 2081. Last incremental finished at 20:00 the prior day. How much data is lost if restore uses that backup, and how many days of work at 6 GB per day?
<details>
<summary>Answer sketch</summary>
1. 420 GB = 420,000 MB. 420,000 / 80 = 5,250 seconds, about 87.5 minutes.
2. 6 GB = 6,000 MB. 6,000 / 80 = 75 seconds, about 1.25 minutes, so nightly is easy to keep.
3. Loss = changes from 20:00 prior day to 14:00 today, about 0.75 day, roughly 4.5 GB, less than one day of work. With weekly full plus nightly incremental, loss is bounded to one day. Without nightly, loss is up to a week.
</details>
> **Example 1:** Finance reads malware as ledger and compliance risk. Standard accounts, patch logs, and a tested offline backup are audit evidence that VAT data can be restored within a day, which reduces late filing risk more than a larger ransom budget would.
>
> **Example 2:** Marketing and operations read it as campaign and service continuity. A USB scanning habit and standard accounts keep the design PC and POS from becoming bot members, so product posts and counter sales stay up even when one machine is isolated for cleaning.
## Key Takeaways
- Malware covers virus, worm, Trojan, ransomware, spyware, keylogger, adware, botnet.
- Virus with host, worm without, Trojan as disguise is the core distinction.
- Ransomware is defined by encryption and ransom, often arriving as Trojan or worm.
## Exam-Style Questions
**Short answer**
1. Define malware and name four types.
2. Differentiate virus and worm by host and spread.
**Long answer**
1. Explain types of malware with examples relevant to Nepal.


