🎓 BookMCQ
← Back to 15. Security

📝 Worms in operating system security (29 MCQs)

Independent Malware That Replicates Across Systems

A worm is self-contained malicious software that can replicate and spread between computers without attaching itself to a host program. In operating system security, worms commonly exploit network services, weak credentials, or removable media to reach additional systems. Their rapid propagation can consume network bandwidth, increase system load, install payloads, and expose connected machines to further compromise.

Why Network Reachability Enables Rapid Propagation

Unlike viruses, worms do not require users to execute an infected host file for each new infection. They can exploit vulnerable services or other communication paths automatically. Unpatched systems and poorly protected network boundaries make propagation easier, particularly when many computers share the same weakness.

Scanning, Exploitation and Replication

A worm identifies potential targets through available network information or other discovery methods. It attempts to exploit a vulnerability or use compromised credentials, then copies its code to a reachable system. The newly infected machine may repeat the process. Operating system controls, network filtering, and service patching can interrupt this cycle.

Example of a Vulnerable Service Across a Network

Suppose 200 computers run the same unpatched network service. A worm compromises one machine and uses the same weakness to reach other exposed computers. As more hosts become infected, scanning and replication increase traffic and processing load, potentially slowing services even before the worm activates any destructive payload.

Propagation Speed and Network Disruption

Worms can spread rapidly because each infected host may search for additional targets independently. They may consume bandwidth, exhaust process or memory resources, and deliver ransomware or remote access tools. Segmentation, timely updates, endpoint monitoring, and restricted service exposure reduce propagation, although a coordinated response may be needed to contain an outbreak.

Misconceptions About Worm Behaviour

'A worm must attach to an executable file' is false because it replicates independently. 'Every worm needs a user to open an attachment' ignores automatic exploitation of network services. 'Stopping one infected computer always ends an outbreak' is incorrect because other compromised hosts may continue spreading it.

Exam Focus: Worm Replication and Virus Differences

Explain why worms can spread independently and compare their propagation with virus host infection. Trace how an unpatched network service enables repeated compromise. Questions may examine bandwidth consumption, service disruption, segmentation, patch management, and the need to identify and isolate all infected systems during containment.

Key Terms of Worm Security

  • Worm - Self-contained self-replicating malware.
  • Propagation - Spread from one system to another.
  • Target - System selected for infection.
  • Unpatched service - Service missing security updates.
  • Containment - Limiting further infection or damage.
8
Easy
12
Medium
9
Hard

📝 All Worms in operating system security MCQs

Q1. A network administrator discovers a new worm that spreads by masquerading as a legitimate update server. Which immediate action should the admin take to stop the worm's propagation?

A.Block outbound traffic to all servers
B.Update DNS entries to point to the legitimate server
C.Install a firewall rule that drops packets from the malicious IP ✅
D.Disable user accounts
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The correct answer is C because dropping packets from the malicious IP cuts off the worm’s communication channel, preventing further spread. Option A is overly broad and would disrupt legitimate traffic. Option B merely redirects traffic but does not stop the malicious source. Option D does not affect the worm’s network behavior. Stopping the worm at the network layer aligns with real‑world incident response practices.

Q2. Which statement best describes masquerading in the context of network attacks?

A.The attacker pretends to be a different host or user
B.The attacker records and replays a previous transmission ✅
C.The attacker intercepts and alters traffic between two parties
D.The attacker overwhelms a service with traffic
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Masquerading means the attacker pretends to be someone else, typically a trusted host or user, to bypass authentication. Option B describes a replay attack, not masquerading. Option C describes a man‑in‑the‑middle attack. Option D describes a denial‑of‑service attack. Understanding masquerading helps students recognize how attackers gain unauthorized access in real networks.

Q3. What term describes the malicious repeat of a valid data transmission?

A.Masquerading
B.Replay attack ✅
C.Session hijacking
D.Phishing
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The correct answer is B because a replay attack involves reusing a previously captured valid transmission. Option A is a different technique where the attacker pretends to be another entity. Option C involves taking over an active session. Option D is a social‑engineering method. Recognizing replay attacks is essential for designing defenses such as timestamps or nonces.

Q4. A worm spreads by masquerading as a legitimate update server. Which immediate action should the admin take to stop the worm's propagation?

