MarzleyTech Learn

Home / Learn / Cybersecurity / Malware and protecting your devices: types of malware, how infections happen, signs, removal and hardening phones and PCs

Malware and protecting your devices: types of malware, how infections happen, signs, removal and hardening phones and PCs

Malware (malicious software) is any program designed to harm you or your device: stealing passwords and M-Pesa details, spying through your camera, encrypting your files for ransom, showing endless ads, or using your computer to attack others. Your phone and laptop hold your money apps, photos, documents, email and work access, so keeping them clean is one of the most important things you can do. This unit explains the main types of malware, how infections happen (especially in Kenya: cyber cafés, flash disks, "modded" APKs, pirated software), how to spot and remove an infection, and how to harden Android, iPhone, Windows and macOS devices.

Types of malware

TypeWhat it doesExample effect
VirusAttaches to files/programs and spreads when they runCorrupts files, spreads via flash disks
WormSpreads by itself across networks, no user action neededInfects every PC on a school network
TrojanPretends to be useful software but carries malwareA "free" cracked Office or a fake "WhatsApp Gold" app
RansomwareEncrypts your files and demands paymentAll business documents locked; ransom note demands crypto
SpywareSecretly collects informationReads messages, tracks location
StalkerwareSpyware installed by someone you knowA partner monitoring your chats and location
Banking trojan / SMS stealerSteals banking/mobile money logins and OTP SMSEmpties accounts using intercepted codes
KeyloggerRecords keystrokesCaptures passwords typed at a cyber café
AdwareFloods you with ads, redirects browsersPop-ups everywhere, fake "virus detected" pages
RootkitHides deep in the system to avoid detectionHard to remove; may need reinstall
Botnet botLets criminals control your device remotelyYour PC sends spam or joins DDoS attacks
CryptominerUses your CPU/GPU to mine cryptocurrencyDevice hot, slow, battery drains fast
Remote access trojan (RAT)Gives attackers full controlCamera, files and screen accessible to them

How infections happen

RouteExample
Fake or "modded" appsAPKs from websites, Telegram or WhatsApp groups promising free premium features
Pirated software and gamesCracked Windows, Office, Adobe or games with hidden trojans
Email attachments and linksFake invoices, delivery notices, CVs, "payment proof" documents
Malicious ads and fake downloads"Download" buttons on free movie/software sites
USB flash disksShared at cyber cafés, schools and printing shops
Unpatched softwareOld browsers, old Windows, outdated plugins exploited automatically
Fake updates"Your Chrome/Flash is out of date, click to update" pop-ups
Social engineeringSomeone asks you to install a "support" app (AnyDesk/TeamViewer) and then takes control
Physical accessSomeone installs stalkerware on your unlocked phone

Warning signs

Phone

  • Battery drains much faster; phone gets hot when idle.
  • Unusual data usage.
  • Apps you didn't install; an app has no icon but appears in Settings → Apps.
  • Pop-up ads everywhere, even on the home screen.
  • Unknown SMS sent, or OTP codes you didn't request.
  • Accessibility or "device admin" permissions given to an app you don't recognise.
  • Friends say you sent them strange messages.

Computer

  • Very slow, fans running constantly, high CPU in Task Manager.
  • Browser homepage or search engine changed; new toolbars or extensions.
  • Pop-ups and fake virus warnings.
  • Antivirus disabled and won't turn on.
  • Files renamed with strange extensions, or a ransom note.
  • Unknown programs starting with Windows; accounts logging in from strange places.

Not every slow device is infected (old hardware, a full disk or too many apps also cause slowness), but these signs deserve a check.

Removing malware

On a computer (Windows)

  1. Disconnect from the internet (and the office network) to stop data theft and spreading.
  2. Back up important documents (not programs) to an external drive; scan them later.
  3. Run a full scan with Microsoft Defender (Windows Security → Virus & threat protection → Scan options → Full scan), then an offline scan (Microsoft Defender Offline) which runs before Windows starts.
  4. Get a second opinion with a reputable on-demand scanner (e.g. Malwarebytes free).
  5. Remove unknown programs (Settings → Apps) and browser extensions; reset browsers.
  6. Check startup items (Task Manager → Startup).
  7. Change passwords from a clean device afterwards (email first), and turn on 2FA.
  8. If problems continue, or it's ransomware or a rootkit, back up data and reinstall Windows (Settings → System → Recovery → Reset this PC, or a fresh install).

On Android

  1. Restart in Safe mode (hold power, then long-press "Power off"; varies by phone) so third-party apps don't run.
  2. Settings → Apps: uninstall unknown or suspicious apps. If you can't, first remove its Device admin permission (Settings → Security → Device admin apps) and check Accessibility settings.
  3. Run Google Play Protect (Play Store → profile → Play Protect → Scan).
  4. Change important passwords and PINs; check M-Pesa/bank activity.
  5. If it persists: back up photos/contacts and factory reset.

