Windows Defender event-viewer and logs
Location Windows
input.conf
C:\Program Files\SplunkUniversalForwarder\etc\apps\SplunkUniversalForwarder\local\input.confWhen to Use Each
Scenario
Use Event Logs
Use Files
Real-time threat detection
✅ Yes
❌ No
Simplicity and ease of setup
✅ Yes
❌ No
Detailed debugging or diagnostics
❌ No
✅ Yes
Centralized log collection
✅ Yes
❌ No
No access to Event Log system
❌ No
✅ Yes
Microsoft Defender logs can be accessed via
Event Logs: Defender writes logs to the Windows Event Log (
Microsoft-Windows-Windows Defender/Operational).Files: Defender activity may also be written to log files depending on your organization's configuration.
Make a Index in Splunk
Settings > Indexes > New Index
Name it "Defender" or ensure the name used in the forwarder matches the Index name, as the forwarder must align with the Index.
Everything else default and save
For Event Logs
Open
SplunkUniversalForwarder\etc\apps\Splunk_TA_Windows\local\inputs.confor create the file if it doesn’t exist.Add the following to collect Defender logs:
[WinEventLog://Microsoft-Windows-Windows Defender/Operational]
disabled = 0
index = defender
sourcetype = WinEventLog:DefenderReplace
index = defenderwith the index where you want to store the logs in Splunk.Restart the Universal Forwarder to apply the configuration:
splunk restartFor Files
Identify the directory where Defender logs are stored.
Add a file monitor input in
inputs.conf:
[monitor://C:\Path\To\DefenderLogs\*.log]
disabled = 0
index = defender
sourcetype = defender:logMalware test file
Last updated