A.Block outbound traffic to all servers ✅
B.Update DNS entries to point to the legitimate server
C.Install a firewall rule that drops packets from the malicious IP
D.Disable user accounts
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Installing a firewall rule that drops packets from the malicious IP (C) directly blocks the worm’s traffic while preserving normal operations. Option A would unnecessarily restrict all outbound traffic. Option B might redirect users but does not stop the malicious source. Option D does not affect the worm’s network communication. Real‑world mitigation often starts with precise firewall rules.

Q5. Why are denial‑of‑service attacks sometimes only detected rather than fully prevented?

A.Because they are impossible to stop ✅
B.Because detection allows mitigation measures to be applied
C.Because they target encryption algorithms
D.Because they exploit physical hardware failures
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Detection is crucial because many DoS attacks can be mitigated by traffic shaping, rate limiting, or scrubbing services once they are identified (B). Option A is false; DoS attacks can be mitigated, though not always fully prevented. Option C is unrelated to DoS. Option D describes a different class of attacks. In practice, security teams often rely on detection to trigger defensive actions.

Q6. A company notices a worm that uses session hijacking to inject malicious code into active SSH sessions. Which logging practice would most likely reveal the hijack?

A.Regular backup logs
B.Unusual login time alerts ✅
C.DNS query logs
D.CPU usage spikes
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Unusual login time alerts (B) can flag a session hijack because the attacker may open a session at odd hours or from unexpected locations. Regular backups (A) do not show real‑time activity. DNS logs (C) are unrelated to SSH sessions. CPU spikes (D) might indicate a problem but are not specific to hijacking. Detecting anomalies in login patterns is a common real‑world technique.

Q7. How does masquerading relate to a breach of authentication?

A.Masquerading bypasses authentication mechanisms
B.Masquerading strengthens authentication ✅
C.Masquerading is unrelated to authentication
D.Authentication prevents masquerading
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Masquerading bypasses authentication by presenting false credentials, allowing the attacker to be accepted as a legitimate entity (A). Option B is opposite of the truth. Option C denies the direct link between the two concepts. Option D suggests authentication can stop masquerading, but once the attacker successfully masquerades, authentication has already been compromised. This relationship is central to many real attacks.

Q8. An email system is vulnerable to replay attacks where old transaction emails are resent. Which protocol feature would best mitigate this risk?

A.Use of timestamps with a nonce ✅
B.Larger email attachments
C.SMTP over HTTP
D.Removing the CC field
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Timestamps combined with a nonce ensure each message is unique and fresh, preventing replay (A). Larger attachments (B) do not affect replay. SMTP over HTTP (C) is not a standard protocol and does not address replay. Removing the CC field (D) is irrelevant to replay protection. Real systems often embed nonces to thwart replay attacks.

Q9. What is the primary goal of a man‑in‑the‑middle attack?

A.To delete data from both ends
B.To intercept and possibly alter communication ✅
C.To cause a denial of service
D.To encrypt all traffic
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The attacker aims to intercept and potentially modify the data flowing between two parties (B). Deleting data (A) is not the main objective. Causing a DoS (C) is a different attack type. Encrypting traffic (D) is unrelated; MITM may actually decrypt or tamper with encrypted traffic. Understanding the goal helps students design appropriate countermeasures.

Q10. A worm uses session hijacking to insert malicious code into an active SSH session. Which SSH feature can prevent this attack?

A.Password‑only authentication
B.Host‑based authentication
C.Use of a Message Authentication Code (MAC) ✅
D.Disabling X11 forwarding
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: A MAC provides integrity checking for each packet, ensuring that tampered packets are detected, which blocks session hijacking (C). Password‑only authentication (A) does not protect the session after establishment. Host‑based authentication (B) authenticates the client but not the session integrity. Disabling X11 forwarding (D) reduces a separate attack surface but does not stop hijacking.

Q11. Which definition correctly describes session hijacking?

A.Replaying old messages
B.Intercepting a live session ✅
C.Overloading a network service
D.Pretending to be another user
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Session hijacking means taking over an active communication session (B). Replaying old messages (A) describes a replay attack. Overloading a service (C) is a denial‑of‑service attack. Pretending to be another user (D) is masquerading. Recognizing the correct definition is key for analyzing real‑world incidents.

Q12. Why does combining replay attacks with message modification increase the attack's impact?

A.It allows privilege escalation ✅
B.It reduces detection probability
C.It speeds worm propagation
D.It encrypts the traffic
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When an attacker not only replays a message but also modifies its contents, they can change parameters such as user IDs or transaction amounts, leading to privilege escalation (A). Reduced detection (B) may be a side effect but is not the primary impact. Speeding propagation (C) is unrelated to modification. Encryption (D) is not a result of this combination.

