Communitygithub.com

Windows-Ereignisprotokolle in Splunk analysieren

Analysiert Windows Sicherheits-, System- und Sysmon-Ereignisprotokolle in Splunk zur Erkennung von Bedrohungen wie Brute-Force-Angriffen, Privilegieneskalation, Persistenzmechanismen und seitlicher Bewegung.

Was ist Windows-Ereignisprotokolle in Splunk analysieren?

Diese Skill-Anleitung ermöglicht es SOC-Analysten, Detection Engineers und Incident Respondern, Windows-spezifische Angriffstechniken (z. B. aus MITRE ATT&CK) mittels Splunk Search Processing Language (SPL) zu erkennen. Sie deckt sechs aufeinander aufbauende Arbeitsschritte ab: Authentifizierungsangriffserkennung, Privilegieneskalation, Persistenzmechanismen, seitliche Bewegung, Erstellung einer forensischen Zeitachse und Anreicherung durch Lookup-Tabellen. Die Anleitung setzt voraus, dass Windows-Ereignisprotokolle (Sicherheit, System, Sysmon) in Splunk verfügbar sind und Sysmon mit einer gängigen Konfiguration (SwiftOnSecurity oder Olaf Hartong) auf den Endpunkten läuft. Neben detaillierten SPL-Abfragen enthält sie eine Tabelle mit Schlüsselkonzepten (Ereignis-IDs, Logon-Typen), eine Liste unterstützter Tools (Splunk Enterprise, Sysmon, CIM, WEF) sowie häufige Szenarien wie Kerberoasting, DCSync und Pass-the-Hash.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-windows-event-logs-in-splunk

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Was macht Windows-Ereignisprotokolle in Splunk analysieren?

Wann verwenden

Verwenden Sie diese Skill, wenn:

  • SOC-Analysten Vorfälle im Zusammenhang mit Windows-Authentifizierung, Prozessausführung oder AD-Änderungen untersuchen
  • Detection Engineers SPL-Abfragen für Windows-basierte Bedrohungserkennung erstellen
  • Incident Responder forensische Zeitachsen von Windows-Endpunkten oder Domänencontrollern benötigen
  • Periodische Jagd nach Windows-spezifischen ATT&CK-Techniken durchgeführt wird

Nicht verwenden für die Analyse von Linux/macOS-Endpunkten oder reine Netzwerkuntersuchungen.

Voraussetzungen

  • Splunk mit aufgenommenen Windows-Ereignisprotokolldaten (sourcetype WinEventLog:Security, WinEventLog:System, XmlWinEventLog:Microsoft-Windows-Sysmon/Operational)
  • Sysmon auf Endpunkten mit SwiftOnSecurity- oder Olaf-Hartong-Konfiguration bereitgestellt
  • CIM-Datenmodellbeschleunigung für Endpunkt- und Authentifizierungsdatenmodelle
  • Kenntnisse der Windows-Sicherheitsereignis-IDs und Sysmon-Ereignistypen

Arbeitsablauf

Schritt 1: Erkennung von Authentifizierungsangriffen

Brute-Force-Erkennung (EventCode 4625 — Fehlgeschlagene Anmeldung):

index=wineventlog sourcetype="WinEventLog:Security" EventCode=4625
| stats count, dc(TargetUserName) AS unique_users, values(TargetUserName) AS targeted_users
  by src_ip, Logon_Type, Status
| where count > 20
| eval attack_type = case(
    Logon_Type=3, "Netzwerk-Brute-Force",
    Logon_Type=10, "RDP-Brute-Force",
    Logon_Type=2, "Interaktive Brute-Force",
    1=1, "Sonstige"
  )
| eval status_meaning = case(
    Status="0xc000006d", "Falscher Benutzername oder Passwort",
    Status="0xc000006a", "Falsches Passwort (gültiger Benutzer)",
    Status="0xc0000234", "Konto gesperrt",
    Status="0xc0000072", "Konto deaktiviert",
    1=1, Status
  )
| sort - count
| table src_ip, attack_type, status_meaning, count, unique_users, targeted_users

Password-Spray-Erkennung:

index=wineventlog sourcetype="WinEventLog:Security" EventCode=4625 Logon_Type=3
| bin _time span=10m
| stats dc(TargetUserName) AS unique_users, count AS total_attempts,
  values(TargetUserName) AS users_targeted by src_ip, _time
| where unique_users > 10 AND total_attempts < unique_users * 3
| eval spray_confidence = if(unique_users > 25, "HOCH", "MITTEL")

Erfolgreiche Anmeldung nach Fehlschlägen (Kompromittierungsindikator):

index=wineventlog sourcetype="WinEventLog:Security"
(EventCode=4625 OR EventCode=4624) src_ip!="127.0.0.1"
| sort _time
| stats earliest(_time) AS first_seen, latest(_time) AS last_seen,
  sum(eval(if(EventCode=4625,1,0))) AS failures,
  sum(eval(if(EventCode=4624,1,0))) AS successes
  by src_ip, TargetUserName, ComputerName
| where failures > 10 AND successes > 0
| eval time_to_success = round((last_seen - first_seen)/60, 1)
| sort - failures

