Chapter 17 — E-Commerce Security Systems: Exercise Solutions Guide
How to Use This Page
1. Attempt every exercise question on your own first — write your answer before looking here. 2. Compare your answer with the solution provided; focus on the reasoning, not just the final choice. 3. Re-read the Key Concepts section for a quick recap before exams. 4. Check the Common Mistakes section to avoid frequent errors that cost marks.
Key Concepts (Quick Recap)
- Cyber security — protecting computers, networks, programs, and data from unauthorised access, attacks, and damage.
- Virus — a malicious program that attaches itself to a legitimate file; requires user action (opening a file) to execute and spread.
- Worm — a standalone malicious program that replicates itself and spreads through networks automatically without user action.
- Trojan horse — a malicious program disguised as legitimate software; does not self-replicate but creates a backdoor for attackers.
- Spyware — software that secretly monitors user activity, collects personal information, and sends it to a third party without consent.
- Adware — software that automatically displays unwanted advertisements; may track browsing habits.
- Phishing — fraudulent attempt to obtain sensitive information (passwords, card details) by pretending to be a trustworthy entity via email, website, or message.
- Hacking — unauthorised access to a computer system or network, often to steal, modify, or destroy data.
- Firewall — a network security system that monitors and controls incoming/outgoing traffic; acts as a barrier between a trusted network and untrusted external networks. Types: hardware firewall, software firewall.
- Antivirus — software that detects, prevents, and removes malicious software (viruses, worms, trojans, spyware). Examples: Norton, McAfee, Kaspersky, Avast, Windows Defender.
- Encryption — converting data into an unreadable coded form using a key; only authorised parties with the decryption key can read it. Types: symmetric (same key) and asymmetric (public/private key pair).
- Digital certificate — an electronic document that verifies the identity of a website or individual, issued by a Certifying Authority (CA). Contains public key, identity, and CA's digital signature.
- SSL/TLS — Secure Sockets Layer / Transport Layer Security — cryptographic protocols that encrypt data between browser and server; indicated by HTTPS and padlock icon.
- IT Act 2000 — India's primary law on cyber crime and electronic commerce; provides legal recognition to electronic records, digital signatures, and penalises cyber offences.
I. Choose the Best Answer (MCQs)
1. A malicious program that replicates itself and spreads through networks without user action is called: (a) Virus (b) Worm (c) Trojan (d) Spyware
Answer(b) Worm Explanation: A worm is a standalone malicious program that self-replicates and spreads through networks automatically without needing to attach to a file or requiring user action.
2. A program disguised as legitimate software that creates a backdoor for attackers is called: (a) Virus (b) Worm (c) Trojan horse (d) Adware
Answer(c) Trojan horse Explanation: A Trojan horse disguises itself as useful or legitimate software but creates a backdoor for attackers to access the system. Unlike viruses and worms, it does not self-replicate.
3. Phishing is: (a) A type of virus (b) A fraudulent attempt to obtain sensitive information by pretending to be trustworthy (c) A firewall technique (d) An encryption method
Answer(b) A fraudulent attempt to obtain sensitive information by pretending to be trustworthy Explanation: Phishing involves sending fraudulent emails or creating fake websites that appear legitimate to trick users into revealing sensitive information like passwords and credit card numbers.
4. A firewall is used to: (a) Create viruses (b) Monitor and control incoming and outgoing network traffic (c) Encrypt data (d) Compress files
Answer(b) Monitor and control incoming and outgoing network traffic Explanation: A firewall acts as a barrier between a trusted internal network and untrusted external networks, filtering traffic based on security rules.
5. Which of the following is NOT an antivirus software? (a) Norton (b) McAfee (c) Kaspersky (d) Firefox
Answer(d) Firefox Explanation: Firefox is a web browser, not antivirus software. Norton, McAfee, and Kaspersky are antivirus programs.
6. SSL stands for: (a) Secure Sockets Layer (b) System Security Layer (c) Simple Security Layer (d) Secure System Layer
Answer(a) Secure Sockets Layer Explanation: SSL (Secure Sockets Layer) is a cryptographic protocol that encrypts data transmitted between a web browser and server, ensuring secure communication (used in HTTPS).
7. The IT Act 2000 in India provides legal recognition to: (a) Physical documents only (b) Electronic records and digital signatures (c) Only digital signatures (d) Only cyber crimes
Answer(b) Electronic records and digital signatures Explanation: The IT Act 2000 provides legal recognition to electronic records and digital signatures, making them legally equivalent to physical documents and handwritten signatures.
8. Spyware is a type of malware that: (a) Corrupts system files (b) Secretly monitors user activity and collects personal information (c) Displays advertisements (d) Replicates itself through networks
Answer(b) Secretly monitors user activity and collects personal information Explanation: Spyware secretly tracks user activity (browsing habits, keystrokes) and transmits personal information to third parties without the user's knowledge or consent.
9. Encryption converts data into: (a) Compressed form (b) Readable plain text (c) Unreadable coded form (d) Backup form
Answer(c) Unreadable coded form Explanation: Encryption converts plain text into an unreadable coded form (cipher text) using a key, so that only authorised parties with the decryption key can read it.
10. A digital certificate is issued by: (a) Any user (b) A Certifying Authority (CA) (c) A web browser (d) An internet service provider
Answer(b) A Certifying Authority (CA) Explanation: A digital certificate is issued by a trusted Certifying Authority (CA) that verifies the identity of the certificate holder and binds it to a public key.
II. Fill in the Blanks
1. A virus is a malicious program that attaches itself to a legitimate file and requires user action to execute. 2. A worm replicates itself and spreads through networks automatically without attaching to a file. 3. A Trojan horse is malware disguised as legitimate software that creates a backdoor for attackers. 4. Phishing is a fraudulent attempt to obtain sensitive information by pretending to be a trustworthy entity. 5. A firewall monitors and controls network traffic to protect against unauthorised access. 6. Encryption converts data into an unreadable coded form using a cryptographic key. 7. SSL stands for Secure Sockets Layer, a protocol that encrypts data between browser and server. 8. The IT Act 2000 is India's primary law governing cyber crime and electronic commerce. 9. A digital certificate is an electronic document issued by a Certifying Authority that verifies identity and contains a public key. 10. Spyware secretly monitors user activity and collects personal information without consent.
III. True or False
1. A virus can spread without user action.
AnswerFalse A virus requires user action (such as opening an infected file) to execute and spread. A worm spreads automatically. 2. A worm does not need to attach itself to a file. — True. A worm is a standalone program that self-replicates and spreads through networks without attaching to a host file. 3. A Trojan horse can self-replicate. — False. A Trojan horse does not self-replicate; it disguises itself as legitimate software to trick users into installing it. 4. Phishing uses fake emails or websites to steal personal information. — True. Phishing attacks use fraudulent emails, messages, or websites that appear legitimate to trick users into revealing passwords, card numbers, etc. 5. A hardware firewall is installed on individual computers. — False. A hardware firewall is a separate physical device placed between the network and the internet. A software firewall is installed on individual computers. 6. Antivirus software can detect and remove viruses, worms, and trojans. — True. Modern antivirus software detects and removes various types of malware including viruses, worms, trojans, and spyware. 7. Encryption makes data more readable. — False. Encryption converts data into an unreadable coded form; only authorised parties with the decryption key can read it. 8. HTTPS is more secure than HTTP. — True. HTTPS uses SSL/TLS encryption, making it more secure than HTTP, which transmits data in plain text. 9. The IT Act 2000 applies only to cyber crimes in India. — False. The IT Act 2000 covers cyber crimes, electronic commerce, digital signatures, and legal recognition of electronic records — not just cyber crimes. 10. Spyware collects personal information with the user's consent. — False. Spyware secretly monitors user activity and collects personal information without the user's knowledge or consent.
IV. Match the Following
Set A:
| Column A | Column B |
|---|
| 1. Virus | (c) Attaches to a file, needs user action |
| 2. Worm | (a) Self-replicates, spreads through networks |
| 3. Trojan horse | (d) Disguised as legitimate software |
| 4. Spyware | (e) Secretly monitors user activity |
| 5. Phishing | (b) Fraudulent attempt to steal sensitive information |
Set B:
| Column A | Column B |
|---|
| 1. Firewall | (d) Monitors and controls network traffic |
| 2. Antivirus | (a) Detects and removes malware |
| 3. SSL | (e) Encrypts data between browser and server |
| 4. Digital certificate | (b) Verifies identity, issued by CA |
| 5. Encryption | (c) Converts data into unreadable coded form |
V. Short Answer Questions
1. Differentiate between virus, worm, and trojan horse.
Answer
| Feature | Virus | Worm | Trojan Horse |
|---|
| Nature | Attaches to a file | Standalone program | Disguised as legitimate software |
| Replication | Requires user action to spread | Self-replicates automatically | Does not self-replicate |
| Spreading | Through infected files, USBs | Through networks | Through downloads, email attachments |
| Purpose | Corrupts or modifies files | Consumes bandwidth, slows network | Creates backdoor for attackers |
| Example | ILOVEYOU, Melissa | Code Red, Conficker | Zeus, Back Orifice |
2. What is phishing? How can it be prevented?
Answer
Phishing is a cyber attack where an attacker sends fraudulent emails or creates fake websites that appear to be from a trusted source (banks, companies) to trick users into revealing sensitive information (passwords, credit card numbers, OTP).
Prevention:
- Do not click on suspicious links in emails or messages
- Verify the website URL before entering personal information (look for HTTPS and correct domain)
- Never share OTPs, PINs, or passwords via email or phone
- Use two-factor authentication (2FA) for additional security
- Check for spelling errors and generic greetings in emails (signs of phishing)
- Report suspicious emails to the concerned organisation
3. What is a firewall? Name its types.
Answer
A firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between a trusted internal network and untrusted external networks (like the internet).
Types:
- Hardware firewall — a separate physical device placed between the network and the internet; protects an entire network
- Software firewall — installed on individual computers; protects a single device
4. What is encryption? Name its types.
Answer
Encryption is the process of converting plain text data into an unreadable coded form (cipher text) using a cryptographic key, so that only authorised parties with the correct key can decrypt and read the data.
Types:
- Symmetric encryption — uses the same key for both encryption and decryption. Fast but requires secure key exchange. Example: AES.
- Asymmetric encryption — uses a public key for encryption and a private key for decryption. Slower but more secure for key exchange. Example: RSA.
5. What is a digital certificate? What does it contain?
Answer
A digital certificate is an electronic document issued by a Certifying Authority (CA) that verifies the identity of a website or individual and binds it to a public key.
Contents:
- Certificate holder's name/identity
- Public key of the holder
- Certificate serial number
- Validity period (start and expiry dates)
- Name of the issuing Certifying Authority (CA)
- Digital signature of the CA
Purpose: Ensures that the website or individual is legitimate and that data exchanged is encrypted and secure.
6. Write a short note on the IT Act 2000.
Answer
The Information Technology Act 2000 is India's primary legislation governing cyber crime, electronic commerce, and digital signatures. It was enacted to provide legal recognition to electronic records and transactions.
Key provisions:
- Legal recognition of electronic records and digital signatures
- Penalises cyber crimes: hacking (Section 66), publishing obscene information (Section 67), identity theft
- Establishes the Cyber Appellate Tribunal
- Provides for the appointment of the Controller of Certifying Authorities
- Amended by IT Act Amendment 2008 to include provisions on data protection, cyber terrorism, and privacy
VI. Detailed Answer Questions
1. Explain the various types of cyber security threats in detail.
1. Virus:
Answer
- A malicious program that attaches itself to a legitimate file or program
- Requires user action (opening a file, running a program) to activate
- Can corrupt data, delete files, slow down the system, or display unwanted messages
- Spreads through infected files, USB drives, email attachments
- Examples: ILOVEYOU, Melissa, CIH (Chernobyl)
2. Worm:
Answer
- A standalone malicious program that self-replicates and spreads through networks
- Does NOT need to attach to a file or require user action
- Consumes network bandwidth, slows down systems, can carry harmful payloads
- Spreads through network connections, email, and operating system vulnerabilities
- Examples: Code Red, Conficker, WannaCry (worm component)
3. Trojan Horse:
Answer
- Disguised as legitimate or useful software to trick users into installing it
- Does NOT self-replicate
- Creates a backdoor for attackers to access the system remotely
- Can steal data, install additional malware, or take control of the system
- Examples: Zeus (banking trojan), Back Orifice, Emotet
4. Spyware:
Answer
- Secretly monitors user activity (browsing habits, keystrokes) and collects personal information
- Sends collected data to third parties without user knowledge or consent
- Can record passwords, credit card numbers, and browsing history
- Often bundled with free software downloads
- Examples: Keyloggers, browser hijackers, tracking cookies
5. Adware:
Answer
- Automatically displays unwanted advertisements (pop-ups, banners) on the user's screen
- May track browsing habits to show targeted ads
- Not always malicious but can be annoying and invade privacy
- Often bundled with free software
6. Phishing:
Answer
- Fraudulent attempt to obtain sensitive information by posing as a trustworthy entity
- Uses fake emails, messages, or websites that look like legitimate ones
- Targets passwords, credit card numbers, OTPs, and personal data
- Types: email phishing, spear phishing (targeted), smishing (SMS phishing), vishing (voice phishing)
7. Hacking:
Answer
- Unauthorised access to a computer system or network
- Hackers exploit vulnerabilities in software, weak passwords, or social engineering
- Can result in data theft, system damage, or financial loss
- Types: white hat (ethical), black hat (malicious), grey hat (neither)
8. Ransomware:
Answer
- Encrypts the victim's files and demands a ransom (usually in cryptocurrency) for the decryption key
- Can spread through phishing emails, malicious downloads, or network vulnerabilities
- Examples: WannaCry, Petya, CryptoLocker
2. Describe the security measures for e-commerce: firewall, antivirus, and encryption.
Answer
Firewall: A firewall is a network security system that monitors and controls incoming and outgoing network traffic based on security rules. It acts as a gatekeeper between a trusted internal network and untrusted external networks.
- Hardware firewall — a physical device placed between the network and the internet; protects the entire network
- Software firewall — installed on individual computers; protects a single device
Functions:
- Blocks unauthorised access attempts
- Filters traffic based on IP addresses, ports, and protocols
- Prevents malware from entering the network
- Logs network activity for monitoring
Antivirus Software: Antivirus is a program that detects, prevents, and removes malicious software (viruses, worms, trojans, spyware, adware).
Functions:
- Scans files and programs for known malware signatures
- Monitors system behaviour for suspicious activity (heuristic analysis)
- Quarantines or deletes infected files
- Provides real-time protection by scanning downloads and email attachments
- Regular updates to protect against new threats
Examples: Norton, McAfee, Kaspersky, Avast, Windows Defender
Encryption: Encryption converts plain text data into an unreadable coded form (cipher text) using a cryptographic key, ensuring that only authorised parties with the decryption key can read the data.
Types:
- Symmetric encryption — same key for encryption and decryption (e.g., AES). Fast but requires secure key exchange.
- Asymmetric encryption — uses a public key for encryption and a private key for decryption (e.g., RSA). More secure for key exchange.
Role in e-commerce:
- SSL/TLS encrypts data between browser and server (HTTPS)
- Protects credit card numbers, passwords, and personal data during transmission
- Ensures data integrity and confidentiality
3. Explain the IT Act 2000 and its key provisions for cyber security.
Answer
The Information Technology Act 2000 is India's primary legislation governing electronic commerce, digital signatures, and cyber crime. It was enacted on 17 October 2000 and amended in 2008.
Key Provisions:
| Section | Offence | Penalty |
|---|
| Section 43 | Damage to computer system, unauthorised access | Compensation to affected party |
| Section 66 | Hacking (unauthorised access or damage) | Imprisonment up to 3 years and/or fine up to Rs. 5 lakh |
| Section 66A | Sending offensive messages online | Imprisonment up to 3 years and fine (struck down by SC in 2015) |
| Section 66C | Identity theft | Imprisonment up to 3 years and/or fine up to Rs. 1 lakh |
| Section 66D | Cheating by personation using computer | Imprisonment up to 3 years and/or fine up to Rs. 1 lakh |
| Section 67 | Publishing obscene information electronically | Imprisonment up to 5 years and/or fine up to Rs. 10 lakh |
| Section 69 | Government power to intercept, monitor, decrypt | For national security, sovereignty, public order |
| Section 72 | Breach of confidentiality and privacy | Imprisonment up to 2 years and/or fine up to Rs. 1 lakh |
Other Key Features:
- Legal recognition of electronic records and digital signatures
- Establishment of Cyber Appellate Tribunal
- Appointment of Controller of Certifying Authorities (CCA)
- Provides framework for e-governance and e-commerce
- IT Act Amendment 2008 added provisions on data protection (Section 43A), cyber terrorism (Section 66F), and child pornography (Section 67B)
4. What is a digital certificate? Explain its role in e-commerce security.
Answer
A digital certificate is an electronic document issued by a trusted Certifying Authority (CA) that verifies the identity of a website, organisation, or individual and binds it to a public key.
Contents of a digital certificate:
- Certificate holder's name and identity information
- Public key of the holder
- Certificate serial number
- Validity period (issue date and expiry date)
- Digital signature of the issuing Certifying Authority (CA)
- CA's name and contact information
Role in e-commerce security: 1. Authentication — verifies that the website or individual is who they claim to be 2. Encryption — the public key in the certificate enables SSL/TLS encryption between browser and server 3. Integrity — ensures data has not been tampered with during transmission 4. Trust — browsers display a padlock icon and HTTPS for websites with valid certificates, building user confidence
How it works in e-commerce: 1. When a user visits an e-commerce website, the browser checks the site's digital certificate 2. The browser verifies the certificate with the issuing CA 3. If valid, the browser establishes an encrypted SSL/TLS connection 4. All data exchanged (card numbers, passwords) is encrypted and secure
Types of digital certificates:
- DV (Domain Validated) — basic validation; only confirms domain ownership
- OV (Organisation Validated) — verifies the organisation's identity
- EV (Extended Validation) — highest level; requires rigorous identity verification; displays green bar in browser
5. Compare hardware and software firewalls. How do they protect e-commerce systems?
Answer
| Feature | Hardware Firewall | Software Firewall |
|---|
| Form | Separate physical device | Installed on a computer |
| Scope | Protects an entire network | Protects a single device |
| Cost | More expensive | Less expensive or free |
| Configuration | Requires technical expertise | Easier to configure |
| Performance | Dedicated processing; no impact on host | Uses host system resources |
| Placement | Between network and internet | On individual endpoints |
| Examples | Cisco ASA, Fortinet, SonicWall | Windows Firewall, ZoneAlarm, Comodo |
How firewalls protect e-commerce systems: 1. Block unauthorised access — prevent hackers from entering the network 2. Filter traffic — allow only legitimate traffic based on IP, port, and protocol rules 3. Prevent DDoS attacks — block excessive traffic from overwhelming the server 4. Monitor network activity — log traffic for auditing and intrusion detection 5. Enforce security policies — restrict access to sensitive areas of the e-commerce system
A robust e-commerce security setup typically uses both: a hardware firewall at the network perimeter and software firewalls on individual servers and devices for layered protection.
Common Mistakes
1. Confusing virus with worm — A virus attaches to a file and needs user action; a worm is standalone and spreads automatically. 2. Saying a Trojan replicates itself — Trojans do NOT self-replicate; they disguise themselves as legitimate software. 3. Confusing phishing with hacking — Phishing is tricking users into revealing information; hacking is unauthorised system access. 4. Thinking a firewall removes viruses — A firewall blocks unauthorised network access; antivirus software removes viruses. They serve different purposes. 5. Confusing SSL with encryption — SSL is a protocol that uses encryption; encryption is the process of converting data to coded form. 6. Saying the IT Act 2000 only deals with cyber crime — It also covers legal recognition of electronic records, digital signatures, and e-commerce. 7. Confusing digital signature with digital certificate — A digital signature verifies authenticity of a message; a digital certificate verifies identity and contains a public key.
Exam Checklist
- [ ] Can differentiate virus, worm, Trojan horse, and spyware with examples
- [ ] Can explain phishing and list prevention methods
- [ ] Understand what a firewall is and can compare hardware vs software firewalls
- [ ] Can explain encryption types (symmetric vs asymmetric)
- [ ] Know what a digital certificate contains and its role in e-commerce
- [ ] Can explain SSL/TLS and its role in securing web transactions
- [ ] Know the key sections of IT Act 2000 (Sections 43, 66, 66C, 66D, 67, 72)
- [ ] Can list and explain at least six types of cyber security threats
- [ ] Understand hacking, ransomware, and adware
- [ ] Can explain how antivirus software works