Courses / Application of ICT (GEN-103) – BS 1st Semester

Week 12 Theory – Security, Privacy, Malware and Computer Ethics

Week 12 – Computer Security, Privacy and Ethics · 70 min read · 41 MCQs to check yourself

Security and privacy

Cybercrime

Cybercrime is any illegal activity committed using computers, networks or the Internet.

Cybercrime Description
Hacking Gaining unauthorised access to computers or accounts
Phishing Fake emails, SMS or websites that trick people into revealing passwords, PINs, OTPs or card numbers
Identity theft Stealing personal information to impersonate someone (e.g. SIMs or loans in another person's name)
Online fraud / scams Fake prize messages, fake online shops, investment scams
Cyberstalking & cyberbullying Harassing, threatening or humiliating people online
Software piracy Illegal copying and distribution of software, movies, music
Spreading malware / ransomware attacks Infecting systems to damage them or demand ransom
Denial-of-Service (DoS/DDoS) Flooding a website/server with traffic so genuine users cannot access it
Data breach Theft or leak of confidential data from organisations
Spamming Sending unwanted bulk messages

In Pakistan, cybercrime is dealt with under the Prevention of Electronic Crimes Act (PECA) 2016; complaints can be filed with the cybercrime authorities (FIA Cyber Crime Wing / National Cyber Crime Investigation Agency).

Malware

Malware (malicious software) is any software designed to harm, disrupt, spy on or gain unauthorised access to a computer system.

Type Description
Virus Attaches itself to a host file/program and spreads when that file is run or shared; can corrupt or delete data. Needs a host and human action to spread.
Worm Self-replicating standalone program that spreads automatically through networks without a host file or user action; consumes bandwidth and slows networks (e.g. ILOVEYOU, WannaCry spread as a worm).
Trojan horse Looks like useful/legitimate software but secretly performs harmful actions (creates a backdoor, steals data). Does not replicate itself.
Spyware Secretly monitors user activity and collects information (browsing habits, passwords) and sends it to others. Keyloggers record keystrokes.
Adware Automatically displays unwanted advertisements (pop-ups), often bundled with free software; may track browsing.
Ransomware Encrypts the victim's files and demands a ransom (often cryptocurrency) for the decryption key (e.g. WannaCry, 2017).
Rootkit Hides deep in the OS to give attackers hidden admin control.
Botnet Network of infected "zombie" computers controlled remotely to send spam or DDoS attacks.

Computer virus and its forms

A computer virus is a malicious program that attaches to other programs/files, replicates itself when the infected file runs, and may perform a harmful action (payload).

Form (type) of virus How it works
Boot sector virus Infects the boot sector of a disk/USB; loads into memory when the computer starts (e.g. Brain virus – created in Lahore, 1986, considered the first PC virus)
File infector (program) virus Attaches to executable files (.exe, .com) and runs when they are opened
Macro virus Written in macro language of applications; infects documents such as Word/Excel files (e.g. Melissa)
Multipartite virus Infects both boot sector and files
Polymorphic virus Changes its code each time it infects to avoid antivirus detection
Stealth virus Hides the changes it makes to files from antivirus programs
Resident virus Stays in RAM and infects files as they are opened
Direct-action (non-resident) virus Infects files when executed, then exits
Browser hijacker Changes browser settings, home page and search engine
Logic/time bomb Activates when a condition or date is met

Symptoms of malware infection

How malware spreads

Precautions to protect a computer from malware

  1. Install a reputable antivirus/anti-malware (e.g. Microsoft Defender) and keep it updated; run regular scans.
  2. Keep the operating system and software updated (install security patches).
  3. Turn on the firewall.
  4. Do not open suspicious email attachments or click unknown links; verify the sender.
  5. Download software only from official/trusted sources; avoid pirated software and cracks.
  6. Scan USB drives before opening files; disable autorun.
  7. Use strong, unique passwords and enable two-factor authentication (2FA).
  8. Take regular backups (offline/cloud) to recover from ransomware.
  9. Use standard (non-admin) user accounts for daily work.
  10. Be careful on public Wi-Fi; use HTTPS websites and a VPN when needed.
  11. Never share OTPs, PINs or passwords with anyone – banks never ask for them.

Authentication and authorization

Authentication Authorization
Verifies who you are (identity) Decides what you are allowed to do (permissions)
Comes first Comes after authentication
e.g. logging in with username + password, fingerprint e.g. a student can view results but only the admin can edit them
Uses credentials Uses access rights, roles, policies

Authentication methodologies (factors)

  1. Something you know – passwords, PINs, security questions, patterns.
  2. Something you have – mobile phone (OTP by SMS/authenticator app), ATM/smart card, security token, key fob.
  3. Something you are – biometrics: fingerprint, face recognition, iris/retina scan, voice, signature dynamics.
  4. (Also) somewhere you are – location; something you do – typing pattern.

Strong password tips: at least 12 characters; mix of upper/lowercase letters, numbers and symbols; no names, birthdays or "123456"; different password for each account; use a password manager.

Computer ethics

Computer ethics are moral principles and guidelines that govern the responsible and proper use of computers and information technology.

Areas of computer ethics

The Ten Commandments of Computer Ethics (Computer Ethics Institute) include: do not use a computer to harm other people; do not interfere with others' computer work; do not snoop in others' files; do not use a computer to steal; do not bear false witness; do not copy or use proprietary software you have not paid for; do not use others' resources without authorisation; do not appropriate others' intellectual output; think about the social consequences of the programs you write; use computers in ways that show consideration and respect.

Cybersecurity – Crash Course Computer Science #31

Malware: Difference Between Computer Viruses, Worms and Trojans (Kaspersky)

The Internet: Cybersecurity & Crime (Code.org)

Hackers & Cyber Attacks – Crash Course Computer Science #32

Short and long questions

1. What is phishing?

Model answer

Phishing is a cybercrime in which attackers send fake emails, SMS or websites pretending to be trusted organisations to trick people into revealing passwords, PINs, OTPs or card details.

2. What is cybercrime? Give four examples.

Model answer

Cybercrime is any illegal activity carried out using computers, networks or the Internet. Examples: hacking, phishing, identity theft, online fraud, cyberstalking/bullying, software piracy, ransomware and DoS attacks.

3. What is malware? Explain its types. Write the symptoms of malware and how it spreads.

Model answer

Malware is malicious software designed to damage, disrupt, spy on or gain unauthorised access to computers. Types: Virus – attaches to host files, spreads when run; Worm – self-replicates through networks without host; Trojan horse – disguised as useful software, opens backdoors; Spyware – secretly collects information (keyloggers); Adware – shows unwanted ads; Ransomware – encrypts files and demands ransom; Rootkit, botnets. Symptoms: slow performance, crashes, pop-ups, changed browser settings, missing/encrypted files, unknown programs, disabled antivirus, high network/disk activity, messages sent without your knowledge. Spread: infected email attachments and phishing links, pirated downloads, infected USB drives, networks and shared folders, malicious websites and ads, social-media links, unpatched software.

4. What is a Trojan horse?

Model answer

A Trojan horse is malware disguised as useful or legitimate software; once installed it performs hidden harmful actions such as opening a backdoor or stealing data. It does not replicate itself.

5. What are spyware and adware?

Model answer

Spyware secretly monitors user activity and collects information such as passwords and browsing habits. Adware automatically displays unwanted advertisements (pop-ups) and may track browsing.

6. Differentiate between a virus and a worm.

Model answer

A virus attaches to a host file and spreads only when the infected file is run/shared (needs user action). A worm is a standalone program that replicates and spreads automatically through networks without a host file or user action, often slowing networks.

7. Name any four forms of computer viruses.

Model answer

Boot sector virus, file infector virus, macro virus, polymorphic virus (also multipartite, stealth, resident, direct-action viruses).

8. Write any four symptoms of a malware-infected computer.

Model answer

(1) Computer becomes very slow; (2) frequent crashes or freezing; (3) unwanted pop-up ads or changed browser home page; (4) files missing, corrupted or encrypted; (5) unknown programs appear; (6) antivirus disabled.

9. Explain computer virus and its forms, and describe precautions to protect a computer from malware.

Model answer

A computer virus is a malicious program that attaches to files, replicates when the infected file runs and delivers a harmful payload. Forms: boot sector virus (infects disk start-up area, e.g. Brain, Lahore 1986); file infector (attaches to .exe files); macro virus (Word/Excel documents); multipartite (boot sector + files); polymorphic (changes code to avoid detection); stealth (hides its changes); resident (stays in RAM); direct-action; browser hijacker; logic/time bombs. Precautions: install and regularly update antivirus (e.g. Microsoft Defender) and scan regularly; update OS and applications; enable firewall; avoid suspicious attachments, links and pop-ups; download only from trusted sources, avoid pirated software; scan USB drives; use strong unique passwords and 2FA; keep regular offline/cloud backups; use non-admin accounts; be careful on public Wi-Fi; never share OTP/PIN.

10. Write any five precautions to protect a computer from malware.

Model answer

(1) Install and update antivirus; (2) keep the OS and software updated; (3) enable the firewall; (4) do not open unknown attachments/links; (5) download only from trusted sources and scan USB drives; (6) use strong passwords with 2FA; (7) take regular backups.

11. Explain authentication and authorization. Describe authentication methodologies with examples.

Model answer

Authentication is the process of verifying a user's identity; authorization is the process of granting or denying access to resources based on that identity's permissions. Authentication comes first, then authorization. Example: logging in to the LMS with your password (authentication); then being allowed to view but not edit marks (authorization). Authentication methodologies:

  1. Something you know – passwords, PINs, security questions.
  2. Something you have – mobile phone OTP, smart card, security token.
  3. Something you are – biometrics: fingerprint, face, iris, voice.
  4. Somewhere you are / something you do – location, typing pattern. Single-factor uses one factor; two-factor/multi-factor combines different factors (ATM card + PIN; password + OTP), which is much more secure. Strong passwords should be long, mixed and unique.

12. Differentiate between authentication and authorization.

Model answer

Authentication verifies who the user is (identity) using credentials such as passwords or biometrics; it happens first. Authorization determines what an authenticated user is allowed to access or do (permissions); it happens after authentication.

13. What is computer ethics? Explain the main areas of computer ethics.

Model answer

Computer ethics is the set of moral principles governing the responsible use of computers and information technology. Areas: (1) Privacy – respect personal data; do not snoop in others' files or share their photos without consent. (2) Intellectual property – do not pirate software, music or movies; respect copyright and licences. (3) Plagiarism/academic honesty – do not copy others' work as your own. (4) Accuracy – do not create or spread false information or fake news. (5) Unauthorised access – no hacking or using others' accounts. (6) Netiquette – polite communication; no cyberbullying. (7) Professional ethics – honesty and confidentiality of IT professionals. (8) Accessibility & environment – fair access to technology and proper e-waste disposal. The Ten Commandments of Computer Ethics summarise these: do not harm others, interfere with their work, snoop, steal, lie, use unpaid software, use resources without permission or take others' intellectual work; consider social consequences and show respect.

14. Define computer ethics. Name four areas of computer ethics.

Model answer

Computer ethics are moral principles that guide the responsible use of computers and IT. Areas: privacy, intellectual property/copyright, plagiarism and academic honesty, accuracy of information, unauthorised access, netiquette, professional ethics.

This lesson ends with a quiz of 41 MCQs. Open the lesson on PrepOasis to take it and save your progress.

Previous: Week 11 Lab 11 – MS Excel: Relative, Absolute and Mixed Cell Addressing; Paste Special · Next: Week 12 Lab 12 – MS Excel: Rows, Columns, Sheets and Column Charts

All lessons in Application of ICT (GEN-103) – BS 1st Semester