Chapter 8: Network Intrusion Detection and Alert Classification

Learning Objectives

Section 1: Event Source Mapping

A security event is any observable occurrence on a network or system that may have security implications. Before an analyst can investigate anything, they must understand which technology produced the alert — because the data format, fidelity, and meaning differ significantly between sources.

1.1 The Five Primary Event Sources

Source TechnologyWhat It MonitorsTypical Event Data
IDS/IPSNetwork traffic patterns and signaturesTimestamp, src/dst IP, port, protocol, signature ID, severity, rule name
Firewall / NGFWPacket headers, sessions, application identityAllow/deny action, interface, NAT info, application name, rule matched
Proxy / App ControlHTTP/HTTPS URLs, application trafficUser, URL, category, action, bytes transferred, MIME type
Antivirus / EDRFile hashes, process behavior, memoryFilename, hash, process name, detection name, host identity
NetFlow / IPFIXFlow-level metadata (no payload)Src/dst IP, src/dst port, protocol, byte count, packet count, flow duration

NetFlow tells you that 50 GB left the network overnight to an unfamiliar IP — but not what those bytes contained. An IDS alert fires on a signature match, but only DPI confirms what was in the payload. True situational awareness requires correlating events across all five sources in a SIEM.

Security Event Sources Feeding the SIEM IDS / IPS Signature & anomaly alerts Firewall / NGFW Allow / Deny logs Proxy / App Control URL & user activity Antivirus / EDR File & process events NetFlow / IPFIX Flow metadata SIEM Correlation Engine Event normalization SOC Analyst Triage & Response MITRE ATT&CK mapping Correlated alert Each source sees a different slice: NetFlow = who/when/how much | IDS = pattern match | AV = file identity | Proxy = URL behavior | FW = permit/deny SIEM correlation across all five sources is required for accurate threat determination. ↻ Replay

1.2 IDS vs. IPS Event Generation

An IDS operates in passive mode — it monitors a copy of network traffic and generates alerts when it detects patterns matching known attack signatures or statistical anomalies. It takes no blocking action. An IPS operates inline — traffic passes through the device, and it can drop, reset, or quarantine packets in real time.

Detection methods used by IDS/IPS:

1.3 Proxy, Antivirus, and NetFlow Correlation

When an IDS fires an alert for a suspicious outbound connection, the proxy log reveals whether a user manually visited a malicious site or whether the connection was automated (possible C2 beaconing). AV/EDR events link network activity to endpoint behavior — a NetFlow anomaly showing data exfiltration gains much more meaning when correlated with an AV event showing a ransomware dropper executed 10 minutes earlier.

NetFlow records who talked to whom, when, for how long, and how much data transferred — without capturing payload content. It is invaluable for baselining normal traffic patterns and detecting anomalies at scale.

Key Points — Event Source Mapping

Pre-Check: Event Source Mapping

1. Which event source captures flow metadata (src/dst IP, ports, byte counts) but does NOT capture payload content?

2. An IDS sensor detects a suspicious outbound connection from host 10.1.5.22. Which complementary source would best reveal whether the connection was user-initiated browsing or automated C2 beaconing?

3. A Next-Generation Firewall (NGFW) log shows that permitted traffic on port 443 is actually a BitTorrent client. Which NGFW capability enables this identification?

Section 2: Alert Classification and Triage

2.1 The Four-Category Classification Model

ClassificationReal-World SituationAlert Fired?Threat Real?Analyst Action
True Positive (TP)Port scan from external attackerYesYesInvestigate and respond
False Positive (FP)Vulnerability scanner triggers IDS rulesYesNoTune rule or whitelist scanner
True Negative (TN)Normal HTTPS web browsing passes silentlyNoNoNo action needed
False Negative (FN)Zero-day exploit bypasses all signaturesNoYesMost dangerous — missed threat

False Positives are the bane of SOC operations. An IDS that fires constantly on legitimate traffic trains analysts to ignore alerts — the security equivalent of the boy who cried wolf. False Negatives represent the most dangerous failure mode: a missed real threat may result in an undetected breach.

2.2 SOC Extended Classification: Benign and Suspicious

2.3 Alert Triage Walkthrough

IDS fires: [Priority: 2] Potential C2 Beacon | 10.1.5.22:49812 -> 198.51.100.5:443

  1. Verify the source asset: 10.1.5.22 is a Windows workstation in finance, assigned to user jsmith.
  2. Check NetFlow: 47 connections to 198.51.100.5 in 6 hours, each lasting exactly 60 seconds with 512 bytes outbound — characteristic C2 beaconing regularity.
  3. Check proxy logs: Connections not recorded in proxy — traffic bypasses it (possible malware using direct IP communication).
  4. Check antivirus: No AV alert, but logs show suspicious PowerShell execution 8 hours ago.
  5. MITRE ATT&CK mapping: Aligns with T1071.001 (Application Layer Protocol: Web Protocols) and T1071 (C2).
  6. Classification: True Positive — Initiate incident response, isolate the host.

2.4 Alert Fatigue and Prioritization

Effective prioritization strategies:

Alert Classification: 2×2 Matrix Threat Exists? NO (benign activity) YES (real attack) Alert Fired? YES NO TRUE POSITIVE Alert fired. Threat is real. ACTION: Initiate incident response Example: Port scan from confirmed malicious IP GOAL: Maximize these FALSE POSITIVE Alert fired. No real threat. ACTION: Tune rule / whitelist Example: Vuln scanner triggers IDS rules Causes: alert fatigue TRUE NEGATIVE No alert. No threat. ACTION: None required Example: Normal HTTPS browsing passes silently Expected, desired outcome FALSE NEGATIVE No alert. Real threat missed. MOST DANGEROUS failure mode Example: Zero-day exploit bypasses all signatures Fix: behavioral analytics, TI Tip: FP drives alert fatigue — FN allows breaches to succeed undetected ↻ Replay

Key Points — Alert Classification and Triage

Pre-Check: Alert Classification

4. A vulnerability scanner run by the IT security team triggers 50 IDS alerts. The team confirms this is their authorized scan. How should these alerts be classified?

5. Which failure mode is MOST dangerous from a security operations perspective?

6. An analyst receives an IDS alert about a host making 47 identical 512-byte outbound connections to the same IP over 6 hours, each exactly 60 seconds apart. This regular timing pattern is most characteristic of:

Section 3: Deep Packet Inspection and Firewall Comparison

Firewall technology has evolved through three distinct generations, each increasing visibility into network traffic at the cost of additional processing overhead. Modern networks deploy all three simultaneously — each protecting different layers.

3.1 Generation 1: Packet Filtering (Stateless)

Packet filtering firewalls operate at OSI Layers 3 and 4. They examine each packet in complete isolation — no memory of previous packets, no concept of a TCP session, no awareness of what follows in the data stream.

3.2 Generation 2: Stateful Inspection

Stateful inspection maintains a state table — a database of active network connections tracking each session's five-tuple (src IP, dst IP, src port, dst port, protocol) and current TCP state.

State Table Entry:
  Protocol:     TCP
  Src IP:Port   192.168.1.100:54321
  Dst IP:Port   93.184.216.34:443
  State:        ESTABLISHED
  TTL:          300s
  Bytes:        14,832

A forged packet claiming to be part of this session is dropped if its sequence numbers don't match the state table. Limitation: Still cannot see inside the payload — an ESTABLISHED HTTPS session could be carrying malware.

3.3 Generation 3: Deep Packet Inspection (DPI)

DPI examines the complete contents of a packet, including its payload. DPI can reconstruct application-layer protocols, identify the actual application regardless of port number, and scan for content patterns.

3.4 Comprehensive Comparison

FeaturePacket FilteringStateful InspectionDPINGFW
Inspection depthHeaders onlyHeaders + session stateHeaders + payloadHeaders + state + payload + app identity
Session awarenessNoYesYesYes
Application identificationNoNoPartialYes
Malware detectionNoNoYesYes (with sandboxing)
TLS inspectionNoNoOptionalYes
Performance impactMinimalLow–MediumHighVery High
Typical use caseRouter ACLsPerimeter firewallNGFW componentEnterprise perimeter
Firewall Inspection Depth — Packet Layer Visibility Network Packet Structure: IP Header Src/Dst IP, TTL TCP/UDP Ports, Flags, Seq Application Layer HTTP, DNS, SMTP Payload / Data File content, commands, malware, credentials NOT VISIBLE TO PACKET FILTER Gen 1: Packet Filtering (Stateless) Sees: IP addresses + ports only | No session memory | Fastest, lowest protection Rule example: DENY tcp any any eq 23 (block all Telnet) + State Table NOT VISIBLE Gen 2: Stateful Inspection Tracks TCP state: NEW / ESTABLISHED / RELATED | Blocks session hijacking Still blind to payload — HTTPS C2 traffic looks like normal ESTABLISHED session Gen 3: Deep Packet Inspection (DPI / NGFW) Full payload analysis | Application identification regardless of port Malware scanning | TLS inspection | Protocol validation | Highest overhead Complete visibility — detects BitTorrent on port 443, malware in HTTP, C2 in HTTPS ↻ Replay

Key Points — Firewall Comparison

Pre-Check: Firewall Comparison

7. A traditional stateful inspection firewall logs an ESTABLISHED TCP session on port 443. Unknown to the firewall, the payload contains a malware C2 channel. Which statement is most accurate?

8. Which firewall generation can identify that traffic on port 443 is actually BitTorrent rather than HTTPS?

9. An organization uses a packet filtering firewall. An attacker sends a TCP packet with ACK+PSH flags set, spoofing an established session. What is the most likely outcome?

Section 4: Traffic Monitoring Architectures

4.1 Inline vs. Out-of-Band

How a security tool receives network traffic is as important as what it does with it:

4.2 Network TAPs: Passive Hardware Capture

A Network TAP (Test Access Point) is a passive hardware device inserted between two network devices. It creates a physical copy of all traffic flowing across the link without touching the original traffic path.

