Network Security MCQs for NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

Network security is the set of controls that protect data and services as traffic moves between hosts: firewalls decide what may pass, intrusion detection and prevention systems (IDS/IPS) watch for attacks, VPNs carry private traffic across public networks, and defenders need to recognise attacks such as spoofing, sniffing and denial of service. It is the fourth topic in the Cyber Security area, which carries 5% of the NSCT according to HEC's Areas of Competencies. Candidates averaged 47.2% accuracy in this area in 2026, per the HEC NSCT report and APP.

This page follows Stallings' Cryptography and Network Security and Computer Security: Principles and Practice. The protocol details of IPsec and TLS are covered in Network Security (Networks Perspective), and the maths behind them in Cryptography Basics.

Firewalls

A firewall enforces an access policy at the boundary between two networks. Stallings describes four types:

Type Decides using Typical exam clue
Packet filter (stateless) IP addresses, protocol, port of each packet alone "fast, no connection memory"
Stateful inspection Headers plus a table of open connections "allows replies, blocks unsolicited inbound"
Application-level gateway (proxy) Application commands and content "block a URL or an FTP PUT"
Circuit-level gateway Relays TCP connections without reading content "SOCKS"

Rule lists are checked top-down, first match wins. Take this list:

# Action Source Destination Protocol/port
1 Allow any 192.168.10.5 TCP 443
2 Deny 203.0.113.0/24 any any
3 Allow any 192.168.10.0/24 TCP 22
4 Deny any any any

A packet from 203.0.113.9 to 192.168.10.7 on TCP 22 is denied by rule 2, even though rule 3 would allow it. The same source reaching 192.168.10.5 on TCP 443 is allowed by rule 1. Public servers usually sit in a DMZ (demilitarised zone), a segment between the internet and the internal network.

Exam angle: when a question asks for a rule's effect, walk the list in order and stop at the first match.

IDS and IPS

An intrusion detection system monitors traffic or host activity and raises alerts. An intrusion prevention system sits inline and can drop the offending traffic.

Signature-based (misuse) Anomaly-based
Detects Known attack patterns Deviation from a learned normal profile
Zero-day attacks Misses them Can catch them
Main weakness Needs constant signature updates More false positives

A network-based IDS (NIDS) watches a segment, often through a switch's mirror (SPAN) port. A host-based IDS (HIDS) watches logs, files and system calls on one machine, so it can see what happened after TLS decryption. A false positive is an alert on harmless activity; a false negative is a missed attack, which is the more dangerous failure.

Exam angle: "passive, out of band, alerts only" means IDS; "inline, blocks" means IPS.

VPN

A virtual private network builds an encrypted, authenticated tunnel over an untrusted network. Site-to-site VPNs join office networks, usually with IPsec ESP in tunnel mode. Remote-access VPNs connect one user, using IPsec or TLS. IPsec AH authenticates but never encrypts; ESP encrypts and can also authenticate.

Exam angle: a VPN protects data in transit only. It does nothing about malware on the endpoint.

Network attacks

Attack How it works CIA property hit Main defence
SYN flood Many SYNs, handshakes never completed, backlog fills Availability SYN cookies, rate limiting
Smurf Spoofed ICMP echo to a broadcast address; replies flood the victim Availability Disable directed broadcast
DNS/NTP amplification Small spoofed UDP queries trigger large replies to the victim Availability Ingress filtering, close open resolvers
ARP spoofing Fake ARP replies map the gateway's IP to the attacker's MAC Confidentiality, integrity Dynamic ARP inspection, static entries
MAC flooding Fills a switch's CAM table so it floods frames like a hub Confidentiality Port security
IP spoofing Forged source address Authenticity Ingress/egress filtering
Replay Captured valid messages are resent Integrity Nonces, timestamps, sequence numbers

Reconnaissance usually comes first: a port scan (for example a SYN "half-open" scan) finds listening services such as SSH on 22 or RDP on 3389.

Exam angle: decide which CIA property the attack breaks, then pick the control that addresses that layer.

Common traps

Worked examples

1. Understanding. Which IDS approach can detect a never-before-seen attack, at the cost of more false alarms? Answer: anomaly-based detection. It flags behaviour that departs from a learned baseline, so it does not need a signature; the price is that unusual but legitimate activity also triggers alerts.

2. Application. Using the four-rule list above, what happens to a UDP packet from 198.51.100.4 to 192.168.10.5 on port 53? Answer: denied by rule 4. Rule 1 needs TCP 443, rule 2 needs a 203.0.113.0/24 source and rule 3 needs TCP 22, so none match. The default deny at the end catches it.

3. Analysis. On a switched LAN, an attacker suddenly sees every colleague's traffic. The switch's MAC table is full of thousands of random addresses. What happened and what fixes it? Answer: MAC flooding; enable port security. When the CAM table overflows, the switch floods unknown-destination frames out of every port, so sniffing works. Limiting MAC addresses per port stops the overflow.

Practise

The quiz below has 100 questions on Network Security, filterable by tier and difficulty.

