GCIH Exam Prep · Topic 4 of 5

Network Attacks, Sniffing & Intrusion Detection

ARP Poisoning · MITM · DoS/DDoS · Wireshark · IDS/IPS · Evasion · NetFlow Analysis

Study with Practice Tests →
Topic 4 of 5 — Network Attacks & Detection

Network Attacks, Sniffing & Intrusion Detection

Six core areas covering how attackers intercept traffic, launch denial-of-service campaigns, and evade detection systems — plus how defenders use IDS/IPS, packet captures, and NetFlow to catch them.

ARP Poisoning

ARP is stateless and unauthenticated, so attackers send gratuitous ARP replies mapping their MAC to a legitimate IP. Victims update their ARP cache and forward traffic to the attacker. Defense: Dynamic ARP Inspection (DAI) on managed switches validates ARP against the DHCP snooping table.

MITM Attacks

Man-in-the-middle techniques include ARP poisoning (LAN), SSL stripping (downgrade HTTPS→HTTP), BGP hijacking (route redirection), DNS spoofing, and HTTPS interception with rogue CA certs. Each requires a specific defense: HSTS, RPKI, DNSSEC, cert pinning.

DoS vs DDoS Types

Four attack categories: Volumetric (flood bandwidth — UDP/ICMP floods), Protocol (exhaust state — SYN flood), Application Layer L7 (mimic legit traffic — Slowloris, HTTP flood), and Amplification (small query → huge response — DNS ANY, NTP monlist). SYN cookies defend against SYN flood; BCP38 counters amplification.

Packet Capture & Analysis

Wireshark and tcpdump capture traffic in promiscuous mode. Key display filters isolate SYN scans, HTTP, DNS, and specific hosts. Indicators in PCAPs include beaconing (C2 intervals), DNS tunneling (long base64 queries), cleartext credentials, and unusual port usage.

IDS/IPS Detection

IDS is out-of-band (alerts only); IPS is inline (blocks traffic). Detection methods: signature-based (fast, misses zero-days), anomaly-based (behavioral baseline, catches zero-days but higher false positives), and heuristic/hybrid. Evasion: fragmentation, encoding, TTL manipulation, timing attacks, traffic flooding.

NetFlow & Log Correlation

NetFlow captures flow metadata (src/dst IP, ports, protocol, bytes, duration) without payload — scalable for large networks. SIEM correlates logs from firewall, IDS, endpoint, DNS, and AD to detect C2 beaconing, lateral movement (east-west spikes), and data exfiltration (large outbound to unknown IPs).

ARP Poisoning & MITM

ARP Poisoning & Man-in-the-Middle Attacks

ARP's stateless, unauthenticated design is the root cause of LAN-based MITM attacks. Understanding the full technique chain — and each layer's defense — is essential for GCIH.

How ARP Poisoning Works

