Network protocol attacks

5 minutes 5 Questions

Network protocol attacks exploit vulnerabilities and design flaws in the standard rules (protocols) that govern data exchange across networks. In the context of CompTIA PenTest+, particularly within Domain 3 (Attacks and Exploits), these attacks rely on the fact that many foundational protocols—such as ARP, DNS, DHCP, and IP—were designed for functionality and trust rather than security. Consequently, they often lack built-in authentication or encryption mechanisms. A classic example is ARP Poisoning. The Address Resolution Protocol (ARP) maps IP addresses to MAC addresses but verifies neither the request nor the response. Attackers can broadcast spoofed ARP messages to associate their MAC address with the IP address of a legitimate target, such as a default gateway. This enables a Man-in-the-Middle (MitM) or On-Path attack, allowing the attacker to intercept, modify, or stop traffic. Similarly, attackers utilize DNS Spoofing or Cache Poisoning to corrupt the resolution of domain names, redirecting traffic from legitimate sites to malicious servers. Testers also frequently exploit Link-Local Multicast Name Resolution (LLMNR) and NetBIOS (NBT-NS) via tools like Responder. When a DNS lookup fails, Windows systems broadcast requests via these protocols; attackers answer these broadcasts to capture user NTLM hashes. From a penetration testing perspective, successful execution of these attacks demonstrates critical risks to confidentiality and integrity. To mitigate these threats, pentesters recommend implementing defenses such as Dynamic ARP Inspection (DAI), DHCP snooping, DNSSEC, and disabling unnecessary legacy protocols to harden the network layer against manipulation.

Mastering Network Protocol Attacks: CompTIA PenTest+ Guide

Introduction to Network Protocol Attacks
Network protocol attacks are critical concepts in the CompTIA PenTest+ certification. They involve exploiting vulnerabilities or inherent design flaws in standard communication protocols (like ARP, DNS, DHCP, and SMB) to intercept, manipulate, or disrupt network traffic. Understanding these attacks is essential because they allow a penetration tester to elevate privileges, capture credentials, or perform Man-in-the-Middle (MitM) attacks without necessarily exploiting software bugs.

What it is and How it Works
These attacks target the trust mechanisms within a network. Here are the primary protocols targeted and the mechanics behind them:

1. ARP Poisoning (Spoofing):
ARP (Address Resolution Protocol) maps IP addresses to MAC addresses on a local network. Since ARP has no authentication, an attacker can send unsolicited 'gratuitous ARP' replies.
Mechanism: The attacker floods the network telling the victim, 'I am the Router,' and telling the Router, 'I am the Victim.' This places the attacker in the middle of the conversation (MitM).

2. DHCP Attacks:
DHCP Starvation: The attacker broadcasts forged DHCP DISCOVER packets with spoofed MAC addresses to exhaust the server's IP pool, causing a Denial of Service (DoS).
DHCP Spoofing: After starvation, the attacker introduces a Rogue DHCP Server. When legitimate clients ask for an IP, the rogue server assigns one with a malicious Default Gateway or DNS server, routing all traffic through the attacker.
Tools: Yersinia.

3. LLMNR and NBT-NS Poisoning:
When a Windows machine cannot resolve a hostname via DNS, it broadcasts requests using Link-Local Multicast Name Resolution (LLMNR) or NetBIOS Name Service (NBT-NS).
Mechanism: An attacker listens for these broadcasts and responds, 'I am the server you are looking for.' The victim then attempts to authenticate, sending NTLMv2 hashes to the attacker.
Tools: Responder, Wireshark.

4. DNS Poisoning:
This involves corrupting the DNS cache of a resolver so that a domain name (like google.com) points to the attacker's IP address instead of the legitimate one.

5. VLAN Hopping:
Switch Spoofing: An attacker configures their interface to negotiate a trunk link (DTP), gaining access to all VLANs.
Double Tagging: The attacker tags a frame with two VLAN IDs to bypass security checks and reach a restricted VLAN.

How to Answer Questions on the Exam
When facing scenario-based questions, focus on the symptoms and the layer of operation:
1. Identify the Scope: Is the attack happening on the local LAN (Layer 2) or across subnets (Layer 3)? ARP and VLAN attacks are Layer 2. DNS is Layer 3/Application.
2. Look for Log Artifacts: Questions often show log snippets. High volumes of ARP replies indicate poisoning. High volumes of DHCP requests from changing MACs indicate starvation.
3. Select the Tool: Map the attack to the tool. Ettercap and Bettercap for MitM; Responder for LLMNR/NBT-NS; Yersinia for Layer 2 protocols.

Exam Tips: Answering Questions on Network Protocol Attacks
Keyword Association: If you see 'broadcast name resolution' or 'capturing hashes on a Windows network,' the answer is almost always Responder or LLMNR Poisoning.
MitM Indicators: If a user complains about invalid SSL certificates or slow network performance, suspect ARP Poisoning.
Preventative Measures: The exam may ask for remediation. Know that Dynamic ARP Inspection (DAI) prevents ARP spoofing, DHCP Snooping prevents rogue DHCP servers, and disabling LLMNR prevents poisoning attacks.
VLAN Hopping: If the question mentions 'DTP' (Dynamic Trunking Protocol) or 'native VLAN,' the context is Switch Spoofing or Double Tagging.
Test mode:
More Network protocol attacks questions
30 questions (total)

Other Attacks and Exploits concepts

Adversarial machine learningAI data poisoningAI system attack vectorsAPI authentication attacksAPI security testingARP spoofing and poisoningAS-REP roastingAuthentication bypass techniquesAWS security testingAzure security testingBloodHound for ADBluetooth attacksBrute-force attacksCloud penetration testingCobalt Strike basicsCommand injectionContainer escape attacksCookie manipulationCredential dumpingCredential stuffingCross-site request forgery (CSRF)Cross-site scripting (XSS)Directory traversal attacksDLL hijackingDNS poisoning attacksEmbedded device attacksEmpire frameworkFile inclusion vulnerabilitiesFirmware analysisGolden ticket attacksGraphQL security issuesHardware hacking basicsHashcat password crackingHydra password crackingIAM misconfiguration exploitationImpacket toolkitInsecure deserializationIoT penetration testingJohn the RipperKerberoastingKubernetes security attacksLinux privilege escalationLiving off the land binaries (LOLBins)LLMNR/NBT-NS poisoningMetadata service attacksMetasploit frameworkMimikatz usageModel manipulation attacksNTLM relay attacksOn-path attacks (MITM)Pass-the-hash attacksPass-the-ticket attacksPassword sprayingPrivilege escalation techniquesProcess injectionPrompt injection attacksRate limiting bypassResponder toolREST API vulnerabilitiesS3 bucket misconfigurationServerless function attacksServer-side request forgery (SSRF)Service exploitationSession hijackingSilver ticket attacksSQL injection attacksSQLmap usageToken manipulationUAC bypass techniquesVLAN hopping attacksWindows privilege escalationWireless network attacksXML external entity (XXE) attacks