Practise: 100 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. Which firewall type examines each packet's IP addresses, protocol and port numbers in isolation, keeping no record of earlier packets?

    1. Stateful inspection firewall
    2. Application-level gateway
    3. Stateless packet filter
    4. Circuit-level gateway
    Show answer

    Answer: C. Stateless packet filter

    A stateless packet filter judges every packet only on its own header fields, so it is fast but has no connection memory. Stateful firewalls keep a connection table, and the two gateway types work at the connection or application level.

  2. What is the main purpose of a DMZ in a network design?

    1. To speed up internal file transfers
    2. To encrypt all traffic leaving the organisation
    3. To assign private IP addresses to hosts
    4. To isolate publicly reachable servers from the internal network
    Show answer

    Answer: D. To isolate publicly reachable servers from the internal network

    A demilitarised zone holds servers the internet must reach, such as web and mail servers. If one is compromised, a second firewall boundary still separates the attacker from internal hosts.

  3. Which device monitors traffic and raises alerts but, in its basic form, does not block anything?

    1. Intrusion prevention system (IPS)
    2. Stateful firewall
    3. Proxy server
    4. Intrusion detection system (IDS)
    Show answer

    Answer: D. Intrusion detection system (IDS)

    An IDS is passive: it usually receives a copy of traffic (for example from a SPAN port) and alerts on suspicious activity. An IPS sits inline and can drop packets; firewalls and proxies enforce policy by allowing or blocking.

  4. A signature-based IDS is weakest against which kind of attack?

    1. A zero-day attack with no known pattern
    2. A well-known worm
    3. A port scan using standard tools
    4. A brute-force login attempt
    Show answer

    Answer: A. A zero-day attack with no known pattern

    Signature (misuse) detection matches traffic against patterns of known attacks. A brand-new attack has no signature yet, so it passes unnoticed; anomaly-based detection is the approach that can catch it.

  5. Which IPsec protocol provides confidentiality by encrypting the payload?

    1. AH (Authentication Header)
    2. IKE (Internet Key Exchange)
    3. ESP (Encapsulating Security Payload)
    4. ISAKMP
    Show answer

    Answer: C. ESP (Encapsulating Security Payload)

    ESP encrypts the payload and can also provide integrity. AH gives integrity and origin authentication only, never encryption. IKE and ISAKMP negotiate keys and security associations; they do not protect data packets themselves.

  6. Which port and protocol does SSH use by default?

    1. TCP 23
    2. TCP 22
    3. UDP 22
    4. TCP 443
    Show answer

    Answer: B. TCP 22

    SSH listens on TCP port 22 by default. Port 23 is Telnet, which sends everything including passwords in cleartext, and 443 is HTTPS. SSH needs a reliable byte stream, so it uses TCP, not UDP.

  7. Sending thousands of TCP SYN segments without completing the handshake mainly attacks which security property?

    1. Confidentiality
    2. Integrity
    3. Availability
    4. Non-repudiation
    Show answer

    Answer: C. Availability

    A SYN flood fills the server's backlog of half-open connections so legitimate clients cannot connect. Nothing is read or altered, so the target is availability.

  8. In an IDS, what is a false negative?

    1. A harmless event reported as an attack
    2. A correctly reported attack
    3. A real attack that the IDS fails to report
    4. A harmless event correctly ignored
    Show answer

    Answer: C. A real attack that the IDS fails to report

    A false negative is a missed attack: the IDS says 'negative' (no attack) but the event was malicious. A harmless event flagged as an attack is a false positive. False negatives are usually the more dangerous error.

  9. Which attack sends forged ARP replies so that traffic meant for the gateway reaches the attacker's machine?

    1. ARP spoofing (ARP poisoning)
    2. DNS cache poisoning
    3. MAC flooding
    4. Smurf attack
    Show answer

    Answer: A. ARP spoofing (ARP poisoning)

    ARP has no authentication, so an attacker can announce 'the gateway's IP is at my MAC'. Hosts update their ARP caches and send traffic through the attacker, giving a man-in-the-middle position on the LAN.

  10. Which firewall type can block an HTTP request for a specific URL while allowing other pages on the same site?

    1. Stateless packet filter
    2. Stateful inspection firewall
    3. Application-level gateway (proxy)
    4. Circuit-level gateway
    Show answer

    Answer: C. Application-level gateway (proxy)

    Only an application-level gateway parses the application protocol, so it can see the URL inside an HTTP request. Packet filters and stateful firewalls see IP and port information only, and a circuit-level gateway relays TCP connections without inspecting content.

FAQs

What is the difference between a firewall and an IDS?

A firewall enforces a policy: it allows or blocks traffic based on rules. An IDS does not block anything; it watches traffic or host activity and raises alerts when it sees signs of an attack. An IPS combines the two ideas by sitting inline and dropping traffic that matches attack signatures or anomalies.

What is a DMZ in network security?

A DMZ is a separate network segment for servers the public must reach, such as web and mail servers. Firewalls sit between the internet and the DMZ and between the DMZ and the internal network. If a DMZ server is compromised, the attacker still has to pass another filter to reach internal systems.

Is a VPN the same as a firewall?

No. A VPN encrypts and authenticates traffic between two endpoints so outsiders cannot read or alter it. A firewall decides which traffic is allowed at all. Many devices do both jobs, but they solve different problems: VPNs protect confidentiality in transit, while firewalls enforce access control.

What is the difference between DoS and DDoS?

A denial-of-service attack comes from one source, so blocking that source often stops it. A distributed denial-of-service attack uses many machines, usually a botnet, so there is no single address to block. Both target availability; DDoS defence relies on upstream filtering, rate limiting and scrubbing services.

Next step

Continue with Operating System Security MCQs, or review Security Principles and Malware & Attack Techniques. Browse all topics on the Cyber Security hub, then take an NSCT mock test.