Network Security MCQs for NSCT
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
- Assuming a lower rule can override an earlier match. In first-match lists it cannot, so "deny all" goes last.
- Saying a stateless packet filter can block a malicious URL. Only an application-level gateway sees content.
- Calling IDS false positives the worst outcome. A false negative means a real attack went unnoticed.
- Thinking a VPN or HTTPS stops malware. Both protect the channel, not the endpoint.
- Mixing up smurf (ICMP to a broadcast address) and SYN flood (TCP half-open connections).
- Forgetting that DNS queries use UDP 53 by default, which is why DNS is popular for amplification.
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
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.