Detect DHCP Spoofing in CrowdStrike LogScale
Adversaries may redirect network traffic to adversary-owned systems by spoofing Dynamic Host Configuration Protocol (DHCP) traffic and acting as a malicious DHCP server on the victim network. By achieving the adversary-in-the-middle (AiTM) position, adversaries may collect network communications, including passed credentials sent over insecure, unencrypted protocols. Rogue DHCP servers can distribute malicious DNS server addresses, default gateway settings, or WPAD proxy configuration that silently routes victim traffic through attacker-controlled infrastructure. DHCPv6 spoofing extends this to IPv6 networks via INFORMATION-REQUEST responses. Adversaries may also abuse DHCP to perform starvation attacks by exhausting the DHCP allocation pool with spoofed DISCOVER messages.
MITRE ATT&CK
- Tactic
- Credential Access Collection
- Technique
- T1557 Adversary-in-the-Middle
- Sub-technique
- T1557.003 DHCP Spoofing
- Canonical reference
- https://attack.mitre.org/techniques/T1557/003/
LogScale Detection Query
#event_simpleName = /^(ProcessRollup2|NetworkConnectIP4|NetworkConnectIP6)$/
| eval lower_image = lower(FileName)
| eval lower_cmdline = lower(CommandLine)
| case {
/* Branch 1: Unauthorized process connecting to/from UDP port 67 */
#event_simpleName = /^NetworkConnect/ {
| where LocalPort = 67 OR RemotePort = 67
| where lower_image != "svchost.exe" AND lower_image != "system"
| eval DetectionType = "DHCP_Port67_Binding"
| eval RiskScore = 75
} ;
/* Branch 2: Known DHCP attack tools or interpreters with DHCP keywords */
#event_simpleName = "ProcessRollup2" {
| where
match(lower_image, regex="(yersinia|dhcpig|gobbler|dhcpstarv|ettercap|bettercap|mitm6|dhcp6)")
OR match(lower_cmdline, regex="(yersinia|dhcpig|gobbler|dhcpstarv|ettercap|bettercap|mitm6|dhcp6)")
OR (
match(lower_image, regex="(python|ruby|perl|bash|sh|pwsh|powershell)")
AND match(lower_cmdline, regex="(dhcp|bootp|mitm6|dhcp6|rogue|dhcpstarv|dhcpig)")
)
| eval IsKnownTool = if(
match(lower_image, regex="(yersinia|dhcpig|gobbler|dhcpstarv|ettercap|bettercap|mitm6|dhcp6)"),
"true", "false")
| eval IsCmdLineMatch = if(
not match(lower_image, regex="(yersinia|dhcpig|gobbler|dhcpstarv|ettercap|bettercap|mitm6|dhcp6)")
AND match(lower_cmdline, regex="(yersinia|dhcpig|gobbler|dhcpstarv|ettercap|bettercap|mitm6|dhcp6)"),
"true", "false")
| eval DetectionType = case(
IsKnownTool = "true", "Known_DHCP_Attack_Tool",
IsCmdLineMatch = "true", "DHCP_Tool_In_CommandLine",
"Interpreter_With_DHCP_Keywords")
| eval RiskScore = case(
DetectionType = "Known_DHCP_Attack_Tool", 100,
DetectionType = "DHCP_Tool_In_CommandLine", 65,
60)
}
}
| table([@timestamp, ComputerName, UserName, UserSid, FileName, CommandLine, LocalIP, RemoteIP, LocalPort, RemotePort, SHA256HashData, MD5HashData, DetectionType, RiskScore])
| sort(RiskScore, order=desc) CrowdStrike Falcon LogScale (CQL) detection for T1557.003 DHCP Spoofing across two sensor event types. NetworkConnectIP4/IP6 events flag unauthorized processes making connections to or from UDP port 67, excluding svchost.exe and System. ProcessRollup2 events match known DHCP attack tool names in the process image path, DHCP tool keywords in command lines, or script interpreters (Python, Perl, Ruby, Bash, PowerShell) with DHCP-related arguments. Note: Registry branch (DhcpNameServer changes) is not covered by these Falcon event types — complement with AsepValueUpdate or use Custom IOA rules targeting registry writes to Tcpip\Parameters\Interfaces.
Data Sources
Required Tables
False Positives & Tuning
- DHCP client renewal traffic and endpoint provisioning processes that are not svchost.exe — on Linux endpoints, dhclient or NetworkManager may legitimately use port 67 and should be baselined per environment
- Authorized network assessment scripts using Scapy, Python's dhcppython library, or custom DHCP probing tools run by network engineers — identify authorized scanner hostnames and add ComputerName exclusions
- Development and QA environments where engineers test DHCP protocol implementations using Python or Bash scripts that reference DHCP library imports or protocol keywords in their arguments
Other platforms for T1557.003
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Rogue DHCPv4 Server via Python Scapy
Expected signal: Sysmon EventCode=1: Process Create with Image=python3 and CommandLine containing 'scapy', 'BOOTP', 'DHCP', and 'sendp'. Sysmon EventCode=3: Network Connection from python3 to 255.255.255.255:68 on UDP port 67 (source). Linux auditd: SYSCALL records for socket() with AF_PACKET or AF_INET on port 67. Network: DHCP OFFER packet visible in packet capture with source IP not matching authorized DHCP server.
- Test 2mitm6 DHCPv6 Adversary-in-the-Middle Attack
Expected signal: Sysmon EventCode=1: Process Create with Image containing 'mitm6' or python3 with 'mitm6' in CommandLine. Sysmon EventCode=3: Network connections on UDP port 547 (DHCPv6 server port) from the mitm6 process. Linux auditd: socket() syscalls creating raw IPv6 sockets. Network: DHCPv6 REPLY packets visible in PCAP containing malicious recursive DNS server (Option 23) pointing to attacker-controlled IPv6 address.
- Test 3DHCP Starvation Attack with DHCPig
Expected signal: Sysmon EventCode=1: Process Create with python3 and DHCP/BOOTP keywords in CommandLine. Sysmon EventCode=3: High-volume UDP port 67 connections from python3 within a short time window. Linux auditd: Repeated socket() and sendto() syscalls at high frequency. Network: Burst of DHCP DISCOVER packets with varying source MACs visible in PCAP — this pattern is the signature of starvation attacks.
- Test 4Yersinia DHCP Attack Tool Execution
Expected signal: Sysmon EventCode=1: Process Create with Image='yersinia' or full path to yersinia binary. CommandLine contains '--help' or 'dhcp'. Linux auditd: execve() syscall for yersinia. The binary name 'yersinia' in process creation events is the primary indicator — this is a known attack tool with no legitimate administrative use case.
References (10)
- https://attack.mitre.org/techniques/T1557/003/
- https://datatracker.ietf.org/doc/html/rfc2131
- https://datatracker.ietf.org/doc/html/rfc3315
- https://isc.sans.edu/forums/diary/new+rogueDHCP+server+malware/6025/
- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn800668(v=ws.11)
- https://web.archive.org/web/20231202025258/https://lockstepgroup.com/blog/monitor-dhcp-scopes-and-detect-man-in-the-middle-attacks/
- https://github.com/dirkjanm/mitm6
- https://github.com/nicowillis/DHCPig
- https://attack.mitre.org/techniques/T1499/002/
- https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst6500/ios/12-2SX/configuration/guide/book/snoodhcp.html
Unlock Pro Content
Get the full detection package for T1557.003 including response playbook, investigation guide, and atomic red team tests.