Q13. A worm spreads by masquerading as a trusted IoT device and then performs a replay attack to send configuration commands. Which layered defenses should a security engineer prioritize?

A.Network segmentation, device authentication, and nonce usage ✅
B.Only antivirus software
C.Disable all IoT devices
D.Increase network bandwidth
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Layered defenses—segmenting the network, authenticating each IoT device, and using nonces to ensure freshness—directly counter both masquerading and replay components (A). Relying solely on antivirus (B) is insufficient. Disabling all IoT (C) is impractical. Increasing bandwidth (D) does not improve security. Multi‑layered controls reflect best practices in real deployments.

Q14. How does a man‑in‑the‑middle attack differ from a simple replay attack in terms of attacker capabilities?

A.MITM can alter messages, replay cannot
B.Replay can alter messages, MITM cannot
C.Both are identical in capability
D.MITM only works on wired networks ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: A man‑in‑the‑middle attacker sits in the communication path and can both read and modify messages (A). A replay attack merely re‑sends captured data without alteration. Options B and C are incorrect descriptions. Option D is false; MITM attacks occur on any medium. Understanding this distinction guides appropriate detection mechanisms.

Q15. An organization detects a worm that exploits a vulnerability to masquerade as a domain controller and then performs a replay attack to grant admin rights. Which forensic evidence would most directly prove the masquerading step?

A.Log of failed logins
B.Presence of forged Kerberos tickets ✅
C.High CPU usage on the server
D.Increased network traffic volume
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Forged Kerberos tickets (B) show that an attacker created credentials that impersonate a domain controller, directly evidencing masquerading. Failed login logs (A) may indicate attempts but not successful impersonation. CPU spikes (C) and traffic volume (D) are indirect and could have many causes. Forensic analysis often looks for forged tickets to confirm impersonation.

Q16. What is the main purpose of authentication in network security?

A.To encrypt data
B.To verify identity ✅
C.To increase bandwidth
D.To monitor traffic
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Authentication's core function is to verify that a user or system is who it claims to be (B). Encryption (A) protects confidentiality, not identity. Bandwidth (C) and traffic monitoring (D) are unrelated to authentication. Recognizing this purpose is fundamental for any security curriculum.

Q17. A user receives a phishing email with a malicious attachment that initiates a worm masquerading as a system process. Which endpoint protection measure would stop the worm at execution?

A.Application whitelisting ✅
B.Disk defragmentation
C.Screen saver activation
D.Password complexity enforcement
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Application whitelisting (A) permits only approved executables, preventing the malicious process from running. Disk defragmentation (B) does not affect execution. Screen savers (C) are unrelated. Password policies (D) protect credential strength, not runtime behavior. Whitelisting is a practical defense used in many organizations.

Q18. Which attack involves an attacker sitting between two communicating parties?

A.Replay attack
B.Man‑in‑the‑middle ✅
C.Denial‑of‑service
D.Phishing
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The man‑in‑the‑middle attack (B) places the attacker in the communication path, allowing interception and possible alteration. Replay attacks (A) resend captured data without necessarily sitting in the flow. Denial‑of‑service (C) overwhelms a service. Phishing (D) is a social‑engineering technique. Knowing the correct term aids scenario analysis.

Q19. Why is absolute protection against worms considered unattainable?

A.Worms evolve quickly ✅
B.The cost of security cannot be infinite
C.Users are always vulnerable
D.All of the above
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: All statements are true: worms adapt, infinite security spending is unrealistic, and human error remains a factor, making absolute protection impossible (D). Option A alone is insufficient, as is B or C individually. This comprehensive view reflects real‑world security budgeting and risk management.

Q20. A worm attempts to exploit a weakness in a web application's authentication mechanism by masquerading as a privileged user. Which secure coding practice would prevent this?

A.Use of prepared statements
B.Role‑based access control ✅
C.Limiting file uploads
D.Enforcing password complexity
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Role‑based access control (B) ensures that even if an attacker masquerades, they cannot obtain privileges beyond what their role permits. Prepared statements (A) protect against injection attacks. File upload limits (C) address different threats. Password complexity (D) improves credential strength but does not stop impersonation. RBAC is a core defense against privilege escalation.

Q21. How does a denial‑of‑service attack differ from a worm‑based attack in terms of impact?

