sudo nano /etc/netplan/50-cloud-init.yaml # Maybe ur file note not like mine # Delete all the Data and add network: version: 2 ethernets: ens18: dhcp4: false addresses: - 192.168.99.24/24 ens19: dhcp4: truesudo netplan try
Timeout Extend
# 1. Create the override directories for all three enginesmkdir -p /etc/systemd/system/wazuh-indexer.service.d/mkdir -p /etc/systemd/system/wazuh-manager.service.d/mkdir -p /etc/systemd/system/wazuh-dashboard.service.d/# 2. Inject the 10-minute timeout rulesecho -e "[Service]\nTimeoutStartSec=10min" > /etc/systemd/system/wazuh-indexer.service.d/override.confecho -e "[Service]\nTimeoutStartSec=10min" > /etc/systemd/system/wazuh-manager.service.d/override.confecho -e "[Service]\nTimeoutStartSec=10min" > /etc/systemd/system/wazuh-dashboard.service.d/override.conf# 3. Reload the Linux brain so it learns the new rulessystemctl daemon-reload# 4. The CPR Restart Sequence (with built-in breathing room)echo "Starting Indexer (Database)..."systemctl restart wazuh-indexerecho "Waiting 30 seconds for database to open ports..."sleep 30echo "Starting Manager (Brain)..."systemctl restart wazuh-managerecho "Waiting 15 seconds for brain to connect..."sleep 15echo "Starting Dashboard (GUI)..."systemctl restart wazuh-dashboardecho "Wazuh stack is fully online! Go check your browser."
This complete pipeline forces a Windows Domain Controller to log raw LDAP enumeration (Event 1644) and directory modifications (Event 5136), and pipes them directly into a Wazuh SIEM using a custom detection rule.
Phase 1: Force Windows to Audit Modifications (GPMC)
Catches modifications to the Schema, Users, and Groups (Event ID 5136).
Open gpmc.msc on the DC and edit the Default Domain Controllers Policy.
Check Success and Failure for both Audit Directory Service Access and Audit Directory Service Changes.
Force update via Admin prompt: gpupdate /force
Phase 2: Registry Hacks for Raw LDAP Queries (Event 1644)
Forces NTDS to log every single enumeration attempt, regardless of size.
Run this in an Administrator PowerShell session on the DC:
# Set Field Engineering diagnostics to maximum verbosity (Level 5)Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics" -Name "15 Field Engineering" -Value 5# Drop search thresholds to 1 to force auditing of ALL queriesSet-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NTDS\Parameters" -Name "Expensive Search Results Threshold" -Value 1Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NTDS\Parameters" -Name "Inefficient Search Results Threshold" -Value 1
Phase 3: Route the Logs to Wazuh (Agent Config)
Pipes the specific Windows Directory Service channel over to the SIEM.
Open C:\Program Files (x86)\ossec-agent\ossec.conf on the DC as Administrator.
Add this block right beneath the existing <localfile> sections:
Phase 4: The Custom Wazuh Detection Rule (Manager Config)
Forces Wazuh to index the diagnostic logs (Level 5) instead of silently dropping them.
4. Open local_rules.xml on your Wazuh Manager web interface.
5. Paste this rule at the bottom to catch the enumeration: