Monitor DHCP servers for new reservations or leases that could indicate unauthorized device connections or adversary persistence mechanisms.
Given:
All new DHCP reservations and lease assignments are discovered, logged, validated, and documented.
There are various ways to do this task. From an incident response perspective, the best choice (when supported) is a PowerShell script that queries DHCP event logs or leverages DHCP cmdlets to capture reservations and lease events.
Microsoft-Windows-DHCP Server Events/Operational
Event ID 106 → New reservation created
CSV files from DHCP exports can be parsed with PowerShell via the Get-Content
Cmdlet.
Windows Server 2012 and higher support DHCP PowerShell module commands that may also leave traces in PowerShell logs.
reg add HKLM\System\CurrentControlSet\Services\DhcpServer\Parameters /v ActivityLogFlag /t REG_DWORD /d 1
%windir%\System32\Dhcp
Get-WinEvent -LogName "Microsoft-Windows-DHCP Server Events/Operational" -FilterXPath "*[System/EventID=106]"
Look for:
grep -Ei 'dhcp' /var/log/syslog.1
tail -f dhcpd.log
# Gather DHCP lease info
netsh dhcp server scope <IP ADDRESS> show clients 1 > C:\Monitor\New_dhcp_list.txt
# Remove top and bottom lines
$file = cat C:\Monitor\New_dhcp_list.txt | select -skip 8
$len = $file.length-4
$file = $file[0..($len)]
# Extract relevant columns
$file | foreach-object{$_.split()[0,4,7,18] -join ' '} > C:\Monitor\New_dhcp_list.txt
# Compare to known good and alert if different
Compare-Object $(Get-Content .\Known_good_dhcp_list.txt) $(Get-Content .\new_dhcp_list.txt) >> .\Domain_Changes_Log.txt
if ((Compare-Object $(Get-Content .\Known_good_dhcp_list.txt) $(Get-Content .\New_dhcp_list.txt)) -ne $null) {
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$oReturn=[system.windows.forms.messagebox]::show("DHCP Client has been added! This change needs to be verified.")
}
aws ec2 describe-dhcp-options
aws ec2 describe-instances --query 'Reservations[*].Instances[*].PrivateIpAddress'
Tool | Platform | Installation | Usage |
---|---|---|---|
DHCP Server Logs | Windows | Native | Reservation + lease logging |
PowerShell DHCP Module | Windows | Native (2012+) | Query + automate DHCP monitoring |
Linux Syslog / DHCPD Logs | Linux | Native | DHCP lease monitoring |
AWS CloudWatch + VPC Flow Logs | AWS | Native | Detect network DHCP activity |
Azure Monitor + NSG Flow Logs | Azure | Native | Detect new IP/MAC pairs |
GCP VPC Flow Logs + SCC | GCP | Native | Detect new DHCP clients |
Date | Version | Description | Author |
---|---|---|---|
2025-05-02 | 1.0 | Original retained and expanded with cloud + operator workflow + recommendations | Leo |