TAP CharacteristicDetail
No IP addressA passive TAP has no network identity and cannot be targeted or compromised
Zero latency impactOnly physical signal splitting — no processing overhead
No packet lossGuaranteed full-fidelity capture at line rates from 1G to 400G
Forensic admissibilityTAP-captured traffic is forensically sound and legally admissible; SPAN data is not
Bidirectional captureCaptures both directions of a full-duplex link as separate or merged streams

TAP types: Passive optical TAP (fiber), Active regeneration TAP (multiple tools), Bypass TAP (maintains connectivity if inline tool fails), Data Diode TAP (enforces unidirectional flow in OT/ICS environments).

4.3 SPAN Ports: Software Traffic Mirroring

A SPAN port (Switched Port Analyzer) copies traffic from source ports or VLANs to a designated monitoring port — configured entirely in software on the switch.

SPAN LimitationTechnical Detail
Packet loss under loadSwitches prioritize production traffic — mirrored packets dropped first during congestion
Corrupt packet discardingSPAN silently drops corrupt/malformed frames, making forensic analysis impossible
Duplicate packetsMonitoring both ingress and egress on same interface generates duplicates causing false IDS alerts
Not forensically soundSPAN data is legally inadmissible due to potential incompleteness

4.4 TAP vs. SPAN: Decision Framework

CriterionNetwork TAPSPAN Port
Packet lossNone — guaranteedYes — under congestion
Corrupt packet captureYes — captures all framesNo — silently discards
Forensic admissibilityYesNo
Performance impactZeroConsumes switch resources
Attack surfaceNone (no IP)Potential inbound in some configs
CostHardware required ($2K–$5K)"Free" with existing switches
OT/ICS suitabilityExcellent (Data Diode)Poor

4.5 TAP Data vs. NetFlow

DimensionNetwork TAP (Full Packet Capture)NetFlow / IPFIX
Data capturedComplete packet including payloadFlow metadata only (no payload)
Storage requirementsVery high (TB/day on busy links)Very low (MB/day)
Retention periodHours to days (cost-limited)Months to years (practical)
Encrypted trafficLimited without TLS inspectionWorks regardless of encryption
Use caseDeep forensic investigation, IDS matchingLong-term behavioral baselines, C2 beacon timing analysis
Inline vs. Out-of-Band Traffic Monitoring INLINE (IPS / NGFW) — Traffic passes THROUGH the device Can inspect and block in real time | Adds latency | Single point of failure Client 10.1.1.10 IPS / NGFW Inspects + blocks All traffic flows through Server 10.2.2.20 Single point of failure OUT-OF-BAND (IDS via TAP or SPAN) — Traffic copy sent to sensor Cannot block | Zero latency impact | No risk to production traffic | Forensically sound (TAP) Client 10.1.1.10 Switch / TAP Normal traffic passes Copy sent to IDS Server 10.2.2.20 IDS Sensor Alerts only — no impact copy Zero impact No blocking ↻ Replay

4.6 Architecture Design Principles

  1. Match the tool to the threat model: IPS inline at the perimeter for active blocking; TAP-fed IDS internally for threat hunting without risking production impact.
  2. Defense in depth for monitoring: Deploy both inline and out-of-band tools. An inline NGFW blocks known threats; a TAP-fed IDS captures everything for forensic analysis and catches what the NGFW misses.
  3. Place TAPs strategically: Perimeter uplinks, data center access segments, server-to-server East-West paths, and any link carrying regulated data (PCI, HIPAA).
  4. Aggregate with a visibility fabric: A Network Packet Broker (NPB) aggregates traffic from multiple TAPs/SPANs, filters and load-balances it across multiple security tools.
  5. Plan for failure modes: Bypass TAPs ensure that if an inline IPS appliance fails, traffic continues to flow — trading temporary security coverage for availability.
Healthcare Example: A hospital using SPAN to monitor EHR traffic finds that during peak morning shifts, the switch drops mirrored packets. A lateral movement attack exfiltrates 12 hours of patient records, and the SPAN data is inadmissible as evidence. A $2,000–$5,000 passive TAP would have provided complete, forensically admissible capture at full line rate — a compliance requirement under HIPAA.

Key Points — Traffic Monitoring Architectures

Post-Check: Traffic Monitoring Architectures

10. A healthcare organization needs to deploy an IDS to monitor EHR server traffic. The traffic link carries PHI subject to HIPAA. Which monitoring approach is most appropriate?

11. Which statement correctly describes a key limitation of SPAN port monitoring compared to a network TAP?

12. An IPS appliance is deployed inline. During a hardware failure, the device loses power. What device ensures that network traffic continues to flow despite this failure?

13. A SOC analyst wants to detect C2 beaconing patterns occurring over months. The organization cannot store full packet captures beyond 72 hours due to cost. Which complementary technology provides the long-term visibility needed?

14. Which IDS/IPS detection method is most likely to catch a previously unknown zero-day exploit that has no known signature?

15. In a properly designed SOC, which combination of monitoring architectures provides both real-time blocking capability AND forensically sound packet capture for post-incident investigation?

Your Progress

Answer Explanations