{
  "Module 13: IDS and Firewalls": [
    {
      "question": "1. A software firewall is placed between:",
      "options": [
        "A. Two firewalls",
        "B. Firewall and IDS",
        "C. Firewall and networking components",
        "D. Normal applications and networking components"
      ],
      "num_answers": 1,
      "answer": "D. Normal applications and networking components",
      "answer_keys": ["D"],
      "explanations": {
        "D": "✅ A host (software) firewall mediates traffic between local applications and the network stack.",
        "A": "❌ That describes a DMZ/dual-firewall design, not host firewalls.",
        "B": "❌ IDS is out-of-band for detection; a host firewall sits on the endpoint.",
        "C": "❌ That phrasing better fits a gateway firewall appliance."
      }
    },
    {
      "question": "2. Logs from firewall, IDS, and hosts don’t correlate. Most common cause?",
      "options": [
        "A. Absence of backup arrangement",
        "B. Clocks of the devices were not synchronized",
        "C. Untrained investigation officers",
        "D. Chain of custody not followed"
      ],
      "num_answers": 1,
      "answer": "B. Clocks of the devices were not synchronized",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ Time skew (lack of NTP) causes cross-device log mismatch.",
        "A": "❌ Backups don’t affect timestamp alignment.",
        "C": "❌ Training matters, but timestamps cause the mismatch.",
        "D": "❌ Chain of custody is evidentiary, not time-sync."
      }
    },
    {
      "question": "3. Which layer detail is validated by a firewall to allow/block traffic more granularly?",
      "options": [
        "A. Application layer for header and transport layer for port.",
        "B. Physical layer for header and physical layer for port",
        "C. Data link layer for header and physical layer for port",
        "D. Physical layer for header and network layer for port"
      ],
      "num_answers": 1,
      "answer": "A. Application layer for header and transport layer for port.",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ Next-gen/application firewalls inspect app headers plus transport ports.",
        "B": "❌ Physical layer has no such headers/ports.",
        "C": "❌ Data link headers aren’t used for app decisions.",
        "D": "❌ Network layer addresses, not app headers."
      }
    },
    {
      "question": "4. Low-activity host used as a zombie to evade firewall—what technique?",
      "options": ["A. Idle scanning", "B. Ping scanning", "C. Banner grabbing", "D. Port scanning"],
      "num_answers": 1,
      "answer": "A. Idle scanning",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ Idle scan uses a 'zombie' host’s IPID to stealthily infer open ports.",
        "B": "❌ Just checks host liveness.",
        "C": "❌ Reads service banners, not firewall evasion.",
        "D": "❌ Generic; not the stealth 'zombie' method."
      }
    },
    {
      "question": "5. Sending to a closed port yields no RST—what’s indicated?",
      "options": [
        "A. Firewall scanned is a stateful inspection",
        "B. Firewall scanned is a packet filtering",
        "C. There is no firewall",
        "D. Firewall is malfunctioned"
      ],
      "num_answers": 1,
      "answer": "A. Firewall scanned is a stateful inspection",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ Stateful firewalls often silently drop unsolicited traffic.",
        "B": "❌ Simple packet filters commonly pass a RST from the host.",
        "C": "❌ No firewall would return a normal RST from the host.",
        "D": "❌ Silent drop is expected behavior."
      }
    },
    {
      "question": "6. DB behind firewall and IPS—your recommendation?",
      "options": [
        "A. To implement a strong authentication process and conduct periodic audits",
        "B. No periodic audits are required as the database is already protected by a firewall",
        "C. Current level of security is adequate",
        "D. No periodic audits are required as the database is already monitored by IPS"
      ],
      "num_answers": 1,
      "answer": "A. To implement a strong authentication process and conduct periodic audits",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ Defense-in-depth: auth hardening + regular audits are essential.",
        "B": "❌ Firewalls don’t replace audits.",
        "C": "❌ Premature; control gaps remain.",
        "D": "❌ IPS monitoring ≠ governance/auditing."
      }
    },
    {
      "question": "7. Minimum interfaces for a multi-homed firewall?",
      "options": ["A. 0", "B. 1", "C. 2", "D. 3"],
      "num_answers": 1,
      "answer": "D. 3",
      "answer_keys": ["D"],
      "explanations": {
        "D": "✅ Typically outside, inside, and DMZ (three zones).",
        "C": "❌ Dual-homed is two; multi-homed implies ≥3.",
        "B": "❌ One interface can’t segment networks.",
        "A": "❌ Not possible."
      }
    },
    {
      "question": "8. A packet filtering firewall operates at which OSI layer?",
      "options": ["A. Physical layer", "B. Data link layer", "C. Network layer", "D. Transport layer"],
      "num_answers": 1,
      "answer": "C. Network layer",
      "answer_keys": ["C"],
      "explanations": {
        "C": "✅ Classic filters use IP addresses/protocol at Layer 3 (and ports at L4).",
        "D": "❌ Ports are L4, but packet filters are defined at L3 primarily.",
        "A": "❌ Bits/voltages—not filtering.",
        "B": "❌ MAC switching, not packet filtering."
      }
    },
    {
      "question": "9. Standard port for HTTPS traffic?",
      "options": ["A. 80", "B. 443", "C. 450", "D. 90"],
      "num_answers": 1,
      "answer": "B. 443",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ HTTPS default is 443.",
        "A": "❌ 80 is HTTP.",
        "C": "❌ Not standard.",
        "D": "❌ Not standard."
      }
    },
    {
      "question": "10. Enforce HTTPS to 12.20.12.1 from 12.12.12.0/24—best rule?",
      "options": [
        "A. If (source matches 12.12.12.0/24 and destination matches 12.20.12.1 and port matches 443) then permit",
        "B. If (source matches 12.12.12.0/24 and destination matches 12.20.12.1 and port matches 80) then permit",
        "C. If (source matches 12.12.12.0/24 and destination matches 12.20.12.1 and port matches 90) then permit",
        "D. If (source matches 12.12.12.0/24 and destination matches 12.20.12.1 and port matches 450) then permit"
      ],
      "num_answers": 1,
      "answer": "A. If (source matches 12.12.12.0/24 and destination matches 12.20.12.1 and port matches 443) then permit",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ Whitelist HTTPS only; deny others by default.",
        "B": "❌ HTTP is unencrypted.",
        "C": "❌ Non-standard.",
        "D": "❌ Non-standard."
      }
    },
    {
      "question": "11. Best firewall to prevent SQL injection?",
      "options": [
        "A. Deep packet inspection firewall",
        "B. Web application firewall",
        "C. Network address translation (NAT) firewall",
        "D. Stateful inspection firewall"
      ],
      "num_answers": 1,
      "answer": "B. Web application firewall",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ WAF understands HTTP/SQL patterns and blocks injection payloads.",
        "A": "❌ DPI is a technique; WAF is the purpose-built control.",
        "C": "❌ NAT rewrites addresses only.",
        "D": "❌ Stateful focuses on session state, not app payloads."
      }
    },
    {
      "question": "12. Which firewall type checks outbound traffic most granularly?",
      "options": ["A. Packet Filtering", "B. Stateful", "C. Application", "D. Router"],
      "num_answers": 1,
      "answer": "C. Application",
      "answer_keys": ["C"],
      "explanations": {
        "C": "✅ Application-layer firewalls enforce per-app/protocol rules.",
        "A": "❌ Coarse L3 filtering.",
        "B": "❌ Adds state, not deep app awareness.",
        "D": "❌ Routers aren’t firewalls by default."
      }
    },
    {
      "question": "13. Firewall blocks IRC over port 80 but allows HTTP—what type is used?",
      "options": ["A. Stateful inspection", "B. Packet filtering", "C. Router", "D. First generation"],
      "num_answers": 1,
      "answer": "A. Stateful inspection",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ More advanced (stateful/NGFW) can identify protocols independent of port.",
        "B": "❌ Port-based only; would allow any traffic on 80.",
        "C": "❌ Not application-aware.",
        "D": "❌ First-gen lacked deep protocol ID."
      }
    },
    {
      "question": "14. To decide destination port/application at the transport layer, a firewall checks:",
      "options": ["A. MAC address", "B. IP address", "C. Port number", "D. Subnet mask"],
      "num_answers": 1,
      "answer": "C. Port number",
      "answer_keys": ["C"],
      "explanations": {
        "C": "✅ L4 port identifies service (e.g., 443).",
        "A": "❌ MAC is L2.",
        "B": "❌ IP is L3.",
        "D": "❌ Masks define prefixes, not services."
      }
    },
    {
      "question": "15. To decide application at the application layer, a firewall primarily inspects:",
      "options": ["A. Payload", "B. Encryption key", "C. IP address", "D. Header"],
      "num_answers": 1,
      "answer": "D. Header",
      "answer_keys": ["D"],
      "explanations": {
        "D": "✅ App-layer headers (e.g., HTTP method/host) identify the application protocol.",
        "A": "❌ Payload may be opaque/encrypted; headers are primary cues.",
        "B": "❌ Keys aren’t available to the firewall.",
        "C": "❌ IP is not app-layer."
      }
    },
    {
      "question": "16. Determining port and application at transport vs application layers, a firewall checks:",
      "options": [
        "A. MAC address at transport; IP address at application",
        "B. IP address at transport; subnet mask at application",
        "C. Port number at transport; headers at application",
        "D. Subnet mask at transport; MAC address at application"
      ],
      "num_answers": 1,
      "answer": "C. Port number at transport; headers at application",
      "answer_keys": ["C"],
      "explanations": {
        "C": "✅ L4 = ports, L7 = protocol headers (methods, verbs, etc.).",
        "A": "❌ MAC is L2; IP is L3.",
        "B": "❌ Misassigned layers.",
        "D": "❌ Misassigned layers."
      }
    },
    {
      "question": "17. ACK sent to a known closed port, no RST returned—what firewall?",
      "options": ["A. Stateful firewall", "B. Non-stateful firewall", "C. Both stateful and non stateful", "D. No firewall installed"],
      "num_answers": 1,
      "answer": "A. Stateful firewall",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ Stateful devices drop unsolicited ACKs silently.",
        "B": "❌ Non-stateful typically passes RST from host.",
        "C": "❌ Behavior is specific to stateful.",
        "D": "❌ No firewall would show host RST."
      }
    },
    {
      "question": "18. ACK sent to a known closed port, immediate RST received—what firewall?",
      "options": ["A. Stateful firewall", "B. Non-stateful firewall", "C. Both stateful and non stateful", "D. No firewall installed"],
      "num_answers": 1,
      "answer": "B. Non-stateful firewall",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ A basic filter often allows host’s RST to egress.",
        "A": "❌ Stateful would likely drop it.",
        "C": "❌ Results distinguish them.",
        "D": "❌ A firewall may still be present but not stateful."
      }
    },
    {
      "question": "19. IDS alert: internal PC talks to blacklisted IP—what use to detail incident?",
      "options": ["A. Antivirus signature updates", "B. Firewall / proxy logs", "C. IDS logs", "D. IPS logs"],
      "num_answers": 1,
      "answer": "B. Firewall / proxy logs",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ FW/proxy logs give sessions, URLs, bytes—rich context for egress activity.",
        "C": "❌ IDS shows alert but less transactional detail.",
        "D": "❌ IPS focuses on blocks/prevention events.",
        "A": "❌ Signature updates aren’t investigative data."
      }
    },
    {
      "question": "20. Which IDS will detect and prevent unauthorized access by a wireless device?",
      "options": ["A. AIDS", "B. WIPS", "C. HIDS", "D. SIDS"],
      "num_answers": 1,
      "answer": "B. WIPS",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ Wireless IPS monitors RF spectrum and can block rogue clients/APs.",
        "C": "❌ HIDS monitors host activity, not RF.",
        "D": "❌ 'SIDS' here implies system-based; not wireless.",
        "A": "❌ Not a standard acronym."
      }
    },
    {
      "question": "21. Which IDS can identify a rogue access point?",
      "options": ["A. AIDS", "B. WIPS", "C. HIDS", "D. SIDS"],
      "num_answers": 1,
      "answer": "B. WIPS",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ Purpose-built for wireless threats including rogue APs.",
        "C": "❌ Host-centric.",
        "D": "❌ Not RF-focused.",
        "A": "❌ Not a standard term."
      }
    },
    {
      "question": "22. Capability of a Wireless Intrusion Prevention System (WIPS):",
      "options": ["A. Identify phishing emails", "B. Encrypt wireless traffic", "C. Provides wireless exploits code", "D. Detect rogue access points"],
      "num_answers": 1,
      "answer": "D. Detect rogue access points",
      "answer_keys": ["D"],
      "explanations": {
        "D": "✅ Core function: rogue AP/client detection/mitigation.",
        "B": "❌ Encryption is provided by WLAN security (WPA2/3), not WIPS.",
        "A": "❌ Email security product function.",
        "C": "❌ Offensive tooling, not WIPS."
      }
    },
    {
      "question": "23. Best way to exfiltrate data from DB server monitored by NIDS without alerting it?",
      "options": ["A. Exfiltrate data during out of office hours", "B. Exfiltrate data in small packets", "C. Traffic shaping", "D. Encrypt the data"],
      "num_answers": 1,
      "answer": "D. Encrypt the data",
      "answer_keys": ["D"],
      "explanations": {
        "D": "✅ Encryption blinds signature/content inspection.",
        "B": "❌ Small packets may still match signatures.",
        "A": "❌ Time window doesn’t negate detection.",
        "C": "❌ Shaping changes rate, not content visibility."
      }
    },
    {
      "question": "24. You want to monitor many hosts efficiently—best IDS?",
      "options": ["A. System-based IDS (SIDS)", "B. Host-based IDS (HIDS)", "C. Network-based IDS (NIDS)", "D. Wireless-based IDS (WIDS)"],
      "num_answers": 1,
      "answer": "C. Network-based IDS (NIDS)",
      "answer_keys": ["C"],
      "explanations": {
        "C": "✅ One sensor can see traffic from many hosts/segments.",
        "B": "❌ Scales per host; management overhead.",
        "D": "❌ Wireless-specific only.",
        "A": "❌ Not the standard term."
      }
    },
    {
      "question": "25. A common IDS evasion technique uses:",
      "options": ["A. Password cracking", "B. SQL injection", "C. Unicode characters", "D. Denial of Service (DoS) attack"],
      "num_answers": 1,
      "answer": "C. Unicode characters",
      "answer_keys": ["C"],
      "explanations": {
        "C": "✅ Encoding/Unicode tricks can bypass naive pattern matching.",
        "A": "❌ Not an IDS evasion method.",
        "B": "❌ An attack class, not evasion per se.",
        "D": "❌ DoS overwhelms, doesn’t evade signatures."
      }
    },
    {
      "question": "26. Open-source tool that can sniff, monitor/record traffic, and detect/prevent intrusions:",
      "options": ["A. Snort", "B. Wireshark", "C. John the Ripper", "D. Cryptos"],
      "num_answers": 1,
      "answer": "A. Snort",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ Snort functions as NIDS/NIPS and packet logger.",
        "B": "❌ Wireshark is a protocol analyzer, not IDS/IPS.",
        "C": "❌ Password cracking tool.",
        "D": "❌ Not a standard security tool."
      }
    },
    {
      "question": "27. Anomaly-based IDS vs signature-based IDS—key difference?",
      "options": [
        "A. Anomaly-based IDS produces less false positives",
        "B. Anomaly-based IDS requires less training attributes",
        "C. Anomaly-based IDS can identify unknown attacks",
        "D. Anomaly-based IDS can read encrypted traffic."
      ],
      "num_answers": 1,
      "answer": "C. Anomaly-based IDS can identify unknown attacks",
      "answer_keys": ["C"],
      "explanations": {
        "C": "✅ Detects deviations from baseline, catching zero-days.",
        "A": "❌ Often produces more false positives initially.",
        "B": "❌ Needs training/baselining.",
        "D": "❌ Encrypted traffic is opaque to both unless decrypted."
      }
    },
    {
      "question": "28. Tool used to carry out session splicing attacks:",
      "options": ["A. Cryptanalysis", "B. Whisker", "C. Wireshark", "D. Nmap"],
      "num_answers": 1,
      "answer": "B. Whisker",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ Whisker historically supported session splicing to evade IDS.",
        "A": "❌ General term, not a tool.",
        "C": "❌ Analyzer, not an evasion tool.",
        "D": "❌ Port scanner."
      }
    },
    {
      "question": "29. IDS alerted; you want to analyze captured traffic—use which tool?",
      "options": ["A. NIDS", "B. HIDS", "C. Protocol analyzer", "D. IPS"],
      "num_answers": 1,
      "answer": "C. Protocol analyzer",
      "answer_keys": ["C"],
      "explanations": {
        "C": "✅ Tools like Wireshark dissect packets for investigation.",
        "A": "❌ NIDS raised the alert; analysis is separate.",
        "D": "❌ IPS is prevention; not packet analysis.",
        "B": "❌ HIDS looks at host events, not network captures."
      }
    },
    {
      "question": "30. IDS generates alerts even for authorized admin access—this is a:",
      "options": ["A. Positive alert", "B. Negative alert", "C. False positive alert", "D. True positive alert"],
      "num_answers": 1,
      "answer": "C. False positive alert",
      "answer_keys": ["C"],
      "explanations": {
        "C": "✅ Alert on benign/legitimate behavior = false positive.",
        "D": "❌ True positive = real attack.",
        "A": "❌ Vague term; not standard.",
        "B": "❌ Not a standard classification."
      }
    },
    {
      "question": "31. Attacker encodes packets with Unicode to evade IDS—this is:",
      "options": ["A. Obfuscating", "B. Encryption", "C. Decryption", "D. Compression"],
      "num_answers": 1,
      "answer": "A. Obfuscating",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ Encoding/obfuscation hides intent from simple signatures.",
        "B": "❌ Encryption renders content unreadable, different goal.",
        "D": "❌ Compression reduces size, not evasion.",
        "C": "❌ Reverse of encryption."
      }
    },
    {
      "question": "32. Best description of an obfuscating technique:",
      "options": [
        "A. Converting plaintext into unreadable ciphertext with an encryption algorithm",
        "B. Converting ciphertext back to plaintext via decryption",
        "C. Reducing data size via efficient encoding",
        "D. Disguising malicious traffic to look normal to an IDS"
      ],
      "num_answers": 1,
      "answer": "D. Disguising malicious traffic to look normal to an IDS",
      "answer_keys": ["D"],
      "explanations": {
        "D": "✅ Goal is to avoid detection by blending with benign traffic.",
        "A": "❌ That’s encryption, not obfuscation.",
        "B": "❌ Decryption definition.",
        "C": "❌ Compression, not obfuscation."
      }
    },
    {
      "question": "33. A very common IDS evasion method is:",
      "options": ["A. Unicode character", "B. Tailgating", "C. Jailbreaking", "D. Bluejacking"],
      "num_answers": 1,
      "answer": "A. Unicode character",
      "answer_keys": ["A"],
      "explanations": {
        "A": "✅ Encoding/Unicode variants can bypass naive pattern matches.",
        "B": "❌ Physical access tactic.",
        "C": "❌ Mobile OS restriction removal.",
        "D": "❌ Bluetooth contact messaging."
      }
    },
    {
      "question": "34. Why are Unicode characters widely used for IDS evasion?",
      "options": [
        "A. Unicode is incompatible with most IDSs",
        "B. IDSs typically look for ASCII patterns, so Unicode encodings can bypass checks",
        "C. Unicode is always encrypted and hard to intercept",
        "D. Unicode has higher bit density to hide more info per character"
      ],
      "num_answers": 1,
      "answer": "B. IDSs typically look for ASCII patterns, so Unicode encodings can bypass checks",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ Alternate encodings break simple signature matches.",
        "A": "❌ Modern IDSs support Unicode.",
        "C": "❌ Unicode ≠ encryption.",
        "D": "❌ Bit density is irrelevant here."
      }
    },
    {
      "question": "35. Which IDS is more relevant for a large environment with segmented networks for critical data?",
      "options": [
        "A. Host based intrusion detection system (HIDS)",
        "B. Network based intrusion detection system (NIDS)",
        "C. Packet filtering firewall",
        "D. Stateful inspection"
      ],
      "num_answers": 1,
      "answer": "B. Network based intrusion detection system (NIDS)",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ NIDS can monitor multiple segments centrally.",
        "A": "❌ HIDS scales per endpoint with high overhead.",
        "C": "❌ A firewall isn’t an IDS.",
        "D": "❌ Stateful firewalling ≠ intrusion detection."
      }
    },
    {
      "question": "36. Applicability of a NIDS:",
      "options": [
        "A. Best for monitoring intrusions on individual hosts",
        "B. Best for monitoring intrusions across multiple hosts and segments in large environments",
        "C. Best for blocking malicious traffic from entering a network",
        "D. Best for providing detailed host-level event information"
      ],
      "num_answers": 1,
      "answer": "B. Best for monitoring intrusions across multiple hosts and segments in large environments",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ Centralized visibility across segments is a NIDS strength.",
        "A": "❌ That’s HIDS.",
        "C": "❌ Blocking is IPS/firewall role.",
        "D": "❌ Host-level detail is HIDS/EDR."
      }
    },
    {
      "question": "37. In which device rules is the 'alert' action generally used?",
      "options": ["A. Router rules", "B. IDS rules", "C. SFTP rules", "D. Switch rules"],
      "num_answers": 1,
      "answer": "B. IDS rules",
      "answer_keys": ["B"],
      "explanations": {
        "B": "✅ IDS rule actions include alert/log/pass/drop (varies by engine).",
        "A": "❌ Routers don’t use 'alert' actions in ACLs.",
        "C": "❌ SFTP configs don’t have 'alert' rules.",
        "D": "❌ Switch ACLs don’t use IDS-style actions."
      }
    }
  ]
}