On iPhone

iPhones are rarely infected without jailbreaking. Update iOS, remove unknown profiles (Settings → General → VPN & Device Management), delete suspicious apps, and change your Apple ID password. For high-risk people (journalists, activists), Apple's Lockdown Mode adds protection.

Ransomware

Disconnect immediately, don't pay without expert advice (payment doesn't guarantee recovery and funds criminals), report it, and restore from clean offline backups (see the backups and ransomware lesson).

Hardening phones

Android

  • Install apps only from Google Play (or trusted stores); keep "Install unknown apps" off.
  • Keep Play Protect on; update Android and apps.
  • Review app permissions (Settings → Privacy → Permission manager); deny SMS, accessibility and admin rights to apps that don't need them.
  • Screen lock with a strong PIN/biometric; SIM PIN; encrypted storage (default on modern phones).
  • Enable Find My Device.
  • Avoid rooting.

iPhone

  • Keep iOS updated; don't jailbreak.
  • App Store only; review permissions (Settings → Privacy & Security).
  • Face ID/Touch ID with a strong passcode; Find My on; Stolen Device Protection where available.

Hardening computers

Windows

  • Turn on automatic updates (Windows Update) and update apps (browsers, Office, PDF readers).
  • Keep Microsoft Defender and the firewall on (you don't need several antivirus programs at once).
  • Use a standard user account for daily work; use an admin account only for installs.
  • Turn on BitLocker or device encryption (where available) so a stolen laptop's data is safe.
  • Use Windows Hello or a strong password; lock the screen when away (Windows + L).
  • Avoid pirated software: use free legal alternatives (LibreOffice, GIMP, VLC, Microsoft 365 Education where eligible).
  • Uninstall software you don't use.

macOS: automatic updates, App Store or identified developers only, FileVault encryption, firewall on, strong login password.

USB drives, cyber cafés and public Wi-Fi

  • Scan flash disks before opening files; disable autorun (Windows does by default now). Don't open .exe or shortcut files that appear on a flash disk unexpectedly.
  • At cyber cafés: avoid logging in to banking or email; if you must, use private/incognito mode, never save passwords, log out, and change passwords later from your own device. Keyloggers are common on shared PCs.
  • On public Wi-Fi: use HTTPS sites only, avoid sensitive transactions, or use mobile data/a reputable VPN. Turn off auto-join for open networks.

If your device is lost or stolen

  1. Use Find My Device / Find My to locate, lock or erase it.
  2. Call your provider to block the SIM (prevents SIM-based fraud) and get a replacement.
  3. Change passwords for email, M-Pesa-linked apps, bank and social media; sign out of other devices from account settings.
  4. Report to the police (an OB number may be needed for insurance or SIM replacement).
  5. Blacklist the phone's IMEI through your provider/police procedures where available.
Think about it: A student downloads a "Spotify Premium modded APK" from a Telegram group. A week later the phone is slow, shows ads on the lock screen, and the student gets OTP SMS for a bank they don't use. What happened and what should they do?Show answer

The APK was a trojan (adware plus an SMS stealer, possibly attempting account takeovers). They should boot into safe mode, remove the app and any admin/accessibility permissions it has, run Play Protect, factory reset if it persists, change passwords and PINs from a clean device, enable 2FA, check M-Pesa and bank activity, and only install apps from Google Play in future.

Summary

  • Malware includes viruses, worms, trojans, ransomware, spyware/stalkerware, banking trojans, keyloggers, adware, rootkits, bots and miners.
  • Infections come from modded APKs, pirated software, attachments, fake downloads/updates, USB drives, unpatched systems and social engineering.
  • Watch for battery drain, heat, pop-ups, unknown apps, strange SMS/OTPs, changed browsers and disabled antivirus.
  • Remove: disconnect, scan (Defender, offline scan, Play Protect), uninstall, reset browsers, change passwords; reinstall/factory reset if needed.
  • Harden devices: official app stores, updates, permissions review, Defender and firewall, standard accounts, encryption, screen locks and Find My Device.

Check yourself

  1. Which malware encrypts your files and demands payment?

    Show answer

    ransomware

  2. What is the backup rule with the numbers 3, 2 and 1 called?

    Show answer

    3-2-1

  3. Is it safe to install "modded" APKs from random websites? (yes/no)

    Show answer

    no

  4. Malware disguised as a useful program is called a what?

    Show answer

    trojan

  5. Which Windows feature encrypts the whole drive?

    Show answer

    BitLocker

  6. Which Google feature scans Android apps for malware? (two words)

    Show answer

    Play Protect

Lesson 6 of 13 in Cybersecurity · Written by · Course notes