ARP Poisoning — Step by Step

  • ARP is stateless and unauthenticated — devices accept ARP replies without having sent a request (unsolicited / gratuitous ARP)
  • Attacker broadcasts gratuitous ARP: "192.168.1.1 is at AA:BB:CC:DD:EE:FF" (attacker's MAC address)
  • All hosts update their ARP cache: gateway IP now maps to attacker's MAC
  • All traffic destined for the gateway is sent to the attacker → classic MITM position
  • Attacker forwards traffic to the real gateway to avoid detection (transparent relay)

Tools for ARP Poisoning

  • arpspoof (dsniff suite) — classic CLI ARP poisoning tool
  • Ettercap — full-featured MITM framework with plugin support
  • Bettercap — modern successor to Ettercap; modular, supports WiFi MITM
  • Scapy — Python library for crafting custom ARP packets

ARP Poisoning Defenses

  • Dynamic ARP Inspection (DAI) — validates ARP packets against DHCP snooping binding table on managed switches; drops invalid ARP replies
  • Static ARP entries — permanently map critical hosts (gateway, servers) in ARP table
  • 802.1X port authentication — authenticate devices before allowing network access
  • VLANs — limit broadcast domain scope and reduce ARP reach

MITM Attack Techniques

TechniqueMechanismToolsDefense
ARP Poisoning MITMPoison LAN ARP cache to intercept trafficarpspoof, Ettercap, BettercapDAI, static ARP, 802.1X
SSL StrippingDowngrade HTTPS → HTTP; victim sends plaintextsslstripHSTS, HSTS preloading
BGP HijackingRogue AS announces more-specific route; internet traffic redirectedCustom BGP configRPKI (Resource Public Key Infrastructure), BGP route filtering
HTTPS MITMRogue CA cert or cert pinning bypass to intercept TLSmitmproxy, Burp SuiteCertificate pinning, certificate transparency logs
DNS Poisoning / SpoofingCorrupt DNS resolver cache to redirect traffic to attacker IPDNSChef, EttercapDNSSEC, DNS over HTTPS (DoH)

SSL Stripping — Deep Dive

How SSL Stripping Works

  • Attacker must already be in MITM position (e.g., via ARP poisoning)
  • Victim requests https://bank.com — attacker intercepts and fetches HTTPS page themselves
  • Attacker serves victim an HTTP version of the page — victim's browser shows HTTP (no padlock)
  • Victim enters credentials → transmitted in cleartext → attacker captures them
  • HSTS defense: browser refuses to connect via HTTP to domains on HSTS preload list; browser always upgrades to HTTPS internally before connecting

MITM Detection Indicators

ARP Table Anomalies

Same IP mapped to multiple MACs in ARP table, or the gateway's MAC changes unexpectedly. Run arp -a to inspect. IDS signatures detect gratuitous ARP floods.

Certificate Warnings

Unexpected certificate warnings in browsers indicate a rogue cert in the chain. Certificate transparency logs expose mis-issued certs. Browser cert pinning failures also signal HTTPS MITM.

Latency & Traffic Anomalies

Unexpected latency increases indicate traffic is taking an extra hop through the attacker. PCAP analysis shows traffic routed through an unexpected intermediate MAC address.

DoS & DDoS Attacks

Denial of Service & Distributed Denial of Service Attacks

DoS and DDoS attacks range from simple bandwidth exhaustion to sophisticated application-layer exploits. Recognizing the type determines the correct mitigation strategy.

DoS Attack Type Classification

TypeMechanismExample AttacksDefense
VolumetricFlood available bandwidthUDP flood, ICMP flood (ping of death), DNS amplificationUpstream scrubbing centers, rate limiting, null routing
ProtocolExploit protocol weaknesses to exhaust server stateSYN flood (half-open connections exhaust TCB), Smurf attack (ICMP broadcast amplification)SYN cookies, ingress filtering (BCP38), firewall state limits
Application Layer (L7)Mimic legitimate traffic to exhaust app resourcesHTTP flood (GET/POST), Slowloris (keep connections open with slow headers), RUDY (slow POST body)WAF, rate limiting, CAPTCHA, connection timeouts
AmplificationSmall spoofed query triggers large response directed at victimDNS amplification (ANY query), NTP amplification (monlist), SSDP amplificationBCP38 ingress filtering, disable unnecessary services, rate-limit UDP responses

SYN Flood — Deep Dive

SYN Flood Mechanics

  • Attacker sends thousands of SYN packets with spoofed source IP addresses
  • Server responds with SYN-ACK to each spoofed IP (no one responds with ACK)
  • Server allocates a Transmission Control Block (TCB) for each half-open connection
  • TCB table fills up → server cannot accept new legitimate connections
  • SYN Cookies defense: server encodes session state into the SYN-ACK sequence number; no TCB allocated until the client's ACK is received and verified — legitimate clients prove reachability
  • Additional mitigations: reduce SYN_RECEIVED timeout, increase backlog queue size, firewall rate limiting on SYN packets

DDoS Architecture

Botnet C2 Architecture

  • C2 (Command & Control) server directs thousands of compromised hosts (bots/zombies)
  • Bots receive attack command: target IP, attack type, duration
  • IRC, HTTP, P2P, and domain-generation algorithms (DGA) used for C2 channels
  • Mirai botnet: compromised IoT devices with default credentials; launched 1.2 Tbps attacks against Dyn DNS in 2016

Cloud-Based Scrubbing

  • Volumetric DDoS can reach terabits-per-second — far exceeds single-site capacity
  • Scrubbing centers (Cloudflare, Akamai, AWS Shield) absorb traffic upstream
  • Anycast routing: traffic is attracted to nearest scrubbing center
  • Clean traffic is forwarded back to origin; attack traffic is dropped

Amplification Attack — Bandwidth Amplification Factor (BAF)

ProtocolAttack VectorBandwidth Amplification FactorMitigation
DNSANY query to open resolver~70xDisable ANY queries, rate-limit responses
NTPmonlist command~556xDisable NTP monlist (noquery)
SSDPUPnP discovery~30xBlock SSDP at perimeter (UDP 1900)
LDAPConnectionless LDAP (CLDAP)~46–55xBlock CLDAP externally (UDP 389)

BCP38 — The Core Defense Against Amplification

  • BCP38 (Ingress Filtering): ISPs and networks drop packets with spoofed source IP addresses that cannot be reached through the ingress interface
  • Attacker cannot spoof source IPs → amplification attacks fail (responses go to attacker, not victim)
  • Widely recommended but not universally deployed — spoofing still possible on networks without BCP38
Packet Analysis & IDS/IPS

Packet Analysis, IDS/IPS & NetFlow

Effective network defense requires mastering capture tools, detection architectures, evasion techniques, and flow-based anomaly detection.

Wireshark & tcpdump

Wireshark Display Filters

  • ip.addr == 192.168.1.1 — filter by IP (src or dst)
  • tcp.port == 443 — filter by TCP port
  • http — show all HTTP traffic
  • dns — show DNS queries and responses
  • tcp.flags.syn == 1 && tcp.flags.ack == 0 — SYN only (not SYN-ACK); identifies port scans
  • frame contains "password" — search payload for string

tcpdump Commands

  • tcpdump -i eth0 -w capture.pcap — capture to file on interface eth0
  • tcpdump host 192.168.1.1 and port 80 — filter by host and port
  • tcpdump -r capture.pcap — read from saved file
  • tcpdump -i eth0 -nn -X — no name resolution, show hex and ASCII payload
  • Promiscuous mode: captures all frames on wire, not just those addressed to the capture host's MAC

Suspicious PCAP Indicators

What to Look For in Suspicious Packet Captures

  • Beaconing: regular-interval outbound connections (C2 check-in) — look for consistent timing patterns to external IPs
  • DNS tunneling: abnormally long DNS query names, high query volume, base64-encoded subdomains (e.g., aGVsbG8=.evil.com)
  • Cleartext credentials: FTP, Telnet, HTTP Basic Auth, SMTP — search payload for "password", "login", "Authorization:"
  • Unusual port usage: known protocols on non-standard ports (HTTP on 8080, 4444, etc.)
  • Large data transfers: significant outbound data to unknown external IPs — potential exfiltration
  • Port scans: many SYN packets to sequential ports from a single source, all RST or no response back

IDS vs IPS Comparison

FeatureIDS (Intrusion Detection System)IPS (Intrusion Prevention System)
Network PositionOut-of-band (passive tap / SPAN port)Inline (traffic passes through device)
Action on DetectionAlert only — logs and notifiesAlert and block — drops/rejects traffic
False Positive ImpactLow impact — only generates alert noiseHigh impact — blocks legitimate traffic
Latency AddedNone — traffic not affectedAdds inspection latency to all traffic
Deployment RiskLow — can't disrupt trafficHigh — inline failure can block all traffic
Best Use CaseMonitoring, forensics, alert tuningActive blocking of known threats in production

Detection Methods

Signature-Based Detection

Matches traffic against a database of known attack patterns (rules/signatures). Fast with low false positives. Cannot detect zero-day attacks or unknown variants. Requires regular signature updates. Examples: Snort rules, Suricata rules.

Anomaly-Based (Behavioral) Detection

Establishes a baseline of normal network behavior, then alerts on significant deviations. Capable of detecting zero-day attacks and novel techniques. Higher false positive rate — unusual-but-legitimate activity triggers alerts. Requires a learning/baselining period.

Heuristic & Hybrid Detection

Heuristic uses rule-based pattern matching beyond exact signatures — catches variants of known attacks. Hybrid combines signature + anomaly detection to balance catch rate and false positive rate. Most modern IDS/IPS products use hybrid approaches.

IDS/IPS Evasion Techniques

TechniqueHow It WorksIDS Counter
FragmentationSplit attack payload across multiple small IP fragments so no single fragment matches a signatureIDS reassembles fragments before inspection (full-stream reassembly)
Protocol AmbiguitySend malformed packets that IDS and target parse differently — IDS sees harmless traffic, target sees attackStrict protocol conformance checking; normalize packets before inspection
Polymorphism/EncodingEncode payload (Base64, XOR, URL encoding, shellcode obfuscation) so signature doesn't match the encoded formDecode and normalize content before signature matching
TTL ManipulationSend decoy packets with TTL that expires before reaching target but after passing IDS — IDS inspects decoys, target ignores themNormalize TTL values; maintain stateful inspection across flows
Traffic FloodingOverwhelm IDS with high-volume noise to cause alert dropping or resource exhaustionRate-based alert throttling; hardware-accelerated inspection; alert prioritization
Timing Attacks (Slow)Send attack very slowly (e.g., Slowloris) — below detection thresholds, session timeouts trigger before IDS correlates eventsLong session tracking; behavioral anomaly detection on connection duration

NetFlow & SIEM Log Correlation

NetFlow — Key Fields & Use Cases

  • Flow record fields: src IP, dst IP, src port, dst port, protocol, bytes transferred, packet count, flow duration, interface
  • Not full packet capture — metadata only; no payload content
  • Scalable for high-speed networks where full PCAP storage is impractical
  • C2 beaconing detection: regular-interval outbound flows to same external IP
  • Lateral movement detection: east-west traffic spikes between internal hosts
  • Exfiltration detection: large outbound byte counts to unknown external IPs

SIEM Log Correlation

  • Data sources: firewall logs, IDS alerts, endpoint EDR, DNS query logs, Active Directory authentication events, proxy logs
  • Correlation rules: chain events across sources — e.g., firewall allow + IDS alert + failed auth + large outbound = likely compromise
  • Baseline deviation alerts: new outbound protocols not seen before, off-hours authentication, unusual data volumes
  • Time normalization: all logs converted to UTC for accurate event sequencing
  • Alert fatigue: tune rules to reduce false positives; prioritize by severity and asset value
Practice Quiz — 10 Questions

Network Attacks & Detection Quiz

Test your knowledge of ARP poisoning, DoS types, IDS/IPS, and packet analysis. Select one answer per question, then submit all at once.

Q1. ARP poisoning allows MITM attacks because ARP is:
Q2. Which defense specifically validates ARP packets against the DHCP snooping table to prevent ARP poisoning?
Q3. A SYN flood attack works by:
Q4. Which DoS defense encodes session state in the sequence number so no TCB is allocated until the ACK is received?
Q5. DNS amplification attacks work by:
Q6. An IPS differs from an IDS in that it:
Q7. Which IDS/IPS evasion technique splits a malicious payload across multiple network packets?
Q8. SSL stripping is best defended against by:
Q9. In Wireshark, which display filter shows only TCP SYN packets (not SYN-ACK)?
Q10. NetFlow differs from full packet capture in that it:
Memory Hooks

Memory Hooks & Mnemonics

Six memory anchors to solidify the most exam-critical concepts in this topic.

☠️
ARP Poisoning
"ARP is unauthenticated → gratuitous ARP poisons cache → attacker becomes MITM → DAI is the fix"
Remember the chain: no auth → poison → intercept. DAI validates ARP against the DHCP snooping table — managed switches only.
🌊
DoS Type Trifecta
"Volumetric=Flood bandwidth · Protocol=Exhaust state (SYN flood) · Application=Mimic legit (HTTP flood/Slowloris)"
Add a 4th: Amplification = small query → huge response. BAF (Bandwidth Amplification Factor) measures the multiplier. NTP monlist wins at 556x.
🔒
SYN Flood Defense
"SYN Cookies = encode state in sequence number, no TCB until ACK proves client is real"
TCB = Transmission Control Block. Without SYN cookies, each half-open connection consumes a TCB slot. SYN cookies move the cost to the client.
🔍
IDS vs IPS
"IDS=Alert only (out-of-band) · IPS=Block (inline). IPS false positives block legit traffic — tune before deploying inline"
Out-of-band = passive tap or SPAN port. Inline = traffic must pass through device. False positives in IDS = noise. False positives in IPS = outage.
📊
NetFlow vs PCAP
"NetFlow=metadata only (fast, scalable, no payload) · PCAP=full packets (storage-heavy, payload visible). Use NetFlow for anomaly detection at scale"
NetFlow detects beaconing, lateral movement, exfil by volume. PCAP is needed for payload forensics (credentials, malware content, DNS tunnel data).
🎭
IDS Evasion
"Fragment=split payload · Encode=XOR/Base64 · TTL=expire before IDS · Flood=overwhelm alerts · Slow=below threshold"
Each technique exploits a different IDS weakness: reassembly gaps, signature matching on raw bytes, TTL-based hop counting, processing limits, and time correlation windows.
Flashcards & AI Advisor

Flashcards & Study Advisor

Flip cards to self-test, then use the advisor to drill into any topic area.

Flashcards — click to flip

Click any card to reveal the answer

ARP Poisoning & DAI
Mechanism and defense
ARP is stateless/unauthenticated — accepts unsolicited replies. Attacker sends gratuitous ARP mapping gateway IP to attacker MAC. All hosts send gateway traffic to attacker (MITM). Defense: Dynamic ARP Inspection (DAI) validates ARP replies against DHCP snooping binding table — drops invalid entries.
SYN Flood & SYN Cookies
TCB exhaustion and defense
SYN flood: attacker sends SYNs with spoofed IPs → server allocates TCB (Transmission Control Block) for each half-open connection → table exhausted → DoS. SYN Cookies: server encodes session state in SYN-ACK sequence number; no TCB until client's ACK arrives and validates the cookie.
DNS Amplification
BAF, spoofed source, BCP38
Attacker spoofs victim IP and sends small DNS ANY queries to open resolvers → large responses directed at victim (~70x amplification). BAF = response size ÷ request size. NTP monlist = 556x. Defense: BCP38 (ingress filtering prevents IP spoofing); disable DNS ANY queries; rate-limit UDP responses.
IDS Detection Methods
Signature vs anomaly — tradeoffs
Signature-based: matches known patterns — fast, low false positives, misses zero-days. Anomaly-based: establishes normal baseline, alerts on deviation — catches zero-days, higher false positives, needs baselining period. Hybrid: combines both for coverage + precision. Most modern IDS/IPS use hybrid approaches.
Wireshark Display Filters
SYN scan, HTTP, DNS, specific IP
SYN only (port scan): tcp.flags.syn==1 && tcp.flags.ack==0 | HTTP traffic: http | DNS: dns | Specific IP: ip.addr==192.168.1.1 | HTTPS: tcp.port==443 | tcpdump capture: tcpdump -i eth0 -w file.pcap | Filter host: tcpdump host 1.2.3.4 and port 80
SSL Stripping vs HSTS
How stripping works, why HSTS prevents it
SSL stripping: attacker (already MITM) intercepts victim's HTTPS request, fetches content via HTTPS, serves victim HTTP version → cleartext credentials captured. HSTS: browser remembers "always use HTTPS" for this domain and upgrades internally before connecting — attacker never gets HTTP request to strip. HSTS preload = baked into browser.
NetFlow Key Fields & Detections
Beaconing, exfil, lateral movement
Fields: src IP, dst IP, src port, dst port, protocol, bytes, packets, duration. No payload — metadata only. Detections: C2 beaconing (regular-interval outbound flows to same IP), data exfiltration (large outbound byte counts to unknown IPs), lateral movement (east-west internal traffic spikes between hosts).
IDS/IPS Evasion Techniques
Fragmentation, encoding, TTL
Fragmentation: split payload across IP fragments — IDS must reassemble. Encoding: XOR/Base64/URL-encode payload so signature doesn't match raw bytes. TTL manipulation: decoy packets expire before target but after IDS. Traffic flooding: overwhelm IDS processing. Timing/slow: Slowloris-style stays below detection thresholds.

Study Advisor

Select a topic area to get targeted study guidance.

ARP & MITM — Study Focus

  • Memorize the ARP poisoning chain: stateless/unauthenticated → gratuitous ARP → cache poisoning → MITM position
  • Know DAI validates against DHCP snooping table — applies to managed switches only; requires DHCP snooping to be enabled first
  • SSL stripping requires MITM position first — ARP poisoning is the common setup step for LAN attacks
  • HSTS prevents SSL stripping by upgrading the connection in the browser before any HTTP request leaves the host
  • BGP hijacking defense: RPKI (Resource Public Key Infrastructure) — cryptographically validates route origin announcements
  • ARP poisoning detection: run arp -a and look for duplicate IPs mapping to different MACs, or gateway MAC changes
  • MITM tool chain for GCIH: arpspoof (dsniff) → ARP poison; sslstrip → strip HTTPS; mitmproxy → inspect/modify HTTPS

Ready to Tackle the GCIH Exam?

Practice with full-length timed tests, adaptive quizzes, and detailed answer explanations.

Start Free Practice Tests →