A.DoS disrupts availability, worms spread malware ✅
B.DoS spreads malware, worms disrupt availability
C.Both have identical impacts
D.Neither affects networks
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A denial‑of‑service attack primarily targets availability by overwhelming resources (A). Worms focus on propagating malicious code to compromise systems. Options B and C mischaracterize the attacks, and D is false. Understanding distinct impacts helps students choose appropriate mitigation strategies.

Q22. An enterprise VPN authenticates users via certificates. A worm reuses captured certificate messages in a replay attack. Which protocol feature can prevent this replay?

A.Certificate revocation lists
B.Use of nonces in the handshake ✅
C.Longer certificate lifetimes
D.Static IP address enforcement
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Including a nonce in the handshake ensures each session is unique, making captured messages unusable for replay (B). Revocation lists (A) address compromised certificates but not replay. Longer lifetimes (C) increase exposure. Static IPs (D) do not prevent replay. Real VPN implementations often employ nonces for freshness.

Q23. Why is it important for security countermeasures to make the cost of attack higher than the potential gain?

A.To discourage attackers ✅
B.To increase system speed
C.To reduce hardware costs
D.To improve the user interface
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When attackers find that the effort, time, or resources required exceed the expected payoff, they are less likely to target the system (A). System speed (B), hardware cost (C), and UI (D) are unrelated to attacker motivation. This cost‑benefit principle guides realistic security planning.

Q24. What term describes the malicious repeat of a valid data transmission?

A.Masquerading
B.Replay attack ✅
C.Session hijacking
D.Phishing
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: A replay attack (B) repeats a previously captured valid transmission, allowing the attacker to reuse it maliciously. Masquerading (A) involves identity theft, not repetition. Session hijacking (C) takes over an active session. Phishing (D) is a social‑engineering tactic. Recognizing the term is essential for designing defenses such as timestamps.

Q25. A worm modifies a financial transaction request from 100to100 to10,000. Which cryptographic technique would detect this tampering?

A.Hashing without a secret key
B.Digital signature ✅
C.Base64 encoding
D.URL encoding
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A digital signature (B) provides both integrity and authenticity, revealing any alteration to the transaction amount. Simple hashing without a secret (A) cannot confirm the sender’s identity. Base64 (C) and URL encoding (D) are encoding methods that do not protect against tampering. In practice, digital signatures safeguard critical financial messages.

Q26. Which security principle is violated when an attacker successfully masquerades as a trusted host?

A.Least privilege
B.Defense in depth
C.Authentication ✅
D.Auditing
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: Successful masquerading means authentication (C) was bypassed, allowing the attacker to be accepted as legitimate. Least privilege (A) concerns permission levels, not identity verification. Defense in depth (B) is a strategy rather than a single principle. Auditing (D) records events but does not prevent the initial breach. Recognizing the violated principle guides remediation.

Q27. A network monitoring tool flags repeated identical login attempts from different IP addresses. Which attack type does this pattern most likely indicate?

A.Replay attack ✅
B.Masquerading
C.Man‑in‑the‑middle
D.Denial‑of‑service
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Repeated identical login attempts from many sources often signal a replay attack where captured credentials are being reused (A). Masquerading (B) would involve different credentials. Man‑in‑the‑middle (C) requires interception, not repeated logins. DoS (D) would flood the service but not necessarily use identical credentials. Detecting replay patterns is common in security operations.

Q28. In what way does session hijacking facilitate subsequent worm propagation?

A.By providing a valid session to inject malicious payloads ✅
B.By encrypting the worm
C.By slowing network traffic
D.By deleting system logs
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Hijacking grants the attacker an authenticated session, enabling them to deliver the worm payload without raising alarms (A). Encryption (B) is unrelated to hijacking. Slowing traffic (C) does not aid propagation. Deleting logs (D) may hide activity but does not directly help spread the worm. This insight informs detection of compromised sessions.

Q29. A company implements a policy requiring each critical command to be signed with a one‑time token. How does this policy mitigate both masquerading and replay attacks?

A.Tokens expire after one use, preventing reuse ✅
B.Tokens increase network bandwidth
C.Tokens hide the commands from attackers
D.Tokens replace authentication entirely
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: One‑time tokens become invalid after a single execution, so an attacker cannot reuse (replay) a captured command nor impersonate (masquerade) without the fresh token (A). Increasing bandwidth (B) is irrelevant. Hiding commands (C) does not stop replay. Replacing authentication (D) would eliminate needed verification. One‑time tokens are a practical control in many secure systems.

🔗 Related Topics (MCQs)