📝 Logic bomb in operating system security (9 MCQs)
Condition Activated Malicious Program Code
A logic bomb is malicious code designed to remain inactive until a specified condition becomes true. In operating system environments, the triggering condition may involve a date, time, user action, account status, or system event. Once activated, the code performs an unauthorised action such as deleting files, modifying records, or disrupting a service.
Why Delayed Activation Makes Detection Difficult
Code that behaves normally during routine use may escape casual observation and basic functional testing. A trigger may activate only after an employee leaves an organisation or a particular date arrives. This delayed behaviour makes code review, change control, and monitoring important even when an application appears to work correctly.
Trigger Evaluation and Payload Execution
The program contains a condition that is evaluated during execution or by a scheduled process. While the condition is false, the harmful routine remains dormant. When the condition becomes true, the program executes its payload under the permissions of the process or account running it.
Example of a Date Based File Deletion
Suppose a compromised administrative script contains code that checks whether the system date has reached 1 January. Before that date, it performs routine maintenance. When the date condition becomes true, it attempts to delete selected files. Access controls and monitored change procedures may restrict or reveal the action.
Impact and Organisational Prevention
Logic bombs can cause targeted data loss, service interruption, or unauthorised modification. Separation of duties, source-code review, version control, restricted execution privileges, and independent backups reduce their impact. Automated testing may miss a condition that is not exercised, so reviews should examine unusual triggers and privileged scripts.
Misconceptions About Logic Bombs
'A logic bomb activates immediately when installed' is false because it waits for a trigger. 'Every scheduled task is a logic bomb' ignores legitimate automation with authorised purposes. 'A dormant program cannot be dangerous' is incorrect because its stored conditional code may execute later with significant privileges.
Exam Focus: Trigger Conditions and Payloads
Identify the activation condition separately from the harmful payload. Distinguish a logic bomb from a virus, worm, and Trojan by its conditional execution. Questions may provide a date or event trigger and ask when the malicious action occurs, which permissions it inherits, and how code review and backups reduce damage.
Key Terms of Logic Bombs
- Logic bomb - Malicious code activated by a condition.
- Trigger - Condition that activates the payload.
- Payload - Action performed after activation.
- Dormant code - Code not yet activated.
- Change control - Approval and tracking of modifications.
📝 All Logic bomb in operating system security MCQs
Q1. What is a logic bomb in computer security?
📖 Explanation: A logic bomb is malicious code designed to remain dormant until a predefined condition—such as a date, user action, or system event—triggers its execution. Option A correctly captures this behavior. Option B describes ransomware, which encrypts data rather than waiting for a condition. Option C refers to a firewall rule, a network control, not malicious code. Option D mentions an antivirus update, a defensive measure. Recognizing the definition helps identify stealthy threats in real systems.
Q2. How does a logic bomb differ from a traditional computer virus?
📖 Explanation: The key distinction is that a logic bomb waits for a trigger condition before executing, whereas a virus actively replicates itself to spread across systems. Option C states this accurately. Option A confuses ransomware behavior with logic bombs. Option B incorrectly suggests hardware modification, which is not typical for either. Option D mischaracterizes the need for user interaction; many viruses run autonomously. Understanding this difference aids analysts in selecting appropriate detection strategies.
Q3. Why are logic bombs often embedded in legitimate applications rather than delivered as separate files?
📖 Explanation: Embedding a logic bomb in a trusted application allows it to inherit the application's legitimate access rights, making detection harder and avoiding user suspicion. Option B correctly explains this motive. Option A is inaccurate; logic bombs are typically small. Option C misstates any effect on bandwidth, which is unrelated. Option D incorrectly claims a graphical interface is required. Knowing this tactic helps defenders scrutinize privileged software for hidden malicious code.
Q4. A company discovers a logic bomb that will delete logs on March 1. Which detection method is most likely to identify it before activation?
📖 Explanation: Heuristic behavior monitoring examines program actions for suspicious patterns, such as scheduled deletions, and can flag a dormant payload before its trigger date. Option D therefore offers the best chance of early detection. Signature‑based scanning (Option A) relies on known code signatures, which a custom logic bomb lacks. Network traffic analysis (Option B) would miss a local file‑based trigger. Password audits (Option C) address credential strength, not malicious code behavior. Applying heuristics aligns with proactive security.
Q5. A logic bomb is programmed to elevate privileges and install a backdoor when a specific admin account logs in. Which mitigation strategy provides the strongest defense?
📖 Explanation: Mandatory access controls (MAC) enforce strict policies that prevent processes from exceeding their authorized privileges, even if a logic bomb attempts escalation, making it the most robust defense. Option A is correct. Regular patching (Option B) improves overall security but does not stop a correctly coded privilege‑escalation payload. Disabling admin accounts (Option C) is impractical for needed operations. Full‑disk encryption (Option D) protects data at rest, not runtime privilege abuse. Hence MAC directly mitigates the bomb’s core objective.
Q6. Why are signature‑based antivirus tools generally ineffective against logic bombs?
📖 Explanation: Signature‑based AV relies on known code patterns; a logic bomb remains inert until a specific, often rare, trigger occurs, so its malicious code never appears during a scan. Option B correctly identifies this limitation. Option A suggests encryption hiding, which is not the primary issue. Option C incorrectly limits activity to mobile platforms. Option D mentions polymorphism, which affects detection but is not the main reason logic bombs evade signatures. Understanding this helps organizations adopt behavior‑based defenses.
Q7. A company uses scheduled tasks to run maintenance scripts. Which policy reduces the risk of logic bomb insertion?
📖 Explanation: Requiring code signing ensures that only authenticated, trusted scripts can be scheduled, preventing unauthorized modifications that could embed a logic bomb. Option C correctly reflects this protective measure. Allowing unrestricted editing (Option A) opens the door for malicious inserts. Storing scripts on an unrestricted shared drive (Option B) does not guarantee integrity. Disabling logging (Option D) removes valuable forensic data, worsening detection. Code signing directly addresses integrity of scheduled tasks.
Q8. What is the relationship between insider threats and logic bombs?
📖 Explanation: Insiders, who have legitimate access, can embed logic bombs within trusted systems to cause damage at a later, often covert, time, making option D correct. Option A denies any connection, which is false. Option B incorrectly limits logic bombs to external actors. Option C suggests insiders lack capability, which is inaccurate. Recognizing that insiders may plant logic bombs underscores the need for insider‑risk monitoring and strict change‑control processes.
Q9. Which term describes malicious code that activates at a specific date or event?
📖 Explanation: The definition matches a logic bomb, which is malicious code designed to trigger on a predefined date or event. Option A correctly names this threat. A worm (Option B) spreads autonomously without a timed trigger. Spyware (Option C) covertly gathers information, not necessarily timed. A rootkit (Option D) hides its presence and grants privileged access, but does not rely on a specific activation condition. Knowing the term helps security teams classify and respond to time‑based attacks.