Windows
Detection rules for Windows data sources. Each rule includes its MITRE ATT&CK mapping, impact rating, and a description of what it detects. These rules analyze events with the data type wineventlog, which the Windows Agent integration sends.
This category contains 56 detection rules.
| Rule | Category | Technique | Impact (C/I/A) |
|---|---|---|---|
| ADFS Authentication Anomalies | Defense Evasion, Persistence, Privilege Escalation, Initial Access | T1078 - Valid Accounts | C:3 / I:2 / A:2 |
| AS-REP Roasting Attack Detection | Credential Access | T1558.004 - Steal or Forge Kerberos Tickets: AS-REP Roasting | C:3 / I:2 / A:1 |
| AdminSDHolder Abuse Detection | Persistence, Privilege Escalation | T1098 - Account Manipulation | C:3 / I:3 / A:2 |
| Certificate Services Abuse Detection | Credential Access | T1558 - Steal or Forge Kerberos Tickets | C:3 / I:3 / A:1 |
| Golden Ticket Attack Detection | Credential Access | T1558.001 - Steal or Forge Kerberos Tickets: Golden Ticket | C:3 / I:3 / A:3 |
| Kerberoasting Attack Detection | Credential Access | T1558.003 - Steal or Forge Kerberos Tickets: Kerberoasting | C:3 / I:2 / A:1 |
| NTDS.dit Extraction Attempt | Credential Access | T1003.003 - OS Credential Dumping: NTDS | C:3 / I:3 / A:1 |
| NTLM Authentication Downgrade Attack | Defense Evasion | T1562.001 - Impair Defenses: Disable or Modify Tools | C:3 / I:3 / A:1 |
| Process Masquerading Detection | Defense Evasion | T1036.005 - Masquerading: Match Legitimate Name or Location | C:2 / I:3 / A:2 |
| SAM Database Access Attempt | Credential Access | T1003.002 - OS Credential Dumping: Security Account Manager | C:3 / I:3 / A:1 |
| SID History Injection Attempt | Defense Evasion, Privilege Escalation | T1134.005 - Access Token Manipulation: SID-History Injection | C:3 / I:3 / A:1 |
| SMBv1 Usage Detection | Lateral Movement | T1210 - Exploitation of Remote Services | C:3 / I:2 / A:2 |
| Silver Ticket Attack Detection | Credential Access | T1558.002 - Steal or Forge Kerberos Tickets: Silver Ticket | C:3 / I:3 / A:2 |
| Windows Remote Management (WinRM) Abuse | Lateral Movement | T1021.006 - Remote Services: Windows Remote Management | C:3 / I:3 / A:2 |
| Windows audit log was cleared | Defense Evasion | T1070.001 - Indicator Removal: Clear Windows Event Logs | C:1 / I:2 / A:3 |
| Windows: Account Added to a Privileged Group | Administrative Awareness | Privileged group membership change | C:2 / I:2 / A:0 |
| Windows: Audit Policy Changed by a User Account | Administrative Awareness | Audit policy change | C:1 / I:2 / A:0 |
| Windows: Audit Policy or Event Log Tampering | Defense Evasion | T1562.002 - Impair Defenses: Disable Windows Event Logging | C:2 / I:3 / A:2 |
| Windows: Built-in Administrator or Guest Account Enabled | Administrative Awareness | Built-in account enabled | C:2 / I:2 / A:0 |
| Windows: Credential Dumping Tool Indicators | Credential Access | T1003 - OS Credential Dumping | C:3 / I:3 / A:2 |
| Windows: Directory Services Restore Mode Password Set | Administrative Awareness | Domain controller recovery password change | C:2 / I:2 / A:0 |
| Windows: Domain Trust Created, Removed or Changed | Administrative Awareness | Domain trust change | C:2 / I:2 / A:1 |
| Windows: Firewall Rule or Configuration Deleted | Defense Evasion | T1562.004 - Impair Defenses: Disable or Modify System Firewall | C:1 / I:3 / A:2 |
| Windows: GetSystem-Style Service Installed for SYSTEM Token Impersonation | Privilege Escalation | T1134.001 - Access Token Manipulation: Token Impersonation/Theft | C:3 / I:3 / A:1 |
| Windows: Group Policy Object Changed | Administrative Awareness | Group Policy change | C:1 / I:1 / A:0 |
| Windows: LOLBin Proxy Execution / Ingress Tool Transfer | Defense Evasion | T1218 - System Binary Proxy Execution | C:2 / I:2 / A:1 |
| Windows: LSA Secrets or DPAPI Backup Key Access | Credential Access | T1003.004 - OS Credential Dumping: LSA Secrets | C:3 / I:1 / A:1 |
| Windows: LSASS Memory Dump Handle Access | Credential Access | T1003.001 - OS Credential Dumping: LSASS Memory | C:2 / I:3 / A:3 |
| Windows: Microsoft Defender Antivirus Protection Disabled | Administrative Awareness | Antivirus protection disabled | C:1 / I:2 / A:0 |
| Windows: Multiple Logon Failure Followed by Logon Success | Credential Access | T1110 - Brute Force | C:2 / I:2 / A:3 |
| Windows: New User Account Created | Administrative Awareness | User account creation | C:1 / I:1 / A:0 |
| Windows: New Windows Service Created to start from windows root path. Suspicious event as the binary may have been dropped using Windows Admin Shares | Execution | T1021.002 - Remote Services: SMB/Windows Admin Shares | C:1 / I:2 / A:3 |
| Windows: Office Application Spawned Command or Script Interpreter | Execution | T1204.002 - User Execution: Malicious File | C:2 / I:3 / A:2 |
| Windows: Pass the Hash Activity | Lateral Movement | T1550.002 - Use Alternate Authentication Material: Pass the Hash | C:3 / I:2 / A:1 |
| Windows: Password, Lockout or Kerberos Policy Changed | Administrative Awareness | Account policy change | C:1 / I:1 / A:0 |
| Windows: Persistence via PowerShell profile | Persistence | T1546.013 - Event Triggered Execution: PowerShell Profile | C:2 / I:3 / A:1 |
| Windows: Possible Brute Force Attack | Credential Access | T1110 - Brute Force | C:2 / I:2 / A:3 |
| Windows: Possible ransomware attack detected. Multiple File Deletion. | Impact | T1486 - Data Encrypted for Impact | C:1 / I:3 / A:2 |
| Windows: Possible ransomware attack detected. Ransomware Note Creation. | Impact | T1486 - Data Encrypted for Impact | C:3 / I:3 / A:2 |
| Windows: Possible ransomware attack detected. Unusual File Extensions. | Impact | T1486 - Data Encrypted for Impact | C:3 / I:3 / A:3 |
| Windows: Printer driver failed to load, possible remote code execution using PrinterNightmare exploit: CVE-2021-34527 | Lateral Movement | T1210 - Exploitation of Remote Services | C:3 / I:2 / A:1 |
| Windows: Ransomware Recovery Inhibition (Shadow Copy / Backup Deletion) | Impact | T1490 - Inhibit System Recovery | C:1 / I:3 / A:3 |
| Windows: Remote File Download via Desktopimgdownldr Utility | Command and Control | T1105 - Ingress Tool Transfer | C:2 / I:3 / A:1 |
| Windows: Scheduled Task Created with Suspicious Action | Persistence | T1053.005 - Scheduled Task/Job: Scheduled Task | C:2 / I:3 / A:1 |
| Windows: Suspicious PowerShell (Encoded / Download Cradle / AMSI Bypass) | Execution | T1059.001 - Command and Scripting Interpreter: PowerShell | C:2 / I:3 / A:2 |
| Windows: Suspicious Print Spooler SPL File Created | Privilege Escalation | T1068 - Exploitation for Privilege Escalation | C:1 / I:3 / A:2 |
| Windows: Suspicious PrintSpooler Service Executable File Creation | Privilege Escalation | T1068 - Exploitation for Privilege Escalation | C:2 / I:3 / A:1 |
| Windows: Suspicious Scheduled Task Created | Persistence | T1053.005 - Scheduled Task/Job: Scheduled Task | C:2 / I:2 / A:1 |
| Windows: Suspicious Service Installation | Execution | T1569.002 - System Services: Service Execution | C:2 / I:3 / A:2 |
| Windows: SysKey Registry Subkey Access | Discovery | T1012 - Query Registry | C:3 / I:1 / A:1 |
| Windows: UAC Bypass Attempt via Privileged IFileOperation COM Interface | Privilege Escalation | T1548.002 - Abuse Elevation Control Mechanism: Bypass User Account Control | C:1 / I:3 / A:2 |
| Windows: Unauthorized RMM Tool Service Installation | Command and Control | T1219.002 - Remote Access Software: Remote Desktop Software | C:2 / I:2 / A:1 |
| Windows: Unusual File Modification by dns.exe | Lateral Movement | T1210 - Exploitation of Remote Services | C:1 / I:3 / A:2 |
| Windows: Unusual Process Network Connection | Defense Evasion | Trusted Developer Utilities Proxy Execution | C:3 / I:3 / A:2 |
| Windows: User logged using Remote Desktop Connection from loopback address, possible exploit over reverse tunneling using stolen credentials | Credential Access | T1021.001 - Remote Services: Remote Desktop Protocol | C:3 / I:2 / A:1 |
| Windows: Windows Firewall Turned Off | Administrative Awareness | Host firewall disabled | C:1 / I:2 / A:0 |
Rule Example
Below is an example of a rule definition for ADFS Authentication Anomalies (view in repository):
# Rule version v1.0.1
dataTypes:
- wineventlog
name: ADFS Authentication Anomalies
impact:
confidentiality: 3
integrity: 2
availability: 2
category: Defense Evasion, Persistence, Privilege Escalation, Initial Access
technique: "T1078 - Valid Accounts"
adversary: origin
references:
- https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/troubleshooting/ad-fs-tshoot-logging
- https://attack.mitre.org/techniques/T1078/
description: |
Detects anomalous authentication attempts against Active Directory Federation Services (ADFS) including multiple failed attempts that could indicate password spraying or brute force attacks. This rule monitors for authentication failures, token validation failures, and other ADFS security events that may indicate malicious activity.
Next Steps:
1. Review the source IP address and determine if it's from a known/trusted location
2. Check for patterns of failed authentication attempts across multiple users
3. Examine ADFS audit logs for additional context around the authentication failures
4. Verify if the targeted user accounts are valid and active
5. Consider implementing IP-based blocking if malicious activity is confirmed
6. Review ADFS configuration for security hardening opportunities
7. Correlate with other authentication events across the domain
where: |
!oneOf("dataSource", ["", "unknown"]) &&
exists("log.authenticationSource") &&
equals("log.providerName", "AD FS") && (equals("log.eventCode", "342") || equals("log.eventCode", "516")) && contains("log.message", "token validation failed")
afterEvents:
- with:
- field: dataSource
operator: filter_term
value: '{{.dataSource}}'
- field: log.authenticationSource
operator: filter_term
value: '{{.log.authenticationSource}}'
- field: log.authenticationCandidate.adfsAuthenticationAnomalies
operator: filter_term
value: match
- field: log.eventCode
operator: filter_term
value: '{{.log.eventCode}}'
within: 10m
count: 10
groupBy:
- dataSource
- lastEvent.log.authenticationSource
- target.user
Rule Details
ADFS Authentication Anomalies
Detects anomalous authentication attempts against Active Directory Federation Services (ADFS) including multiple failed attempts that could indicate password spraying or brute force attacks. This rule monitors for authentication failures, token validation failures, and other ADFS security events that may indicate malicious activity.
Category: Defense Evasion, Persistence, Privilege Escalation, Initial Access
Technique: T1078 - Valid Accounts
Impact: C:3 / I:2 / A:2
Rule file: adfs_authentication_anomalies.yaml
Reference: https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/troubleshooting/ad-fs-tshoot-logging
Reference: https://attack.mitre.org/techniques/T1078/
AS-REP Roasting Attack Detection
Detects AS-REP Roasting attacks targeting accounts with Kerberos pre-authentication disabled.
Attackers request AS-REP messages encrypted with RC4 (0x17) for accounts that do not require
pre-authentication, enabling offline password cracking. This is a companion technique to Kerberoasting
and targets a different set of vulnerable accounts.
Category: Credential Access
Technique: T1558.004 - Steal or Forge Kerberos Tickets: AS-REP Roasting
Impact: C:3 / I:2 / A:1
Rule file: asrep_roasting_detection.yaml
Reference: https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4768
Reference: https://blog.harmj0y.net/activedirectory/roasting-as-reps/
AdminSDHolder Abuse Detection
Detects modifications to the AdminSDHolder object which can be used for persistence by granting elevated privileges. The SDProp process propagates these permissions to protected groups every 60 minutes, making this a critical security event. It reads directory service change events (5136), whose ObjectDN field names the changed object; access events (4662) name objects by GUID and cannot identify AdminSDHolder. Changes made by SYSTEM (S-1-5-18) are excluded. One alert is raised per domain controller and account; repeats are suppressed for seven days.
Category: Persistence, Privilege Escalation
Technique: T1098 - Account Manipulation
Impact: C:3 / I:3 / A:2
Rule file: adminsdholder_abuse.yaml
Reference: https://attack.mitre.org/techniques/T1098/
Reference: https://adsecurity.org/?p=1906
Certificate Services Abuse Detection
Detects suspicious certificate requests and issuance that could indicate Golden Certificate attacks or unauthorized certificate generation for persistence. This rule monitors Windows Certificate Services events for potentially malicious certificate operations, particularly those involving machine accounts or anonymous logons that could be leveraged for persistence and privilege escalation. The requesting account is read from the Requester field of events 4886 and 4887. One alert is raised per computer and requester; repeats are suppressed for seven days.
Category: Credential Access
Technique: T1558 - Steal or Forge Kerberos Tickets
Impact: C:3 / I:3 / A:1
Rule file: certificate_services_abuse.yaml
Reference: https://attack.mitre.org/techniques/T1558/
Golden Ticket Attack Detection
Detects Golden Ticket attacks where adversaries forge Kerberos TGTs using the KRBTGT account
hash, granting unlimited domain access. The rule detects anomalous TGT usage patterns including
TGS requests with unusual encryption types, tickets with abnormally long lifetimes, and Kerberos
authentication from non-domain-controller sources for the KRBTGT service.
Category: Credential Access
Technique: T1558.001 - Steal or Forge Kerberos Tickets: Golden Ticket
Impact: C:3 / I:3 / A:3
Rule file: golden_ticket_detection.yaml
Reference: https://adsecurity.org/?p=1640
Reference: https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4769
Kerberoasting Attack Detection
Detects Kerberoasting attacks where adversaries request Kerberos TGS tickets encrypted with RC4 (0x17) for
service accounts in order to crack them offline and obtain plaintext credentials. This is the most common
Active Directory credential theft technique used in real-world compromises. The rule monitors Event ID 4769
(Kerberos Service Ticket Operations) for RC4 encryption requests while excluding machine accounts (ending in $)
and legitimate system services.
Category: Credential Access
Technique: T1558.003 - Steal or Forge Kerberos Tickets: Kerberoasting
Impact: C:3 / I:2 / A:1
Rule file: kerberoasting_detection.yaml
Reference: https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4769
Reference: https://adsecurity.org/?p=2293
NTDS.dit Extraction Attempt
Detects attempts to access or copy the Active Directory domain database (NTDS.dit) which contains password hashes for all domain users. This is a critical indicator of credential theft attempts and potential domain compromise.
Category: Credential Access
Technique: T1003.003 - OS Credential Dumping: NTDS
Impact: C:3 / I:3 / A:1
Rule file: ntds_extraction_attempts.yaml
NTLM Authentication Downgrade Attack
Detects NTLM authentication downgrade attacks via registry modifications to LMCompatibilityLevel,
NtlmMinClientSec, and NtlmMinServerSec. Attackers modify these registry values to weaken NTLM
authentication security, enabling credential interception, relay attacks, and offline cracking
of captured NTLM hashes. Downgrading to LM or NTLMv1 authentication makes credential theft
significantly easier.
Category: Defense Evasion
Technique: T1562.001 - Impair Defenses: Disable or Modify Tools
Impact: C:3 / I:3 / A:1
Rule file: ntlm_downgrade_attack.yaml
Reference: https://www.praetorian.com/blog/ntlm-relaying-attacks/
Process Masquerading Detection
Detects executables masquerading as legitimate Windows system processes but running from
incorrect locations. For example, svchost.exe should only run from C:\Windows\System32,
and explorer.exe should only run from C:\Windows. Malware commonly uses legitimate process
names to avoid detection by analysts and automated tools.
Category: Defense Evasion
Technique: T1036.005 - Masquerading: Match Legitimate Name or Location
Impact: C:2 / I:3 / A:2
Rule file: masquerading_detection.yaml
Reference: https://www.elastic.co/blog/how-hunt-masquerade-ball
Reference: https://redcanary.com/threat-detection-report/techniques/masquerading/
SAM Database Access Attempt
Detects attempts to access the Security Account Manager (SAM) database, which contains local user account hashes. This activity may indicate credential dumping attempts by attackers trying to extract password hashes for offline cracking or lateral movement. One alert is raised per computer and account; repeats are suppressed for seven days.
Category: Credential Access
Technique: T1003.002 - OS Credential Dumping: Security Account Manager
Impact: C:3 / I:3 / A:1
Rule file: sam_database_access.yaml
SID History Injection Attempt
Detects attempts to add SID History to an account, which can be used for privilege escalation. SID History injection allows attackers to inherit permissions from privileged accounts without being members of privileged groups. Both successful (4765) and failed (4766) attempts are monitored.
Category: Defense Evasion, Privilege Escalation
Technique: T1134.005 - Access Token Manipulation: SID-History Injection
Impact: C:3 / I:3 / A:1
Rule file: sid_history_injection.yaml
Reference: https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4765
Reference: https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4766
Reference: https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4765
SMBv1 Usage Detection
Detects usage of the deprecated and vulnerable SMBv1 protocol which could be exploited for lateral movement or ransomware propagation. SMBv1 is susceptible to numerous security vulnerabilities including EternalBlue and should be disabled in favor of SMBv2/SMBv3. Once SMBv1 access auditing is enabled (Set-SmbServerConfiguration -AuditSmb1Access $true), Windows writes event 3000 to the Microsoft-Windows-SMBServer/Audit log each time a client uses SMBv1, so the event itself is the signal. One alert is raised per server; repeats are suppressed for seven days.
Category: Lateral Movement
Technique: T1210 - Exploitation of Remote Services
Impact: C:3 / I:2 / A:2
Rule file: smbv1_usage_detection.yaml
Reference: https://attack.mitre.org/techniques/T1210/
Silver Ticket Attack Detection
Detects Silver Ticket attacks where adversaries forge Kerberos TGS tickets using a service
account's NTLM hash, bypassing the KDC entirely. Unlike Golden Tickets, Silver Tickets target
specific services. The rule detects TGS tickets presented without corresponding TGT requests,
and service access events with anomalous Kerberos authentication patterns.
Category: Credential Access
Technique: T1558.002 - Steal or Forge Kerberos Tickets: Silver Ticket
Impact: C:3 / I:3 / A:2
Rule file: silver_ticket_detection.yaml
Reference: https://adsecurity.org/?p=2011
Reference: https://www.sans.org/blog/kerberos-in-the-crosshairs-golden-tickets-silver-tickets-mitm-and-more/
Windows Remote Management (WinRM) Abuse
Detects potential abuse of Windows Remote Management (WinRM) for lateral movement: a shell or a discovery or administration tool started (4688) by the WinRM host processes (wsmprovhost.exe or winrshost.exe), indicating remote command execution via WinRM.
Category: Lateral Movement
Technique: T1021.006 - Remote Services: Windows Remote Management
Impact: C:3 / I:3 / A:2
Rule file: windows_remote_management_abuse.yaml
Reference: https://jpcertcc.github.io/ToolAnalysisResultSheet/details/WinRM.htm
Windows audit log was cleared
Detects when the Windows audit log (Security event log) has been cleared. Adversaries may clear event logs to remove evidence of an intrusion.
Category: Defense Evasion
Technique: T1070.001 - Indicator Removal: Clear Windows Event Logs
Impact: C:1 / I:2 / A:3
Rule file: audit_log_was_cleared.yaml
Windows: Account Added to a Privileged Group
A user, computer or group was added to a Windows group that grants administrative control (events 4728, 4732 and 4756): the local or domain Administrators group, Domain Admins, Enterprise Admins, Schema Admins, Account Operators, Server Operators, Backup Operators, Print Operators, Replicator, Domain Controllers, Read-only Domain Controllers, Key Admins or Enterprise Key Admins. Groups are recognized by their fixed security identifier, so renamed or translated group names still match. This is an awareness alert for an administrative change; on its own it does not mean the system is compromised.
Additions made by the same account to the same group on the same computer are grouped under one alert. Windows LAPS automatic account management adds its managed account to the local Administrators group at every rotation, so a computer using it produces one alert and later rotations appear as child alerts.
Requires the "Audit Security Group Management" success audit on domain controllers and on computers whose local groups are monitored.
Category: Administrative Awareness
Technique: Privileged group membership change
Impact: C:2 / I:2 / A:0
Rule file: awareness_privileged_group_member_added.yaml
Windows: Audit Policy Changed by a User Account
An account signed in as a user changed the computer's audit policy (event 4719), for example with auditpol.exe or the local security policy editor. The audit policy decides which security events Windows records, so switching categories off hides later activity. Microsoft recommends investigating any change that was not planned. Windows always records this event.
Changes made by the system itself are left out: SYSTEM, LOCAL SERVICE, NETWORK SERVICE and computer accounts. Windows reapplies the audit policy from Group Policy under those accounts many times a day, so audit changes delivered through Group Policy are not reported here. Changes by the same account on the same computer are grouped under one alert.
Category: Administrative Awareness
Technique: Audit policy change
Impact: C:1 / I:2 / A:0
Rule file: awareness_audit_policy_changed_by_user.yaml
Windows: Audit Policy or Event Log Tampering
Detects clearing of event logs (event 104) or command-line tampering with auditing/logging (auditpol /clear or /set ...disable, wevtutil cl, Clear-EventLog, fsutil usn deletejournal). Complements the Security-log-cleared (1102) rule.
Category: Defense Evasion
Technique: T1562.002 - Impair Defenses: Disable Windows Event Logging
Impact: C:2 / I:3 / A:2
Rule file: audit_or_event_log_tampering.yaml
Windows: Built-in Administrator or Guest Account Enabled
The built-in Administrator account or the built-in Guest account was enabled on a computer or in a domain (event 4722). Every computer and every domain has these two accounts, with fixed identifiers ending in 500 and 501, which makes them well-known targets. Microsoft's Windows LAPS guidance recommends leaving the built-in Administrator account unused and disabled. The account is recognized by its identifier, so renamed or translated account names still match.
Enabling the same account again by the same account on the same computer is grouped under one alert.
Requires the "Audit User Account Management" success audit.
Category: Administrative Awareness
Technique: Built-in account enabled
Impact: C:2 / I:2 / A:0
Windows: Credential Dumping Tool Indicators
Detects command-line and PowerShell script-block indicators of credential-dumping tools (mimikatz/sekurlsa/lsadump, procdump lsass, comsvcs MiniDump, nanodump, rubeus). The command-line branch is the reliable trigger since AMSI blocks literal mimikatz strings in PowerShell.
Category: Credential Access
Technique: T1003 - OS Credential Dumping
Impact: C:3 / I:3 / A:2
Rule file: credential_dumping_tool_indicators.yaml
Reference: https://attack.mitre.org/techniques/T1003/
Windows: Directory Services Restore Mode Password Set
A domain controller recorded an attempt to set the Directory Services Restore Mode administrator password (event 4794). This local administrator account is used to start a domain controller in repair mode. Microsoft recommends alerting on every occurrence. The event covers successful and failed attempts; check the status in the event.
Windows LAPS can manage this password on domain controllers. Its scheduled changes run as SYSTEM and, like other repeated changes by the same account on the same domain controller, are grouped under one alert.
Requires the "Audit User Account Management" success and failure audit on domain controllers.
Category: Administrative Awareness
Technique: Domain controller recovery password change
Impact: C:2 / I:2 / A:0
Rule file: awareness_dsrm_password_set.yaml
Windows: Domain Trust Created, Removed or Changed
A domain controller recorded that a trust to another domain was created (event 4706), removed (event 4707) or changed (event 4716). Trusts decide which accounts from other domains can reach resources in this domain. Microsoft recommends alerting on every trust change.
Automatic trust password resets are left out: Microsoft documents that a 4716 event whose actor is ANONYMOUS LOGON (S-1-5-7) is the system's scheduled trust password reset. Changes by the same account on the same domain controller are grouped under one alert.
Requires the "Audit Authentication Policy Change" success audit on domain controllers.
Category: Administrative Awareness
Technique: Domain trust change
Impact: C:2 / I:2 / A:1
Rule file: awareness_domain_trust_changed.yaml
Windows: Firewall Rule or Configuration Deleted
A rule (or all rules) was deleted from the Windows Defender Firewall
exception list by a process other than the OS's own firewall service or
Defender -- a common step before staging a listener or exfiltration
channel that the default firewall policy would otherwise block.
Category: Defense Evasion
Technique: T1562.004 - Impair Defenses: Disable or Modify System Firewall
Impact: C:1 / I:3 / A:2
Rule file: firewall_rule_tampering.yaml
Windows: GetSystem-Style Service Installed for SYSTEM Token Impersonation
A service was installed whose binary path matches one of the known
Meterpreter/Cobalt Strike "getsystem" techniques: a named-pipe
echo/impersonation trick run through cmd.exe, a rundll32 DLL-based
technique, or a service pointed at the local ADMIN$ share
(\\127.0.0.1\ADMIN$\). All three are used to spawn a SYSTEM-level
process via a short-lived service and then impersonate its token --
none of them resemble a legitimate installer's ImagePath.
Category: Privilege Escalation
Technique: T1134.001 - Access Token Manipulation: Token Impersonation/Theft
Impact: C:3 / I:3 / A:1
Rule file: token_impersonation_getsystem_service.yaml
Windows: Group Policy Object Changed
A domain controller recorded a change to a Group Policy object in Active Directory (event 5136 on an object of class groupPolicyContainer): a new policy, a renamed policy, a permission change or a settings update. A Group Policy change reaches every computer and user the policy applies to.
Active Directory records each attribute update as a removal of the old value followed by the addition of the new one. Following Microsoft's advice, the rule uses only the "value added" record (%%14674). Changes by the same account to the same policy on the same domain controller are grouped under one alert. Deleted policies are not covered, because the Windows filter discards the deletion event (5141).
Requires the "Audit Directory Service Changes" success audit on domain controllers and an auditing entry that covers Group Policy objects.
Category: Administrative Awareness
Technique: Group Policy change
Impact: C:1 / I:1 / A:0
Rule file: awareness_group_policy_object_changed.yaml
Windows: LOLBin Proxy Execution / Ingress Tool Transfer
Detects living-off-the-land binaries used for proxy execution or download (mshta http, regsvr32 squiblydoo, certutil -urlcache/-decode, bitsadmin /transfer, wmic process call create, msbuild, installutil, mavinject).
Category: Defense Evasion
Technique: T1218 - System Binary Proxy Execution
Impact: C:2 / I:2 / A:1
Rule file: lolbin_proxy_execution.yaml
Reference: https://attack.mitre.org/techniques/T1218/
Windows: LSA Secrets or DPAPI Backup Key Access
A handle was opened to a registry SecretObject with write-DAC/read access,
including the domain's DPAPI backup key (BCKUPKEY) -- the object class
tools like Mimikatz's lsadump::secrets and lsadump::backupkeys query to
recover service account passwords, cached credentials and DPAPI master
keys. This object is never touched during normal administration.
Category: Credential Access
Technique: T1003.004 - OS Credential Dumping: LSA Secrets
Impact: C:3 / I:1 / A:1
Rule file: lsa_secrets_backup_key_access.yaml
Windows: LSASS Memory Dump Handle Access
Identifies handle requests for the Local Security Authority Subsystem Service (LSASS) object access with specific access masks that many tools with a capability to dump memory to disk use (0x1fffff, 0x1010, 0x120089). This rule is tool agnostic as it has been validated against a host of various LSASS dump tools such as SharpDump, Procdump, Mimikatz, Comsvcs etc. It detects this behavior at a low level and does not depend on a specific tool or dump file name. Programs under Program Files, Microsoft Defender and the listed Windows components are excluded. One alert is raised per computer and requesting program; repeats are suppressed for seven days.
Category: Credential Access
Technique: T1003.001 - OS Credential Dumping: LSASS Memory
Impact: C:2 / I:3 / A:3
Rule file: lsass_memdump_handle_access.yaml
Reference: https://attack.mitre.org/tactics/TA0006/
Reference: https://attack.mitre.org/techniques/T1003/
Windows: Microsoft Defender Antivirus Protection Disabled
Microsoft Defender Antivirus reported that real-time protection (event 5001), scanning for malware and potentially unwanted software (event 5010) or scanning for viruses (event 5012) was turned off. Defender does not protect the computer until the setting is turned back on. This also happens, as expected, when another antivirus product takes over from Defender.
Other products that reuse these event numbers are ignored: the rule requires the Microsoft Defender Antivirus provider and its Operational channel. All occurrences on the same computer are grouped under one alert.
Requires collection of the "Microsoft-Windows-Windows Defender/Operational" channel.
Category: Administrative Awareness
Technique: Antivirus protection disabled
Impact: C:1 / I:2 / A:0
Rule file: awareness_defender_protection_disabled.yaml
Reference: https://learn.microsoft.com/en-us/defender-endpoint/troubleshoot-microsoft-defender-antivirus
Windows: Multiple Logon Failure Followed by Logon Success
This rule is triggered when a sequence of multiple failed login attempts followed immediately by a successful login from the same IP address or source is detected. This unusual sequence of events may indicate a possible unauthorized access attempt using a brute force or password guessing technique. The purpose of this rule is to identify suspicious patterns of login activity and alert you to potential unauthorized access attempts. A successful logon (4624) alerts when the same computer recorded ten failed logons (4625) for the same account from the same source within the previous five minutes. Computer accounts (names ending in $) are skipped: their passwords are machine-generated and they make up almost half of all successful logons.
Category: Credential Access
Technique: T1110 - Brute Force
Impact: C:2 / I:2 / A:3
Rule file: bruteforce_multiple_logon_failure_followed_by_success.yaml
Reference: https://attack.mitre.org/tactics/TA0006/
Reference: https://attack.mitre.org/techniques/T1110/
Windows: New User Account Created
A new local or domain user account was created (event 4720). A local account is recorded by the computer where it was created; a domain account is recorded by the domain controller that processed the request. This is an awareness alert: creating accounts is often routine, but an unexpected account is a common way to keep access to a system.
Accounts created by the same account on the same computer or domain controller are grouped under one alert. Bulk provisioning and Windows LAPS automatic account management therefore produce one alert per computer, with later accounts as child alerts.
Requires the "Audit User Account Management" success audit.
Category: Administrative Awareness
Technique: User account creation
Impact: C:1 / I:1 / A:0
Rule file: awareness_user_account_created.yaml
Windows: New Windows Service Created to start from windows root path. Suspicious event as the binary may have been dropped using Windows Admin Shares
Adversaries may use Valid Accounts to interact with a remote network share using Server Message Block (SMB). The adversary may then perform actions as the logged-on user.
Category: Execution
Technique: T1021.002 - Remote Services: SMB/Windows Admin Shares
Impact: C:1 / I:2 / A:3
Rule file: suspicious_event_as_the_binary_may_have_been_dropped_using_windows_dmin_shares.yaml
Windows: Office Application Spawned Command or Script Interpreter
Detects an Office/document application (winword, excel, outlook, etc.) spawning a command or script interpreter - a classic macro/phishing payload execution chain.
Category: Execution
Technique: T1204.002 - User Execution: Malicious File
Impact: C:2 / I:3 / A:2
Rule file: office_application_spawned_shell.yaml
Windows: Pass the Hash Activity
A network logon carries the specific artifacts Pass-the-Hash tooling
leaves behind: an NTLM logon (LogonProcessName NtLmSsp) with KeyLength 0
and SubjectUserSid S-1-0-0 (no real originating account, since the
attacker never had the plaintext password), or a LogonType 9
(NewCredentials, e.g. runas /netonly) via the seclogo provider. Legitimate
interactive/network logons carry a real key length and a real subject.
Category: Lateral Movement
Technique: T1550.002 - Use Alternate Authentication Material: Pass the Hash
Impact: C:3 / I:2 / A:1
Rule file: pass_the_hash_ntlm_logon.yaml
Reference: https://blog.stealthbits.com/how-to-detect-pass-the-hash-attacks/
Windows: Password, Lockout or Kerberos Policy Changed
The account policy of a computer or domain changed (event 4739): password rules, account lockout, forced logoff or domain attributes. Or the domain's Kerberos policy changed (event 4713), which controls how long sign-in tickets last. Microsoft recommends alerting on any change to these settings. They are usually applied by the system when a Group Policy change reaches the computer, so the account shown is often SYSTEM.
Changes by the same account on the same computer are grouped under one alert.
Requires the "Audit Authentication Policy Change" success audit.
Category: Administrative Awareness
Technique: Account policy change
Impact: C:1 / I:1 / A:0
Rule file: awareness_account_or_kerberos_policy_changed.yaml
Windows: Persistence via PowerShell profile
Identifies the creation or modification of a PowerShell profile. PowerShell profile is a script that is executed when PowerShell starts to customize the user environment, which can be abused by attackers to persist in a environment where PowerShell is common.
Category: Persistence
Technique: T1546.013 - Event Triggered Execution: PowerShell Profile
Impact: C:2 / I:3 / A:1
Rule file: powershell_profiles.yaml
Reference: https://attack.mitre.org/tactics/TA0003/
Windows: Possible Brute Force Attack
This rule is triggered when a pattern of repeated and rapid login attempts from the same IP address or source is detected. These login attempts may target specific user accounts or services in an attempt to crack passwords through automated brute force. The purpose of this rule is to identify possible malicious unauthorized access attempts and prevent a brute force attack against the system. It counts failed logons (4625) on one computer from one source (the network address, else the workstation name, else the domain-qualified account), whichever accounts they target, so password spraying that tries each account only a few times is caught as well. Ten failures within five minutes raise one alert per computer and source; repeats are suppressed for seven days.
Category: Credential Access
Technique: T1110 - Brute Force
Impact: C:2 / I:2 / A:3
Rule file: windows_bruteforce_attack.yaml
Reference: https://attack.mitre.org/tactics/TA0006/
Reference: https://attack.mitre.org/techniques/T1110/
Windows: Possible ransomware attack detected. Multiple File Deletion.
Detects potential ransomware activity by monitoring multiple file write/modification events (Event ID 4663) with write access masks in user directories within a short timeframe. Modern ransomware typically encrypts files in-place rather than deleting them, making write access monitoring more effective than deletion monitoring alone. Fifty accesses with the same write access mask by one account on one computer within five minutes raise one alert per computer and account; repeats are suppressed for seven days.
Category: Impact
Technique: T1486 - Data Encrypted for Impact
Impact: C:1 / I:3 / A:2
Rule file: ransom_multiple_file_deletion.yaml
Reference: https://attack.mitre.org/tactics/TA0040/
Windows: Possible ransomware attack detected. Ransomware Note Creation.
Ransomware, is a type of malware that prevents users from accessing their system or personal files and requires payment of a ransom in order to gain access to them again. Identifies ransomware attempts. A known ransomware note file has been detected, potentially indicating an active ransomware infection.
Category: Impact
Technique: T1486 - Data Encrypted for Impact
Impact: C:3 / I:3 / A:2
Rule file: ransom_note_creation.yaml
Reference: https://attack.mitre.org/tactics/TA0040/
Windows: Possible ransomware attack detected. Unusual File Extensions.
Ransomware, is a type of malware that prevents users from accessing their system or personal files and requires payment of a ransom in order to gain access to them again. Identifies ransomware attempts. Files with unusual file extensions have been detected, potentially indicating encrypted files created by ransomware.
Category: Impact
Technique: T1486 - Data Encrypted for Impact
Impact: C:3 / I:3 / A:3
Rule file: ransom_unusual_file_extension.yaml
Reference: https://attack.mitre.org/tactics/TA0040/
Windows: Printer driver failed to load, possible remote code execution using PrinterNightmare exploit: CVE-2021-34527
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network. Exploitation of a software vulnerability occurs when an adversary takes advantage of a programming error in a program, service, or within the operating system software or kernel itself to execute adversary-controlled code. A common goal for post-compromise exploitation of remote services is for lateral movement to enable access to a remote system.
Category: Lateral Movement
Technique: T1210 - Exploitation of Remote Services
Impact: C:3 / I:2 / A:1
Rule file: possible_remote_code_execution_using_printernightmare.yaml
Reference: https://attack.mitre.org/techniques/T1210/
Windows: Ransomware Recovery Inhibition (Shadow Copy / Backup Deletion)
Detects deletion of Volume Shadow Copies / backups and disabling of Windows recovery (vssadmin, wmic shadowcopy, wbadmin, bcdedit) - a near-universal ransomware precursor and almost never legitimate.
Category: Impact
Technique: T1490 - Inhibit System Recovery
Impact: C:1 / I:3 / A:3
Rule file: ransom_inhibit_system_recovery.yaml
Reference: https://attack.mitre.org/techniques/T1490/
Windows: Remote File Download via Desktopimgdownldr Utility
Identifies the desktopimgdownldr utility being used to download a remote file. An adversary may use desktopimgdownldr to download arbitrary files as an alternative to certutil.
Category: Command and Control
Technique: T1105 - Ingress Tool Transfer
Impact: C:2 / I:3 / A:1
Rule file: remote_file_copy_desktopimgdownldr.yaml
Reference: https://attack.mitre.org/tactics/TA0011/
Reference: https://attack.mitre.org/techniques/T1105/
Windows: Scheduled Task Created with Suspicious Action
A scheduled task was created whose action runs a command interpreter,
encoded PowerShell, or a living-off-the-land binary commonly abused for
download-and-execute (mshta, certutil, regsvr32, rundll32, bitsadmin,
wscript/cscript) -- or that points at a Temp/AppData path. Scheduled
tasks are one of the most common persistence mechanisms; a legitimate
task's action is almost always a signed, fixed application path, not an
interpreter invocation.
Category: Persistence
Technique: T1053.005 - Scheduled Task/Job: Scheduled Task
Impact: C:2 / I:3 / A:1
Rule file: scheduled_task_suspicious_action.yaml
Windows: Suspicious PowerShell (Encoded / Download Cradle / AMSI Bypass)
Detects high-risk PowerShell script-block content: download cradles, encoded/hidden execution, reflective loading and AMSI bypass markers. Matches the 4104 script-block text (not the -EncodedCommand flag, to avoid benign false positives). v1.3.0: excludes the benign injected PSBreakpoint/AMSI "sentinel" instrumentation harness (markers: sentinelbreakpoints, \windows\sentinel\, Po_wer_Spl_oit_Indicators) that otherwise false-positives on the literal "AmsiInitFailed" token it emits on every PowerShell session. The exclusion is per-script-block, so a real payload executed through the harness is a separate 4104 event and still fires.
Category: Execution
Technique: T1059.001 - Command and Scripting Interpreter: PowerShell
Impact: C:2 / I:3 / A:2
Rule file: powershell_obfuscated_command.yaml
Windows: Suspicious Print Spooler SPL File Created
Detects attempts to exploit privilege escalation vulnerabilities related to the Print Spooler service including CVE-2020-1048 and CVE-2020-1337.
Category: Privilege Escalation
Technique: T1068 - Exploitation for Privilege Escalation
Impact: C:1 / I:3 / A:2
Rule file: printspooler_suspicious_spl_file.yaml
Reference: https://attack.mitre.org/tactics/TA0004/
Reference: https://attack.mitre.org/techniques/T1068/
Windows: Suspicious PrintSpooler Service Executable File Creation
Detects attempts to exploit privilege escalation vulnerabilities related to the Print Spooler service. For more information refer to the following CVE's - CVE-2020-1048, CVE-2020-1337 and CVE-2020-1300 and verify that the impacted system is patched
Category: Privilege Escalation
Technique: T1068 - Exploitation for Privilege Escalation
Impact: C:2 / I:3 / A:1
Rule file: printspooler_service_suspicious_file.yaml
Reference: https://attack.mitre.org/tactics/TA0004/
Reference: https://attack.mitre.org/techniques/T1068/
Windows: Suspicious Scheduled Task Created
Detects creation of a scheduled task whose action runs a script interpreter, encoded command, or a user/temp/remote path - a common persistence and lateral-execution technique.
Category: Persistence
Technique: T1053.005 - Scheduled Task/Job: Scheduled Task
Impact: C:2 / I:2 / A:1
Rule file: suspicious_scheduled_task_created.yaml
Windows: Suspicious Service Installation
A service was installed with an executable path outside the normal system
locations, or one that runs a command interpreter / encoded PowerShell
directly -- the pattern PsExec, Cobalt Strike and similar lateral-movement
and persistence tooling use (T1569.002 for one-shot remote execution via a
short-lived service; T1543.003 when the service is left behind for
persistence). A legitimate installer's service almost always points at its
own Program Files binary, not System32\cmd.exe or a Temp/AppData path.
Category: Execution
Technique: T1569.002 - System Services: Service Execution
Impact: C:2 / I:3 / A:2
Rule file: windows_suspicious_service_installation.yaml
Windows: SysKey Registry Subkey Access
A handle was requested or an operation performed against one of the four
LSA registry subkeys (JD, GBG, Skew1, Data) that together encode the
SysKey/bootkey used to encrypt the local SAM database. Reading these is
the first step credential-dumping tools (Mimikatz lsadump::sam,
secretsdump.py) take to decrypt SAM offline -- normal administration
never touches these specific subkeys. Narrower and higher-fidelity than
generic SAM hive access (sam_database_access.yaml), which this
complements rather than duplicates.
Category: Discovery
Technique: T1012 - Query Registry
Impact: C:3 / I:1 / A:1
Rule file: syskey_registry_access.yaml
Reference: https://attack.mitre.org/techniques/T1012/
Reference: https://threathunterplaybook.com/hunts/windows/190625-RegKeyAccessSyskey/notebook.html
Windows: UAC Bypass Attempt via Privileged IFileOperation COM Interface
Identifies attempts to bypass User Account Control (UAC) via DLL side-loading. Attackers may attempt to bypass UAC to stealthily execute code with elevated permissions.
Category: Privilege Escalation
Technique: T1548.002 - Abuse Elevation Control Mechanism: Bypass User Account Control
Impact: C:1 / I:3 / A:2
Rule file: uac_bypass_dll_sideloading.yaml
Reference: https://attack.mitre.org/tactics/TA0004/
Windows: Unauthorized RMM Tool Service Installation
A service was installed for a remote-monitoring-and-management (RMM) tool
-- Mesh Agent or TacticalRMM -- that this environment doesn't officially
deploy. These are legitimate admin tools, but ransomware affiliates and
initial-access brokers (e.g. the Emotet-to-ransomware chain this
technique is documented from) commonly abuse them for persistent,
encrypted C2 that blends in with normal remote-support traffic, since
installing one gives full remote control without needing a custom
implant.
Category: Command and Control
Technique: T1219.002 - Remote Access Software: Remote Desktop Software
Impact: C:2 / I:2 / A:1
Rule file: windows_rmm_tool_service_installation.yaml
Reference: https://thedfirreport.com/2022/11/28/emotet-strikes-again-lnk-file-leads-to-domain-wide-ransomware/
Windows: Unusual File Modification by dns.exe
Identifies an unexpected file being modified by dns.exe, the process responsible for Windows DNS Server services, which may indicate activity related to remote code execution or other forms of exploitation.
Category: Lateral Movement
Technique: T1210 - Exploitation of Remote Services
Impact: C:1 / I:3 / A:2
Rule file: unusual_dns_service_file_writes.yaml
Reference: https://attack.mitre.org/tactics/TA0001/
Reference: https://attack.mitre.org/techniques/T1133/
Windows: Unusual Process Network Connection
Identifies network activity from unexpected system applications. This may indicate adversarial activity as these applications are often leveraged by adversaries to execute code and evade detection.
Category: Defense Evasion
Technique: Trusted Developer Utilities Proxy Execution
Impact: C:3 / I:3 / A:2
Rule file: unusual_process_network_connection.yaml
Reference: https://attack.mitre.org/tactics/TA0005/
Reference: https://attack.mitre.org/techniques/T1127/
Windows: User logged using Remote Desktop Connection from loopback address, possible exploit over reverse tunneling using stolen credentials
Adversaries may use Valid Accounts to log into a computer using the Remote Desktop Protocol (RDP). The adversary may then perform actions as the logged-on user.
Category: Credential Access
Technique: T1021.001 - Remote Services: Remote Desktop Protocol
Impact: C:3 / I:2 / A:1
Rule file: possible_exploit_over_reverse_tunneling_using_stolen_credentials.yaml
Windows: Windows Firewall Turned Off
Windows Defender Firewall was switched off for one or more network profiles (event 2003, or event 2082 on newer Windows versions). Microsoft's firewall protocol specification defines setting type 1 as the firewall on/off switch, with value 0 meaning off; while it is off, the computer blocks no network traffic for that profile. The Profiles field names the profile: 1 domain, 2 private, 4 public.
The rule reads the numeric setting instead of the translated text, so it works in every Windows language. Changes by the same program and account on the same computer are grouped under one alert, so a management tool that switches the firewall repeatedly produces one alert per computer.
Requires collection of the "Microsoft-Windows-Windows Firewall With Advanced Security/Firewall" channel.
Category: Administrative Awareness
Technique: Host firewall disabled
Impact: C:1 / I:2 / A:0
Rule file: awareness_windows_firewall_disabled.yaml