Skip to main content

Splunk Use Case to Detect Windows Log Tampering

Overview​

Windows Event Logs are among the most valuable forensic artifacts available to security teams during incident investigations. Threat actors often attempt to clear or tamper with Windows Event Logs after compromising a system to erase evidence of their activities and evade detection.

In this lab, a Splunk use case is created to detect Windows Event Log tampering by monitoring critical Windows Event IDs associated with log clearing. A real-time alert is configured in Splunk Enterprise and validated by clearing a Windows Event Log on the target Windows Server.


Lab Environment​

MachineRole
UbuntuAttacker Machine
Windows Server 2022Target / Log Source
Splunk EnterpriseSecurity Information and Event Management (SIEM)

Objective​

  • Connect to the Windows Server from Ubuntu using SSH.
  • Create a Splunk search to monitor Windows Event Log tampering.
  • Configure a real-time Splunk alert.
  • Simulate Windows Event Log tampering.
  • Verify that Splunk successfully detects and alerts on the activity.

Detection Logic​

The use case monitors the following Windows Event IDs:

Event IDDescription
104Windows Event Log was cleared
1100Windows Event Logging Service shut down
1102Security Audit Log was cleared

Monitoring these events helps detect attempts by attackers to remove evidence from compromised systems.


Step 1 — Connect to the Windows Server​

From the Ubuntu attacker machine, connect to the Windows Server using SSH.

ssh administrator@10.10.10.12

Accept the SSH fingerprint when prompted and enter the Administrator password.

SSH Connection

SSH Authentication


Step 2 — Open Splunk Enterprise​

Log in to Splunk Enterprise.

Navigate to:

Apps → Search & Reporting

Splunk Enterprise Dashboard


Step 3 — Create the Detection Query​

Execute the following SPL query.

index=* (
(sourcetype=wineventlog AND (EventCode=1102 OR EventCode=1100))
OR
(sourcetype=wineventlog:System AND EventCode=104)
)
| stats count by _time, EventCode, Message

This query monitors Windows Event Logs for log tampering activities.

Splunk Detection Query


Step 4 — Save the Search as a Real-Time Alert​

After validating the search results:

  • Click Save As
  • Select Alert
  • Configure the alert as Real-time
  • Trigger alert Per Result
  • Save the alert

Configure Real-Time Alert

Once the alert is saved successfully, Splunk confirms its creation.

Alert Successfully Created


Step 5 — Enumerate Windows Event Logs​

Return to the Windows Server terminal.

List all available Windows Event Logs.

wevtutil el

This command displays every Windows Event Log available on the system.

Enumerating Windows Event Logs


Step 6 — Simulate Windows Event Log Tampering​

Clear the ForwardedEvents Event Log.

wevtutil cl ForwardedEvents

The command executes successfully without producing output.

Clearing ForwardedEvents Log


Step 7 — Verify the Alert​

Return to Splunk Enterprise.

Navigate to:

Activity → Triggered Alerts

The previously created real-time alert should now be triggered.

Triggered Alert


Step 8 — Investigate the Detection​

Open the triggered alert.

Splunk successfully detects that the ForwardedEvents log has been cleared.

The alert provides:

  • Event Time
  • Event ID
  • Event Message
  • Event Count

Detection Result


Detection Summary​

PropertyValue
SIEM PlatformSplunk Enterprise
Detection TypeReal-Time Alert
Data SourceWindows Event Logs
Event IDs104, 1100, 1102
Attack SimulationWindows Event Log Tampering
Detection StatusSuccessful

MITRE ATT&CK Mapping​

TacticTechniqueID
Defense EvasionIndicator Removal on HostT1070
Defense EvasionClear Windows Event LogsT1070.001

Key Takeaways​

  • Windows Event Logs are essential for forensic investigations and incident response.
  • Attackers often clear logs to hide evidence after compromising a system.
  • Monitoring Event IDs 104, 1100, and 1102 provides visibility into log tampering attempts.
  • Splunk real-time alerts enable SOC analysts to detect defense evasion activities immediately.
  • Continuous monitoring of Windows Event Logs significantly strengthens an organization's detection and response capabilities.

Conclusion​

In this lab, a Splunk use case was developed to detect Windows Event Log tampering using a real-time alert. The detection monitored Windows Event IDs associated with log clearing and successfully identified the simulated attack when the ForwardedEvents log was cleared using the wevtutil utility. This use case demonstrates how Splunk can effectively detect defense evasion techniques and provide timely alerts that support rapid incident response and forensic investigations.