Schritt 2: Erkennung von Privilegieneskalation

Neues Administratorkonto erstellt (T1136.001):

index=wineventlog sourcetype="WinEventLog:Security" EventCode=4720
| join TargetUserName type=left [
    search index=wineventlog EventCode=4732 TargetUserName="Administratoren"
    | rename MemberName AS TargetUserName
  ]
| table _time, SubjectUserName, TargetUserName, ComputerName
| eval alert = "Neues Konto erstellt und zur Administratorengruppe hinzugefügt"

Besondere Berechtigungen zugewiesen (EventCode 4672):

index=wineventlog sourcetype="WinEventLog:Security" EventCode=4672
SubjectUserName!="SYSTEM" SubjectUserName!="LOCAL SERVICE" SubjectUserName!="NETWORK SERVICE"
| stats count, values(PrivilegeList) AS privileges by SubjectUserName, ComputerName
| where count > 0
| search privileges IN ("SeDebugPrivilege", "SeTcbPrivilege", "SeBackupPrivilege",
  "SeRestorePrivilege", "SeAssignPrimaryTokenPrivilege")

Token-Manipulationserkennung (T1134):

index=sysmon EventCode=10 TargetImage="*\\lsass.exe"
GrantedAccess IN ("0x1010", "0x1038", "0x1fffff", "0x40")
| stats count by SourceImage, SourceUser, Computer, GrantedAccess
| where NOT match(SourceImage, "(svchost|csrss|wininit|MsMpEng|CrowdStrike)")
| sort - count

Schritt 3: Erkennung von Persistenzmechanismen

Geplante Aufgabe erstellt (T1053.005):

index=wineventlog (sourcetype="WinEventLog:Security" EventCode=4698)
  OR (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
      Image="*\\schtasks.exe")
| eval task_info = coalesce(TaskContent, CommandLine)
| search task_info="*powershell*" OR task_info="*cmd*" OR task_info="*http*" OR task_info="*\\Temp\\*"
| table _time, Computer, SubjectUserName, TaskName, task_info

Registry-Run-Key-Änderung (T1547.001):

index=sysmon EventCode=13
TargetObject IN (
  "*\\CurrentVersion\\Run\\*",
  "*\\CurrentVersion\\RunOnce\\*",
  "*\\CurrentVersion\\RunServices\\*",
  "*\\Explorer\\Shell Folders\\*"
)
| stats count by Computer, Image, TargetObject, Details
| where NOT match(Image, "(explorer\\.exe|msiexec\\.exe|setup\\.exe)")
| sort - count

WMI-Ereignisabonnement (T1546.003):

index=sysmon EventCode=20 OR EventCode=21
| stats count by Computer, Operation, Consumer, EventNamespace
| where count > 0

Schritt 4: Erkennung seitlicher Bewegung

Remote-Dienstausnutzung (T1021.002 — SMB/Windows-Admin-Freigaben):

index=wineventlog sourcetype="WinEventLog:Security" EventCode=4624 Logon_Type=3
| stats dc(ComputerName) AS unique_destinations, values(ComputerName) AS targets
  by src_ip, TargetUserName
| where unique_destinations > 3
| sort - unique_destinations
| table src_ip, TargetUserName, unique_destinations, targets

PsExec-Erkennung (T1021.002):

index=sysmon EventCode=1
(Image="*\\psexec.exe" OR Image="*\\psexesvc.exe"
 OR ParentImage="*\\psexesvc.exe"
 OR OriginalFileName="psexec.c")
| table _time, Computer, User, ParentImage, Image, CommandLine

RDP-seitliche Bewegung (T1021.001):

index=wineventlog sourcetype="WinEventLog:Security" EventCode=4624 Logon_Type=10
| stats count, dc(ComputerName) AS rdp_targets, values(ComputerName) AS destinations
  by src_ip, TargetUserName
| where rdp_targets > 2
| sort - rdp_targets

Schritt 5: Forensische Zeitachse erstellen

Erstellen Sie eine umfassende Zeitachse für einen kompromittierten Host:

(index=wineventlog OR index=sysmon) Computer="WORKSTATION-042"
earliest="2024-03-14T00:00:00" latest="2024-03-16T00:00:00"
| eval event_description = case(
    EventCode=4624, "Anmeldung: ".TargetUserName." (Typ ".Logon_Type.")",
    EventCode=4625, "Fehlgeschlagene Anmeldung: ".TargetUserName,
    EventCode=4688 OR (sourcetype="XmlWinEventLog:*Sysmon*" AND EventCode=1),
      "Prozess: ".Image." CMD: ".CommandLine,
    EventCode=4698, "Geplante Aufgabe: ".TaskName,
    EventCode=3, "Netzwerk: ".DestinationIp.":".DestinationPort,
    EventCode=11, "Datei erstellt: ".TargetFilename,
    EventCode=13, "Registry: ".TargetObject,
    1=1, "Ereignis ".EventCode
  )
| sort _time
| table _time, EventCode, event_description, User, src_ip

Schritt 6: Lookup-Tabellen zur Anreicherung erstellen

Erstellen Sie Referenz-Lookups für den Kontext von Windows-Ereignis-IDs:

| inputlookup windows_eventcode_lookup.csv
| table EventCode, Description, ATT_CK_Technique, Severity

Falls die Lookup-Tabelle nicht existiert, erstellen Sie sie:

EventCode,Description,ATT_CK_Technique,Severity
4624,Erfolgreiche Anmeldung,T1078,Informativ
4625,Fehlgeschlagene Anmeldung,T1110,Niedrig
4648,Anmeldung mit expliziten Anmeldeinformationen,T1078,Mittel
4672,Besondere Berechtigungen zugewiesen,T1134,Mittel
4688,Neuer Prozess erstellt,T1059,Informativ
4698,Geplante Aufgabe erstellt,T1053.005,Mittel
4720,Benutzerkonto erstellt,T1136.001,Hoch
4732,Mitglied zu Sicherheitsgruppe hinzugefügt,T1098,Hoch
4768,Kerberos-TGT angefordert,T1558,Informativ
4769,Kerberos-Dienstticket,T1558.003,Niedrig
4771,Kerberos-Pre-Auth fehlgeschlagen,T1110,Niedrig

Schlüsselkonzepte

BegriffDefinition
EventCode 4624Erfolgreiches Anmeldeereignis — Logon_Type 2 (interaktiv), 3 (Netzwerk), 10 (RDP), 7 (Entsperren)
EventCode 4625Fehlgeschlagenes Anmeldeereignis — Statuscode gibt Fehlerursache an (falsches Passwort, Konto gesperrt, deaktiviert)
Sysmon EventCode 1Prozesserstellung mit vollständiger Befehlszeile, Elternprozess und Hash-Informationen
Sysmon EventCode 3Netzwerkverbindung, die von einem Prozess initiiert wurde — Quell-/Ziel-IP, Port und Prozesskontext
Logon Type 3Netzwerkanmeldung (SMB, WMI, PowerShell-Remoting) — Schlüsselindikator für seitliche Bewegung
Logon Type 10Remote-interaktive Anmeldung über RDP/Terminaldienste

Werkzeuge und Systeme

  • Splunk Enterprise: SIEM-Plattform mit SPL-Abfrage-Engine für Windows-Ereignisprotokollanalyse und -korrelation
  • Sysmon (System Monitor): Microsoft Sysinternals-Tool zur detaillierten Protokollierung von Prozess-, Netzwerk- und Dateiaktivitäten
  • Splunk CIM: Common Information Model zur Abbildung von Windows-Ereignissen auf normalisierte Felder für queries über mehrere Quellen hinweg
  • Windows Event Forwarding (WEF): Integrierter Windows-Mechanismus zur Zentralisierung von Ereignisprotokollen auf einem Sammelserver

Häufige Szenarien

  • Kerberoasting (T1558.003): Erkennung von EventCode 4769 mit Verschlüsselungstyp 0x17 (RC4) für nicht standardmäßige Dienstkonten
  • DCSync (T1003.006): Erkennung von EventCode 4662 mit DS-Replication-Get-Changes von Nicht-DC-Quellen
  • Golden Ticket (T1558.001): Erkennung von EventCode 4769 mit anormalen Ticketeigenschaften (lange Lebensdauer, nicht standardmäßige Verschlüsselung)
  • Pass-the-Hash (T1550.002): Erkennung von EventCode 4624 Logon_Type 3 mit NTLM-Authentifizierung von unerwarteten Quellen
  • DLL-Side-Loading (T1574.002): Sysmon EventCode 7 zeigt unsignierte DLLs, die von legitimen Prozessen geladen werden

Ausgabeformat

WINDOWS-EREIGNISPROTOKOLLANALYSE — HOST: WORKSTATION-042
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Zeitraum:    2024-03-14 bis 2024-03-15
Ereignisse:  12.847 insgesamt (Sicherheit: 9.231 | Sysmon: 3.616)

Authentifizierungsübersicht:
  Erfolgreiche Anmeldungen (4624):    487 (Typ 3: 312, Typ 10: 45, Typ 2: 130)
  Fehlgeschlagene Anmeldungen (4625): 847 (von 192.168.1.105 — BRUTE-FORCE)
  Explizite Anmeldedaten (4648):      12

Verdächtige Funde:
  [HOCH]   847 fehlgeschlagene Anmeldungen, gefolgt von Erfolg um 14:35 von 192.168.1.105
  [HOCH]   Neuer Benutzer "backdoor_admin" erstellt (4720) um 14:38
  [HOCH]   Benutzer zur Administratorengruppe hinzugefügt (4732) um 14:38
  [MITTEL] schtasks.exe erstellt Persistenzaufgabe um 14:42
  [MITTEL] PowerShell-kodierte Befehlsausführung um 14:45

ATT&CK-Zuordnung:
  T1110.001 — Passwort-Raten (847 fehlgeschlagene Anmeldungen)
  T1136.001 — Lokale Kontenerstellung (backdoor_admin)
  T1053.005 — Geplante Aufgabe (Persistenz)
  T1059.001 — PowerShell (kodierte Ausführung)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

Verwandte Skills