Detection rules › Sigma
Sigma rules: 01
Assembly Loading Via CL_LoadAssembly.ps1
#Detects calls to "LoadAssemblyFromPath" or "LoadAssemblyFromNS" that are part of the "CL_LoadAssembly.ps1" script. This can be abused to load different assemblies and bypass App locker controls.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Assembly Loading Via CL_LoadAssembly.ps1
id: c57872c7-614f-4d7f-a40d-b78c8df2d30d
status: test
description: Detects calls to "LoadAssemblyFromPath" or "LoadAssemblyFromNS" that are part of the "CL_LoadAssembly.ps1" script. This can be abused to load different assemblies and bypass App locker controls.
references:
- https://bohops.com/2018/01/07/executing-commands-and-bypassing-applocker-with-powershell-diagnostic-scripts/
- https://lolbas-project.github.io/lolbas/Scripts/CL_LoadAssembly/
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2022-05-21
modified: 2023-08-17
tags:
- attack.stealth
- attack.t1216
logsource:
category: process_creation
product: windows
detection:
selection:
# Note: As this function is usually called from within powershell, classical process creation even would not catch it. This will only catch inline calls via "-Command" or "-ScriptBlock" flags for example.
CommandLine|contains:
- 'LoadAssemblyFromPath '
- 'LoadAssemblyFromNS '
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|contains:
- 'LoadAssemblyFromPath '
- 'LoadAssemblyFromNS '
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Azure Kubernetes Sensitive Role Access
#Identifies when ClusterRoles/Roles are being modified or deleted.
Known False Positives
- ClusterRoles/Roles being modified and deleted may be performed by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment.
- ClusterRoles/Roles modification from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Impact |
Rule Body
title: Azure Kubernetes Sensitive Role Access
id: 818fee0c-e0ec-4e45-824e-83e4817b0887
status: test
description: Identifies when ClusterRoles/Roles are being modified or deleted.
references:
- https://learn.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftkubernetes
- https://www.microsoft.com/security/blog/2021/03/23/secure-containerized-environments-with-updated-threat-matrix-for-kubernetes/
- https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/
- https://medium.com/mitre-engenuity/att-ck-for-containers-now-available-4c2359654bf1
author: Austin Songer @austinsonger
date: 2021-08-07
modified: 2022-08-23
tags:
- attack.impact
- attack.t1485
- attack.t1496
- attack.t1489
logsource:
product: azure
service: activitylogs
detection:
selection:
operationName:
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLES/WRITE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLES/DELETE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLES/BIND/ACTION
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLES/ESCALATE/ACTION
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLES/WRITE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLES/DELETE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLES/BIND/ACTION
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLES/ESCALATE/ACTION
condition: selection
falsepositives:
- ClusterRoles/Roles being modified and deleted may be performed by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment.
- ClusterRoles/Roles modification from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule.
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
operationName:
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLES/WRITE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLES/DELETE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLES/BIND/ACTION
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLES/ESCALATE/ACTION
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLES/WRITE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLES/DELETE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLES/BIND/ACTION
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLES/ESCALATE/ACTION
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
operationName | eq |
| field:"operationName" kind:eq |
Computer account manipulation for delegation (RBCD)
#Detects scenarios where an attacker manipulate a computer object and updates its attribute 'msDS-AllowedToActOnBehalfOfOtherIdentity' to enable a resource to impersonate and authenticate any domain user.
Known False Positives
- Computer account set for delegation by a sysadmin
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 5136: A directory service object was modified. |
Rule Body
title: Computer account manipulation for delegation (RBCD)
description: Detects scenarios where an attacker manipulate a computer object and updates its attribute 'msDS-AllowedToActOnBehalfOfOtherIdentity' to enable a resource to impersonate and authenticate any domain user.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0003-Persistence/T1098.xxx-Account%20manipulation
- https://www.microsoft.com/en-us/security/blog/2022/05/25/detecting-and-preventing-privilege-escalation-attacks-leveraging-kerberos-relaying-krbrelayup/
- https://book.hacktricks.xyz/windows-hardening/active-directory-methodology/resource-based-constrained-delegation
- https://pentestlab.blog/2021/10/18/resource-based-constrained-delegation/
- https://www.ired.team/offensive-security-experiments/active-directory-kerberos-abuse/resource-based-constrained-delegation-ad-computer-object-take-over-and-privilged-code-execution
- https://blog.netwrix.com/2022/09/29/resource-based-constrained-delegation-abuse/
- https://www.fortalicesolutions.com/posts/hunting-resource-based-constrained-delegation-in-active-directory
requirements: auditing SACL ("Write all properties") must be placed on the "domain" partition.
tags:
- attack.persistence
- attack.t1098 # account manipulation
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: security
detection:
selection:
EventID: 5136
DSType: '%%14676' # value added
ObjectClass: computer
AttributeLDAPDisplayName: 'msDS-AllowedToActOnBehalfOfOtherIdentity'
condition: selection
falsepositives:
- Computer account set for delegation by a sysadmin
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventID: 5136
DSType: '%%14676'
ObjectClass: computer
AttributeLDAPDisplayName: 'msDS-AllowedToActOnBehalfOfOtherIdentity'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
AttributeLDAPDisplayName | eq |
| field:"AttributeLDAPDisplayName" kind:eq value:"msDS-AllowedToActOnBehalfOfOtherIdentity" |
DSType | eq |
| field:"DSType" kind:eq value:"%%14676" |
ObjectClass | eq |
| field:"ObjectClass" kind:eq value:"computer" |
Container With A hostPath Mount Created
#Detects creation of a container with a hostPath mount. A hostPath volume mounts a directory or a file from the node to the container. Attackers who have permissions to create a new pod in the cluster may create one with a writable hostPath volume and chroot to escape to the underlying node.
Known False Positives
- The DaemonSet controller creates pods with hostPath volumes within the kube-system namespace.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Kubernetes | create-pods: create pods |
Rules Detecting the Same Action
These rules filter on the same operation.
- Azure AKS Attempted User Exec into Pod (Elastic)
- Creation Of Pod In System Namespace (Sigma)
- Direct Interactive Kubernetes API Request by Unusual Utilities (Elastic)
- Exec into Pod (Panther)
- GCP Break-glass Container Workload Deployed (Sigma)
- GCP K8s Pod Attached To Node Host Network (Panther)
- GCP K8S Pod Create Or Modify Host Path Volume Mount (Panther)
- GCP K8s Pod Using Host PID Namespace (Panther)
Rule Body
title: Container With A hostPath Mount Created
id: 402b955c-8fe0-4a8c-b635-622b4ac5f902
status: test
description: |
Detects creation of a container with a hostPath mount.
A hostPath volume mounts a directory or a file from the node to the container.
Attackers who have permissions to create a new pod in the cluster may create one with a writable hostPath volume and chroot to escape to the underlying node.
references:
- https://microsoft.github.io/Threat-Matrix-for-Kubernetes/techniques/Writable%20hostPath%20mount/
- https://blog.appsecco.com/kubernetes-namespace-breakout-using-insecure-host-path-volume-part-1-b382f2a6e216
author: Leo Tsaousis (@laripping)
date: 2024-03-26
tags:
- attack.t1611
- attack.privilege-escalation
logsource:
category: application
product: kubernetes
service: audit
detection:
selection:
verb: 'create'
objectRef.resource: 'pods'
hostPath: '*' # Note: Add the "exists" when it's implemented in SigmaHQ/Aurora
condition: selection
falsepositives:
- The DaemonSet controller creates pods with hostPath volumes within the kube-system namespace.
level: low
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
verb: 'create'
objectRef.resource: 'pods'
hostPath: '*'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
hostPath | wildcard |
| field:"hostPath" kind:wildcard value:"*" |
objectRef.resource | eq |
| field:"objectRef.resource" kind:eq value:"pods" |
verb | eq |
| field:"verb" kind:eq value:"create" |
CredUI.DLL Loaded By Uncommon Process
#Detects loading of "credui.dll" and related DLLs by an uncommon process. Attackers might leverage this DLL for potential use of "CredUIPromptForCredentials" or "CredUnPackAuthenticationBufferW".
Known False Positives
- Other legitimate processes loading those DLLs in your environment.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access | |
| Collection |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 7: Image loaded |
Rule Body
title: CredUI.DLL Loaded By Uncommon Process
id: 9ae01559-cf7e-4f8e-8e14-4c290a1b4784
status: test
description: Detects loading of "credui.dll" and related DLLs by an uncommon process. Attackers might leverage this DLL for potential use of "CredUIPromptForCredentials" or "CredUnPackAuthenticationBufferW".
references:
- https://securitydatasets.com/notebooks/atomic/windows/credential_access/SDWIN-201020013208.html
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1056.002/T1056.002.md#atomic-test-2---powershell---prompt-user-for-password
- https://learn.microsoft.com/en-us/windows/win32/api/wincred/nf-wincred-creduipromptforcredentialsa
- https://github.com/S12cybersecurity/RDPCredentialStealer
author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research)
date: 2020-10-20
modified: 2026-06-29
tags:
- attack.credential-access
- attack.collection
- attack.t1056.002
logsource:
category: image_load
product: windows
detection:
selection:
- ImageLoaded|endswith:
- '\credui.dll'
- '\wincredui.dll'
- OriginalFileName:
- 'credui.dll'
- 'wincredui.dll'
filter_main_generic:
Image|startswith:
- 'C:\Program Files (x86)\'
- 'C:\Program Files\'
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\SystemApps\'
filter_main_full:
Image:
- 'C:\Windows\explorer.exe'
- 'C:\Windows\ImmersiveControlPanel\SystemSettings.exe'
- 'C:\Windows\regedit.exe' # This FP is triggered for example when choosing the "Connect Network Registry" from the menu
filter_optional_opera:
Image|endswith: '\opera_autoupdate.exe'
filter_optional_process_explorer:
Image|endswith:
- '\procexp64.exe'
- '\procexp64a.exe'
- '\procexp.exe'
filter_optional_teams:
Image|startswith: 'C:\Users\'
Image|contains: '\AppData\Local\Microsoft\Teams\'
Image|endswith: '\Teams.exe'
filter_optional_onedrive:
Image|startswith: 'C:\Users\'
Image|contains: '\AppData\Local\Microsoft\OneDrive\'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- Other legitimate processes loading those DLLs in your environment.
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_* and not 1 of filter_optional_*Stage 1: selection
selection:
- ImageLoaded|endswith:
- '\credui.dll'
- '\wincredui.dll'
- OriginalFileName:
- 'credui.dll'
- 'wincredui.dll'
Stage 2: not filter_main_*
filter_main_generic:
Image|startswith:
- 'C:\Program Files (x86)\'
- 'C:\Program Files\'
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\SystemApps\'
filter_main_full:
Image:
- 'C:\Windows\explorer.exe'
- 'C:\Windows\ImmersiveControlPanel\SystemSettings.exe'
- 'C:\Windows\regedit.exe'
Stage 3: not filter_optional_*
filter_optional_opera:
Image|endswith: '\opera_autoupdate.exe'
filter_optional_process_explorer:
Image|endswith:
- '\procexp64.exe'
- '\procexp64a.exe'
- '\procexp.exe'
filter_optional_teams:
Image|startswith: 'C:\Users\'
Image|contains: '\AppData\Local\Microsoft\Teams\'
Image|endswith: '\Teams.exe'
filter_optional_onedrive:
Image|startswith: 'C:\Users\'
Image|contains: '\AppData\Local\Microsoft\OneDrive\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImageLoaded | ends_with |
| field:"ImageLoaded" kind:ends_with |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq |
Exclusions
The rule actively suppresses these predicates.
Failed Code Integrity Checks
#Detects code integrity failures such as missing page hashes or corrupted drivers due unauthorized modification. This could be a sign of tampered binaries.
Known False Positives
- Disk device errors
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
Rule Body
title: Failed Code Integrity Checks
id: 470ec5fa-7b4e-4071-b200-4c753100f49b
status: stable
description: |
Detects code integrity failures such as missing page hashes or corrupted drivers due unauthorized modification. This could be a sign of tampered binaries.
references:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5038
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-6281
author: Thomas Patzke
date: 2019-12-03
modified: 2025-01-19
tags:
- attack.stealth
- attack.t1027.001
logsource:
product: windows
service: security
detection:
selection:
EventID:
- 5038
- 6281
filter_optional_crowdstrike:
param1|contains:
- '\CSFalconServiceUninstallTool_'
- '\Program Files\CrowdStrike\'
- '\System32\drivers\CrowdStrike\'
- '\Windows\System32\ScriptControl64_'
filter_optional_sophos:
param1|contains: '\Program Files\Sophos\'
condition: selection and not 1 of filter_optional_*
falsepositives:
- Disk device errors
level: informational
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_optional_*Stage 1: selection
selection:
EventID:
- 5038
- 6281
Stage 2: not filter_optional_*
filter_optional_crowdstrike:
param1|contains:
- '\CSFalconServiceUninstallTool_'
- '\Program Files\CrowdStrike\'
- '\System32\drivers\CrowdStrike\'
- '\Windows\System32\ScriptControl64_'
filter_optional_sophos:
param1|contains: '\Program Files\Sophos\'
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
param1 | match | \CSFalconServiceUninstallTool_ | excludes:param1 field:"param1" value:"\CSFalconServiceUninstallTool_" |
param1 | match | \Program Files\CrowdStrike\ | excludes:param1 field:"param1" value:"\Program Files\CrowdStrike\" |
param1 | match | \Program Files\Sophos\ | excludes:param1 field:"param1" value:"\Program Files\Sophos\" |
param1 | match | \System32\drivers\CrowdStrike\ | excludes:param1 field:"param1" value:"\System32\drivers\CrowdStrike\" |
param1 | match | \Windows\System32\ScriptControl64_ | excludes:param1 field:"param1" value:"\Windows\System32\ScriptControl64_" |
Github High Risk Configuration Disabled
#Detects when a user disables a critical security feature for an organization.
Known False Positives
- Approved administrator/owner activities.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment | |
| Credential Access |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- GitHub Enterprise Disable 2FA Requirement (Splunk)
- GitHub OAuth Application Access Restrictions Disabled (YARA-L)
- GitHub Org Authentication Method Changed (Panther)
- GitHub Organizations Disable 2FA Requirement (Splunk)
- GitHub Security Change, includes GitHub Advanced Security (Panther)
- GitHub Two Factor Auth Disable (Kusto)
- GitHub Two-Factor Authentication Requirement Disabled (YARA-L)
- NRT GitHub Two Factor Auth Disable (Kusto)
Rule Body
title: Github High Risk Configuration Disabled
id: 8622c92d-c00e-463c-b09d-fd06166f6794
status: test
description: Detects when a user disables a critical security feature for an organization.
references:
- https://docs.github.com/en/organizations/managing-oauth-access-to-your-organizations-data/disabling-oauth-app-access-restrictions-for-your-organization
- https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#dependabot_alerts-category-actions
- https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository
- https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
author: Muhammad Faisal (@faisalusuf)
date: 2023-01-29
modified: 2024-07-22
tags:
- attack.credential-access
- attack.persistence
- attack.defense-impairment
- attack.t1556
logsource:
product: github
service: audit
definition: 'Requirements: The audit log streaming feature must be enabled to be able to receive such logs. You can enable following the documentation here: https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise#setting-up-audit-log-streaming'
detection:
selection:
action:
- 'business_advanced_security.disabled_for_new_repos'
- 'business_advanced_security.disabled_for_new_user_namespace_repos'
- 'business_advanced_security.disabled'
- 'business_advanced_security.user_namespace_repos_disabled'
- 'org.advanced_security_disabled_for_new_repos'
- 'org.advanced_security_disabled_on_all_repos'
- 'org.advanced_security_policy_selected_member_disabled'
- 'org.disable_oauth_app_restrictions'
- 'org.disable_two_factor_requirement'
- 'repo.advanced_security_disabled'
condition: selection
falsepositives:
- Approved administrator/owner activities.
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
action:
- 'business_advanced_security.disabled_for_new_repos'
- 'business_advanced_security.disabled_for_new_user_namespace_repos'
- 'business_advanced_security.disabled'
- 'business_advanced_security.user_namespace_repos_disabled'
- 'org.advanced_security_disabled_for_new_repos'
- 'org.advanced_security_disabled_on_all_repos'
- 'org.advanced_security_policy_selected_member_disabled'
- 'org.disable_oauth_app_restrictions'
- 'org.disable_two_factor_requirement'
- 'repo.advanced_security_disabled'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
action | eq |
| field:"action" kind:eq |
Invoke-Obfuscation RUNDLL LAUNCHER - PowerShell
#Detects Obfuscated Powershell via RUNDLL LAUNCHER
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: Invoke-Obfuscation RUNDLL LAUNCHER - PowerShell
id: e6cb92b4-b470-4eb8-8a9d-d63e8583aae0
status: test
description: Detects Obfuscated Powershell via RUNDLL LAUNCHER
references:
- https://github.com/SigmaHQ/sigma/issues/1009 # (Task 23)
author: Timur Zinniatullin, oscd.community
date: 2020-10-18
modified: 2022-11-29
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection_4104:
ScriptBlockText|contains|all:
- 'rundll32.exe'
- 'shell32.dll'
- 'shellexec_rundll'
- 'powershell'
condition: selection_4104
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selection_4104Stage 1: selection_4104
selection_4104:
ScriptBlockText|contains|all:
- 'rundll32.exe'
- 'shell32.dll'
- 'shellexec_rundll'
- 'powershell'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
Invoke-Obfuscation Via Stdin
#Detects Obfuscated Powershell via Stdin in Scripts
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Invoke-Obfuscation Via Stdin
id: 9c14c9fa-1a63-4a64-8e57-d19280559490
status: test
description: Detects Obfuscated Powershell via Stdin in Scripts
references:
- https://github.com/SigmaHQ/sigma/issues/1009 # (Task28)
author: Nikita Nazarov, oscd.community
date: 2020-10-12
modified: 2026-03-16
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|re: '(?i)(?:set).*&&\s?set.*(?:environment|invoke|\$\{?input).*&&.*"'
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|re: '(?i)(?:set).*&&\s?set.*(?:environment|invoke|\$\{?input).*&&.*"'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | regex_match |
| field:"CommandLine" kind:regex_match |
Lace Tempest PowerShell Launcher
#Detects a PowerShell script used by Lace Tempest APT to launch their malware loader by exploiting CVE-2023-47246 as reported by SysAid Team
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: Lace Tempest PowerShell Launcher
id: 37dc5463-f7e3-4f61-ad76-ba59cd02a651
status: test
description: |
Detects a PowerShell script used by Lace Tempest APT to launch their malware loader by exploiting CVE-2023-47246 as reported by SysAid Team
references:
- https://www.sysaid.com/blog/service-desk/on-premise-software-security-vulnerability-notification
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-11-09
tags:
- attack.execution
- attack.t1059.001
- detection.emerging-threats
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains|all:
- '\SysAidServer\tomcat\webapps'
- 'Starting user.exe'
- '\usersfiles\user.exe'
- 'Remove-Item -Force "$wapps'
- '(Sophos).'
condition: selection
falsepositives:
- Unlikely
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ScriptBlockText|contains|all:
- '\SysAidServer\tomcat\webapps'
- 'Starting user.exe'
- '\usersfiles\user.exe'
- 'Remove-Item -Force "$wapps'
- '(Sophos).'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
macOS ESF Launch Persistence Creation
#Detect creation of launchd persistence files in LaunchAgents/LaunchDaemons.
Known False Positives
- legitimate software installations
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Rule Body
title: macOS ESF Launch Persistence Creation
id: a2f1e7f3-2a5b-4d17-8a9f-60a6b7b0a09f
status: experimental
description: Detect creation of launchd persistence files in LaunchAgents/LaunchDaemons.
author: Eric Brown - Nebulock, Inc.
date: 2025-10-29
logsource:
product: macos
service: endpointsecurity
level: high
detection:
selection_evt:
esf.event_type: 13
event.action: create
selection_path:
TargetFilename|startswith:
- /Library/LaunchDaemons/
- /Library/LaunchAgents/
- /System/Library/LaunchDaemons/
selection_ext:
TargetFilename|endswith: .plist
condition: selection_evt and selection_path and selection_ext
falsepositives:
- legitimate software installations
modified: 2025/01/15
Stages and Predicates
Stage 0: condition
selection_evt and selection_path and selection_extStage 1: selection_evt
selection_evt:
esf.event_type: 13
event.action: create
Stage 2: selection_path
selection_path:
TargetFilename|startswith:
- /Library/LaunchDaemons/
- /Library/LaunchAgents/
- /System/Library/LaunchDaemons/
Stage 3: selection_ext
selection_ext:
TargetFilename|endswith: .plist
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with value:".plist" |
TargetFilename | starts_with |
| field:"TargetFilename" kind:starts_with |
esf.event_type | eq |
| field:"esf.event_type" kind:eq value:"13" |
event.action | eq |
| field:"EventType" kind:eq value:"create" |
Malicious PowerShell Keywords
#Detects keywords from well-known PowerShell exploitation frameworks
Known False Positives
- Depending on the scripts, this rule might require some initial tuning to fit the environment
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: Malicious PowerShell Keywords
id: f62176f3-8128-4faa-bf6c-83261322e5eb
status: test
description: Detects keywords from well-known PowerShell exploitation frameworks
references:
- https://adsecurity.org/?p=2921
author: Sean Metcalf (source), Florian Roth (Nextron Systems)
date: 2017-03-05
modified: 2023-06-20
tags:
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains:
- 'AdjustTokenPrivileges'
- 'IMAGE_NT_OPTIONAL_HDR64_MAGIC'
# - 'LSA_UNICODE_STRING'
- 'Metasploit'
- 'Microsoft.Win32.UnsafeNativeMethods'
- 'Mimikatz'
- 'MiniDumpWriteDump'
- 'PAGE_EXECUTE_READ'
- 'ReadProcessMemory.Invoke'
- 'SE_PRIVILEGE_ENABLED'
- 'SECURITY_DELEGATION'
- 'TOKEN_ADJUST_PRIVILEGES'
- 'TOKEN_ALL_ACCESS'
- 'TOKEN_ASSIGN_PRIMARY'
- 'TOKEN_DUPLICATE'
- 'TOKEN_ELEVATION'
- 'TOKEN_IMPERSONATE'
- 'TOKEN_INFORMATION_CLASS'
- 'TOKEN_PRIVILEGES'
- 'TOKEN_QUERY'
condition: selection
falsepositives:
- Depending on the scripts, this rule might require some initial tuning to fit the environment
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ScriptBlockText|contains:
- 'AdjustTokenPrivileges'
- 'IMAGE_NT_OPTIONAL_HDR64_MAGIC'
- 'Metasploit'
- 'Microsoft.Win32.UnsafeNativeMethods'
- 'Mimikatz'
- 'MiniDumpWriteDump'
- 'PAGE_EXECUTE_READ'
- 'ReadProcessMemory.Invoke'
- 'SE_PRIVILEGE_ENABLED'
- 'SECURITY_DELEGATION'
- 'TOKEN_ADJUST_PRIVILEGES'
- 'TOKEN_ALL_ACCESS'
- 'TOKEN_ASSIGN_PRIMARY'
- 'TOKEN_DUPLICATE'
- 'TOKEN_ELEVATION'
- 'TOKEN_IMPERSONATE'
- 'TOKEN_INFORMATION_CLASS'
- 'TOKEN_PRIVILEGES'
- 'TOKEN_QUERY'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
Okta Network Zone Deactivated or Deleted
#Detects when an Network Zone is Deactivated or Deleted.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Impact | No specific technique |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- Attempt to Deactivate an Okta Network Zone (Elastic)
- Attempt to Delete an Okta Network Zone (Elastic)
Rule Body
title: Okta Network Zone Deactivated or Deleted
id: 9f308120-69ed-4506-abde-ac6da81f4310
status: test
description: Detects when an Network Zone is Deactivated or Deleted.
references:
- https://developer.okta.com/docs/reference/api/system-log/
- https://developer.okta.com/docs/reference/api/event-types/
author: Austin Songer @austinsonger
date: 2021-09-12
modified: 2026-04-27
tags:
- attack.impact
logsource:
product: okta
service: okta
detection:
selection:
eventType:
- zone.deactivate
- zone.delete
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
eventType:
- zone.deactivate
- zone.delete
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
eventType | eq |
| field:"eventType" kind:eq |
Oracle WebLogic Exploit CVE-2021-2109
#Detects the exploitation of the WebLogic server vulnerability described in CVE-2021-2109
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule Body
title: Oracle WebLogic Exploit CVE-2021-2109
id: 687f6504-7f44-4549-91fc-f07bab065821
status: test
description: Detects the exploitation of the WebLogic server vulnerability described in CVE-2021-2109
references:
- https://twitter.com/pyn3rd/status/1351696768065409026
- https://mp.weixin.qq.com/s/wX9TMXl1KVWwB_k6EZOklw
author: Bhabesh Raj
date: 2021-01-20
modified: 2023-01-02
tags:
- attack.t1190
- attack.initial-access
- cve.2021-2109
- detection.emerging-threats
logsource:
category: webserver
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains|all:
- 'com.bea.console.handles.JndiBindingHandle'
- 'ldap://'
- 'AdminServer'
condition: selection
falsepositives:
- Unknown
level: critical
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
cs-method: 'GET'
cs-uri-query|contains|all:
- 'com.bea.console.handles.JndiBindingHandle'
- 'ldap://'
- 'AdminServer'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
cs-method | eq |
| field:"cs-method" kind:eq value:"GET" |
cs-uri-query | match |
| field:"cs-uri-query" kind:match |
Port Forwarding Activity Via SSH.EXE
#Detects port forwarding activity via SSH.exe
Known False Positives
- Administrative activity using a remote port forwarding to a local port
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | |
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Port Forwarding Activity Via SSH.EXE
id: 327f48c1-a6db-4eb8-875a-f6981f1b0183
status: test
description: Detects port forwarding activity via SSH.exe
references:
- https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-10-12
modified: 2024-03-05
tags:
- attack.command-and-control
- attack.lateral-movement
- attack.t1572
- attack.t1021.001
- attack.t1021.004
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\ssh.exe'
CommandLine|contains|windash: ' -R '
condition: selection
falsepositives:
- Administrative activity using a remote port forwarding to a local port
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image|endswith: '\ssh.exe'
CommandLine|contains|windash: ' -R '
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with value:"\ssh.exe" |
Potential Manage-bde.wsf Abuse To Proxy Execution
#Detects potential abuse of the "manage-bde.wsf" script as a LOLBIN to proxy execution
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Potential Manage-bde.wsf Abuse To Proxy Execution
id: c363385c-f75d-4753-a108-c1a8e28bdbda
status: test
description: Detects potential abuse of the "manage-bde.wsf" script as a LOLBIN to proxy execution
references:
- https://lolbas-project.github.io/lolbas/Scripts/Manage-bde/
- https://gist.github.com/bohops/735edb7494fe1bd1010d67823842b712
- https://twitter.com/bohops/status/980659399495741441
- https://twitter.com/JohnLaTwC/status/1223292479270600706
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1216/T1216.md
author: oscd.community, Natalia Shornikova, Nasreddine Bencherchali (Nextron Systems)
date: 2020-10-13
modified: 2023-02-03
tags:
- attack.stealth
- attack.t1216
logsource:
category: process_creation
product: windows
detection:
selection_wscript_img:
- Image|endswith: '\wscript.exe'
- OriginalFileName: 'wscript.exe'
selection_wscript_cli:
CommandLine|contains: 'manage-bde.wsf'
selection_parent:
ParentImage|endswith:
- '\cscript.exe'
- '\wscript.exe'
ParentCommandLine|contains: 'manage-bde.wsf'
selection_filter_cmd:
Image|endswith: '\cmd.exe'
condition: all of selection_wscript_* or (selection_parent and not selection_filter_cmd)
falsepositives:
- Unlikely
level: high
Stages and Predicates
Stage 0: condition
all of selection_wscript_* or (selection_parent and not selection_filter_cmd)Stage 1: selection_wscript_img
selection_wscript_img:
- Image|endswith: '\wscript.exe'
- OriginalFileName: 'wscript.exe'
Stage 2: selection_wscript_cli
selection_wscript_cli:
CommandLine|contains: 'manage-bde.wsf'
Stage 3: selection_parent
selection_parent:
ParentImage|endswith:
- '\cscript.exe'
- '\wscript.exe'
ParentCommandLine|contains: 'manage-bde.wsf'
Stage 4: not selection_filter_cmd
selection_filter_cmd:
Image|endswith: '\cmd.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:"manage-bde.wsf" |
Image | ends_with |
| field:"Image" kind:ends_with value:"\wscript.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"wscript.exe" |
ParentCommandLine | match |
| field:"ParentCommandLine" kind:match value:"manage-bde.wsf" |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Image | ends_with | \cmd.exe | excludes:Image field:"Image" value:"\cmd.exe" |
Potential Persistence Via Custom Protocol Handler
#Detects potential persistence activity via the registering of a new custom protocole handlers. While legitimate applications register protocole handlers often times during installation. And attacker can abuse this by setting a custom handler to be used as a persistence mechanism.
Known False Positives
- Many legitimate applications can register a new custom protocol handler. Additional filters needs to applied according to your environment.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: Potential Persistence Via Custom Protocol Handler
id: fdbf0b9d-0182-4c43-893b-a1eaab92d085
status: test
description: Detects potential persistence activity via the registering of a new custom protocole handlers. While legitimate applications register protocole handlers often times during installation. And attacker can abuse this by setting a custom handler to be used as a persistence mechanism.
references:
- https://ladydebug.com/blog/2019/06/21/custom-protocol-handler-cph/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-05-30
modified: 2023-05-12
tags:
- attack.persistence
- attack.defense-impairment
- attack.t1112
logsource:
category: registry_set
product: windows
detection:
selection:
TargetObject|startswith: 'HKCR\'
Details|startswith: 'URL:'
filter_main_ms_trusted:
Details|startswith: 'URL:ms-' # Microsoft Protocols usually start with "ms-"
filter_main_generic_locations:
Image|startswith: # Add more folders to avoid FP
- 'C:\Program Files (x86)'
- 'C:\Program Files\'
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
# Uncomment This section to add specific Protocol Handler names that are know
# filter_specific:
# Details: 'URL:'
condition: selection and not 1 of filter_main_*
falsepositives:
- Many legitimate applications can register a new custom protocol handler. Additional filters needs to applied according to your environment.
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
TargetObject|startswith: 'HKCR\'
Details|startswith: 'URL:'
Stage 2: not filter_main_*
filter_main_ms_trusted:
Details|startswith: 'URL:ms-'
filter_main_generic_locations:
Image|startswith:
- 'C:\Program Files (x86)'
- 'C:\Program Files\'
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Details | starts_with |
| field:"Details" kind:starts_with value:"URL:" |
TargetObject | starts_with |
| field:"TargetObject" kind:starts_with value:"HKCR\" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Details | starts_with | URL:ms- | excludes:Details field:"Details" value:"URL:ms-" |
Image | starts_with | C:\Program Files (x86) | excludes:Image field:"Image" value:"C:\Program Files (x86)" |
Image | starts_with | C:\Program Files\ | excludes:Image field:"Image" value:"C:\Program Files\" |
Image | starts_with | C:\Windows\SysWOW64\ | excludes:Image field:"Image" value:"C:\Windows\SysWOW64\" |
Image | starts_with | C:\Windows\System32\ | excludes:Image field:"Image" value:"C:\Windows\System32\" |
Primary Refresh Token Access Attempt
#Indicates access attempt to the PRT resource which can be used to move laterally into an organization or perform credential theft
Known False Positives
- This detection is low-volume and is seen infrequently in most organizations. When this detection appears it's high risk, and users should be remediated.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Rule Body
title: Primary Refresh Token Access Attempt
id: a84fc3b1-c9ce-4125-8e74-bdcdb24021f1
status: test
description: Indicates access attempt to the PRT resource which can be used to move laterally into an organization or perform credential theft
references:
- https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks#possible-attempt-to-access-primary-refresh-token-prt
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-user-accounts#unusual-sign-ins
author: Mark Morowczynski '@markmorow', Gloria Lee, '@gleeiamglo'
date: 2023-09-07
tags:
- attack.t1528
- attack.credential-access
logsource:
product: azure
service: riskdetection
detection:
selection:
riskEventType: 'attemptedPrtAccess'
condition: selection
falsepositives:
- This detection is low-volume and is seen infrequently in most organizations. When this detection appears it's high risk, and users should be remediated.
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
riskEventType: 'attemptedPrtAccess'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
riskEventType | eq |
| field:"azure_ad::risk_event_types" kind:eq value:"attemptedPrtAccess" |
Process Creation Using Sysnative Folder
#Detects process creation events that use the Sysnative folder (common for CobaltStrike spawns)
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Process Creation Using Sysnative Folder
id: 3c1b5fb0-c72f-45ba-abd1-4d4c353144ab
status: test
description: Detects process creation events that use the Sysnative folder (common for CobaltStrike spawns)
references:
- https://thedfirreport.com/2021/08/29/cobalt-strike-a-defenders-guide/
author: Max Altgelt (Nextron Systems)
date: 2022-08-23
modified: 2025-10-08
tags:
- attack.privilege-escalation
- attack.stealth
- attack.t1055
logsource:
category: process_creation
product: windows
detection:
selection:
- CommandLine|contains: ':\Windows\Sysnative\'
- Image|contains: ':\Windows\Sysnative\'
filter_main_ngen:
Image|contains:
- 'C:\Windows\Microsoft.NET\Framework64\v'
- 'C:\Windows\Microsoft.NET\Framework\v'
- 'C:\Windows\Microsoft.NET\FrameworkArm\v'
- 'C:\Windows\Microsoft.NET\FrameworkArm64\v'
Image|endswith: '\ngen.exe'
CommandLine|contains: 'install'
filter_optional_xampp:
CommandLine|contains|all:
- '"C:\Windows\sysnative\cmd.exe"'
- '\xampp\'
- '\catalina_start.bat'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_* and not 1 of filter_optional_*Stage 1: selection
selection:
- CommandLine|contains: ':\Windows\Sysnative\'
- Image|contains: ':\Windows\Sysnative\'
Stage 2: not filter_main_ngen
filter_main_ngen:
Image|contains:
- 'C:\Windows\Microsoft.NET\Framework64\v'
- 'C:\Windows\Microsoft.NET\Framework\v'
- 'C:\Windows\Microsoft.NET\FrameworkArm\v'
- 'C:\Windows\Microsoft.NET\FrameworkArm64\v'
Image|endswith: '\ngen.exe'
CommandLine|contains: 'install'
Stage 3: not filter_optional_xampp
filter_optional_xampp:
CommandLine|contains|all:
- '"C:\Windows\sysnative\cmd.exe"'
- '\xampp\'
- '\catalina_start.bat'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:":\Windows\Sysnative\" |
Image | match |
| field:"Image" kind:match value:":\Windows\Sysnative\" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Image | match | C:\Windows\Microsoft.NET\Framework64\v | excludes:Image field:"Image" value:"C:\Windows\Microsoft.NET\Framework64\v" |
Image | match | C:\Windows\Microsoft.NET\FrameworkArm64\v | excludes:Image field:"Image" value:"C:\Windows\Microsoft.NET\FrameworkArm64\v" |
Image | match | C:\Windows\Microsoft.NET\FrameworkArm\v | excludes:Image field:"Image" value:"C:\Windows\Microsoft.NET\FrameworkArm\v" |
Image | match | C:\Windows\Microsoft.NET\Framework\v | excludes:Image field:"Image" value:"C:\Windows\Microsoft.NET\Framework\v" |
CommandLine | match | install | excludes:CommandLine field:"CommandLine" value:"install" |
Image | ends_with | \ngen.exe | excludes:Image field:"Image" value:"\ngen.exe" |
CommandLine | match | "C:\Windows\sysnative\cmd.exe" | excludes:CommandLine |
CommandLine | match | \catalina_start.bat | excludes:CommandLine field:"CommandLine" value:"\catalina_start.bat" |
CommandLine | match | \xampp\ | excludes:CommandLine field:"CommandLine" value:"\xampp\" |
PUA - Radmin Viewer Utility Execution
#Detects the execution of Radmin which can be abused by an adversary to remotely control Windows machines
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Lateral Movement |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: PUA - Radmin Viewer Utility Execution
id: 5817e76f-4804-41e6-8f1d-5fa0b3ecae2d
status: test
description: Detects the execution of Radmin which can be abused by an adversary to remotely control Windows machines
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1072/T1072.md
- https://www.radmin.fr/
author: frack113
date: 2022-01-22
modified: 2023-12-11
tags:
- attack.execution
- attack.lateral-movement
- attack.t1072
logsource:
category: process_creation
product: windows
detection:
selection:
- Description: 'Radmin Viewer'
- Product: 'Radmin Viewer'
- OriginalFileName: 'Radmin.exe'
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
- Description: 'Radmin Viewer'
- Product: 'Radmin Viewer'
- OriginalFileName: 'Radmin.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Description | eq |
| field:"Description" kind:eq value:"Radmin Viewer" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"Radmin.exe" |
Product | eq |
| field:"Product" kind:eq value:"Radmin Viewer" |
PUA - RunXCmd Execution
#Detects the use of the RunXCmd tool to execute commands with System or TrustedInstaller accounts
Known False Positives
- Legitimate use by administrators
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: PUA - RunXCmd Execution
id: 93199800-b52a-4dec-b762-75212c196542
status: test
description: Detects the use of the RunXCmd tool to execute commands with System or TrustedInstaller accounts
references:
- https://www.d7xtech.com/free-software/runx/
- https://www.winhelponline.com/blog/run-program-as-system-localsystem-account-windows/
author: Florian Roth (Nextron Systems)
date: 2022-01-24
modified: 2023-02-14
tags:
- attack.execution
- attack.t1569.002
- attack.s0029
logsource:
category: process_creation
product: windows
detection:
selection_account:
CommandLine|contains:
- ' /account=system '
- ' /account=ti '
selection_exec:
CommandLine|contains: '/exec='
condition: all of selection_*
falsepositives:
- Legitimate use by administrators
level: high
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_account
selection_account:
CommandLine|contains:
- ' /account=system '
- ' /account=ti '
Stage 2: selection_exec
selection_exec:
CommandLine|contains: '/exec='
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
REGISTER_APP.VBS Proxy Execution
#Detects the use of a Microsoft signed script 'REGISTER_APP.VBS' to register a VSS/VDS Provider as a COM+ application.
Known False Positives
- Legitimate usage of the script. Always investigate what's being registered to confirm if it's benign
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: REGISTER_APP.VBS Proxy Execution
id: 1c8774a0-44d4-4db0-91f8-e792359c70bd
status: test
description: Detects the use of a Microsoft signed script 'REGISTER_APP.VBS' to register a VSS/VDS Provider as a COM+ application.
references:
- https://twitter.com/sblmsrsn/status/1456613494783160325?s=20
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-19
tags:
- attack.stealth
- attack.t1218
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains|all:
- '\register_app.vbs'
- '-register'
condition: selection
falsepositives:
- Legitimate usage of the script. Always investigate what's being registered to confirm if it's benign
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|contains|all:
- '\register_app.vbs'
- '-register'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Registry Persistence via Explorer Run Key
#Detects a possible persistence mechanism using RUN key for Windows Explorer and pointing to a suspicious folder
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: Registry Persistence via Explorer Run Key
id: b7916c2a-fa2f-4795-9477-32b731f70f11
status: test
description: Detects a possible persistence mechanism using RUN key for Windows Explorer and pointing to a suspicious folder
references:
- https://researchcenter.paloaltonetworks.com/2018/07/unit42-upatre-continues-evolve-new-anti-analysis-techniques/
author: Florian Roth (Nextron Systems), oscd.community
date: 2018-07-18
modified: 2023-12-11
tags:
- attack.privilege-escalation
- attack.persistence
- attack.t1547.001
logsource:
category: registry_set
product: windows
detection:
selection:
TargetObject|endswith: '\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run'
Details|contains:
- ':\$Recycle.bin\'
- ':\ProgramData\'
- ':\Temp\'
- ':\Users\Default\'
- ':\Users\Public\'
- ':\Windows\Temp\'
- '\AppData\Local\Temp\'
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetObject|endswith: '\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run'
Details|contains:
- ':\$Recycle.bin\'
- ':\ProgramData\'
- ':\Temp\'
- ':\Users\Default\'
- ':\Users\Public\'
- ':\Windows\Temp\'
- '\AppData\Local\Temp\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Details | match |
| field:"Details" kind:match |
TargetObject | ends_with |
| field:"TargetObject" kind:ends_with value:"\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" |
Remote Access Tool - Team Viewer Session Started On MacOS Host
#Detects the command line executed when TeamViewer starts a session started by a remote host. Once a connection has been started, an investigator can verify the connection details by viewing the "incoming_connections.txt" log file in the TeamViewer folder.
Known False Positives
- Legitimate usage of TeamViewer
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence |
Telemetry Coverage
Rule Body
title: Remote Access Tool - Team Viewer Session Started On MacOS Host
id: f459ccb4-9805-41ea-b5b2-55e279e2424a
related:
- id: ab70c354-d9ac-4e11-bbb6-ec8e3b153357
type: similar
- id: 1f6b8cd4-3e60-47cc-b282-5aa1cbc9182d
type: similar
status: test
description: |
Detects the command line executed when TeamViewer starts a session started by a remote host.
Once a connection has been started, an investigator can verify the connection details by viewing the "incoming_connections.txt" log file in the TeamViewer folder.
references:
- Internal Research
author: Josh Nickels, Qi Nan
date: 2024-03-11
tags:
- attack.persistence
- attack.initial-access
- attack.t1133
logsource:
category: process_creation
product: macos
detection:
selection:
ParentImage|endswith: '/TeamViewer_Service'
Image|endswith: '/TeamViewer_Desktop'
CommandLine|endswith: '/TeamViewer_Desktop --IPCport 5939 --Module 1'
condition: selection
falsepositives:
- Legitimate usage of TeamViewer
level: low
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ParentImage|endswith: '/TeamViewer_Service'
Image|endswith: '/TeamViewer_Desktop'
CommandLine|endswith: '/TeamViewer_Desktop --IPCport 5939 --Module 1'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | ends_with |
| field:"CommandLine" kind:ends_with value:"/TeamViewer_Desktop --IPCport 5939 --Module 1" |
Image | ends_with |
| field:"Image" kind:ends_with value:"/TeamViewer_Desktop" |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with value:"/TeamViewer_Service" |
Remote Schedule Task Lateral Movement via ATSvc
#Detects remote RPC calls to create or execute a scheduled task via ATSvc
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| RPCFW | Event ID 3: An RPC server function was called. |
Rule Body
title: Remote Schedule Task Lateral Movement via ATSvc
id: 0fcd1c79-4eeb-4746-aba9-1b458f7a79cb
status: test
description: Detects remote RPC calls to create or execute a scheduled task via ATSvc
references:
- https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-tsch/d1058a28-7e02-4948-8b8d-4a347fa64931
- https://github.com/jsecurity101/MSRPC-to-ATTACK/blob/ddd4608fe8684fcf2fcf9b48c5f0b3c28097f8a3/documents/MS-TSCH.md
- https://github.com/zeronetworks/rpcfirewall
- https://zeronetworks.com/blog/stopping-lateral-movement-via-the-rpc-firewall/
author: Sagie Dulce, Dekel Paz
date: 2022-01-01
tags:
- attack.privilege-escalation
- attack.lateral-movement
- attack.execution
- attack.persistence
- attack.t1053
- attack.t1053.002
logsource:
product: rpc_firewall
category: application
definition: 'Requirements: install and apply the RPC Firewall to all processes with "audit:true action:block uuid:1ff70682-0a51-30e8-076d-740be8cee98b"'
detection:
selection:
EventLog: RPCFW
EventID: 3
InterfaceUuid: 1ff70682-0a51-30e8-076d-740be8cee98b
OpNum:
- 0
- 1
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventLog: RPCFW
EventID: 3
InterfaceUuid: 1ff70682-0a51-30e8-076d-740be8cee98b
OpNum:
- 0
- 1
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventLog | eq |
| field:"EventLog" kind:eq value:"RPCFW" |
InterfaceUuid | eq |
| field:"InterfaceUuid" kind:eq value:"1ff70682-0a51-30e8-076d-740be8cee98b" |
OpNum | eq |
| field:"OpNum" kind:eq |
Security Software Discovery - MacOs
#Detects usage of system utilities (only grep for now) to discover security software discovery
Known False Positives
- Legitimate activities
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
Rule Body
title: Security Software Discovery - MacOs
id: 0ed75b9c-c73b-424d-9e7d-496cd565fbe0
status: test
description: Detects usage of system utilities (only grep for now) to discover security software discovery
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1518.001/T1518.001.md
author: Daniil Yugoslavskiy, oscd.community
date: 2020-10-19
modified: 2022-11-27
tags:
- attack.discovery
- attack.t1518.001
logsource:
category: process_creation
product: macos
detection:
image:
Image: '/usr/bin/grep'
selection_cli_1:
CommandLine|contains:
- 'nessusd' # nessus vulnerability scanner
- 'santad' # google santa
- 'CbDefense' # carbon black
- 'falcond' # crowdstrike falcon
- 'td-agent' # fluentd log shipper
- 'packetbeat' # elastic network logger/shipper
- 'filebeat' # elastic log file shipper
- 'auditbeat' # elastic auditing agent/log shipper
- 'osqueryd' # facebook osquery
- 'BlockBlock' # Objective-See persistence locations watcher/blocker
- 'LuLu' # Objective-See firewall management utility
selection_cli_2: # Objective Development Software firewall management utility
CommandLine|contains|all:
- 'Little'
- 'Snitch'
condition: image and 1 of selection_cli_*
falsepositives:
- Legitimate activities
level: medium
Stages and Predicates
Stage 0: condition
image and 1 of selection_cli_*Stage 1: image
image:
Image: '/usr/bin/grep'
Stage 2: selection_cli_1
selection_cli_1:
CommandLine|contains:
- 'nessusd'
- 'santad'
- 'CbDefense'
- 'falcond'
- 'td-agent'
- 'packetbeat'
- 'filebeat'
- 'auditbeat'
- 'osqueryd'
- 'BlockBlock'
- 'LuLu'
Stage 3: selection_cli_2
selection_cli_2:
CommandLine|contains|all:
- 'Little'
- 'Snitch'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Image | eq |
| field:"Image" kind:eq value:"/usr/bin/grep" |
Sign-ins by Unknown Devices
#Monitor and alert for Sign-ins by unknown devices from non-Trusted locations.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- [Entra ID] Suspicious Continuous OAuth Token Usage (Kusto)
- Anomalous sign-in location by user account and authenticating application (Kusto)
- Anomalous Single Factor Signin (Kusto)
- Authentications of Privileged Accounts Outside of Expected Controls (Kusto)
- Azure Portal sign in from another Azure Tenant (Kusto)
- Azure Service Principal Sign-In Followed by Arc Cluster Credential Access (Elastic)
- Azure SignIn via Legacy Authentication Protocol (Panther)
- Cisco - firewall block but success logon to Microsoft Entra ID (Kusto)
Rule Body
title: Sign-ins by Unknown Devices
id: 4d136857-6a1a-432a-82fc-5dd497ee5e7c
status: test
description: Monitor and alert for Sign-ins by unknown devices from non-Trusted locations.
references:
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-devices#non-compliant-device-sign-in
author: Michael Epping, '@mepples21'
date: 2022-06-28
modified: 2022-10-05
tags:
- attack.privilege-escalation
- attack.persistence
- attack.initial-access
- attack.stealth
- attack.t1078.004
logsource:
product: azure
service: signinlogs
detection:
selection:
AuthenticationRequirement: singleFactorAuthentication
ResultType: 0
NetworkLocationDetails: '[]'
DeviceDetail.deviceId: ''
condition: selection
falsepositives:
- Unknown
level: low
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
AuthenticationRequirement: singleFactorAuthentication
ResultType: 0
NetworkLocationDetails: '[]'
DeviceDetail.deviceId: ''
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
AuthenticationRequirement | eq |
| field:"azure_ad::authentication_requirement" kind:eq value:"singleFactorAuthentication" |
NetworkLocationDetails | eq |
| field:"NetworkLocationDetails" kind:eq value:"[]" |
ResultType | eq |
| field:"ResultType" kind:eq value:"0" |
Suspicious Rundll32 Execution With Image Extension
#Detects the execution of Rundll32.exe with DLL files masquerading as image files
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Suspicious Rundll32 Execution With Image Extension
id: 4aa6040b-3f28-44e3-a769-9208e5feb5ec
related:
- id: 089fc3d2-71e8-4763-a8a5-c97fbb0a403e
type: similar
status: test
description: Detects the execution of Rundll32.exe with DLL files masquerading as image files
references:
- https://www.zscaler.com/blogs/security-research/onenote-growing-threat-malware-distribution
author: Hieu Tran
date: 2023-03-13
tags:
- attack.stealth
- attack.t1218.011
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\rundll32.exe'
- OriginalFileName: 'RUNDLL32.exe'
selection_cli:
CommandLine|contains:
- '.bmp'
- '.cr2'
- '.eps'
- '.gif'
- '.ico'
- '.jpeg'
- '.jpg'
- '.nef'
- '.orf'
- '.png'
- '.raw'
- '.sr2'
- '.tif'
- '.tiff'
condition: all of selection_*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Image|endswith: '\rundll32.exe'
- OriginalFileName: 'RUNDLL32.exe'
Stage 2: selection_cli
selection_cli:
CommandLine|contains:
- '.bmp'
- '.cr2'
- '.eps'
- '.gif'
- '.ico'
- '.jpeg'
- '.jpg'
- '.nef'
- '.orf'
- '.png'
- '.raw'
- '.sr2'
- '.tif'
- '.tiff'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with value:"\rundll32.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"RUNDLL32.exe" |
SyncAppvPublishingServer Bypass Powershell Restriction - PS Module
#Detects SyncAppvPublishingServer process execution which usually utilized by adversaries to bypass PowerShell execution restrictions.
Known False Positives
- App-V clients
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4103: Payload Context: ContextInfo User Data: UserData. |
Rule Body
title: SyncAppvPublishingServer Bypass Powershell Restriction - PS Module
id: fe5ce7eb-dad8-467c-84a9-31ec23bd644a
related:
- id: fde7929d-8beb-4a4c-b922-be9974671667
type: derived
- id: 9f7aa113-9da6-4a8d-907c-5f1a4b908299
type: derived
status: test
description: Detects SyncAppvPublishingServer process execution which usually utilized by adversaries to bypass PowerShell execution restrictions.
references:
- https://lolbas-project.github.io/lolbas/Binaries/Syncappvpublishingserver/
author: 'Ensar Şamil, @sblmsrsn, OSCD Community'
date: 2020-10-05
modified: 2022-12-02
tags:
- attack.stealth
- attack.t1218
logsource:
product: windows
category: ps_module
definition: 0ad03ef1-f21b-4a79-8ce8-e6900c54b65b
detection:
selection:
ContextInfo|contains: 'SyncAppvPublishingServer.exe'
condition: selection
falsepositives:
- App-V clients
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ContextInfo|contains: 'SyncAppvPublishingServer.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ContextInfo | match |
| field:"ContextInfo" kind:match value:"SyncAppvPublishingServer.exe" |
Tasks Folder Evasion
#The Tasks folder in system32 and syswow64 are globally writable paths. Adversaries can take advantage of this and load or influence any script hosts or ANY .NET Application in Tasks to load and execute a custom assembly into cscript, wscript, regsvr32, mshta, eventvwr
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Tasks Folder Evasion
id: cc4e02ba-9c06-48e2-b09e-2500cace9ae0
status: test
description: |
The Tasks folder in system32 and syswow64 are globally writable paths.
Adversaries can take advantage of this and load or influence any script hosts or ANY .NET Application
in Tasks to load and execute a custom assembly into cscript, wscript, regsvr32, mshta, eventvwr
references:
- https://twitter.com/subTee/status/1216465628946563073
- https://gist.github.com/am0nsec/8378da08f848424e4ab0cc5b317fdd26
author: Sreeman
date: 2020-01-13
modified: 2022-12-25
tags:
- attack.privilege-escalation
- attack.persistence
- attack.execution
- attack.stealth
- attack.t1574.001
logsource:
product: windows
category: process_creation
detection:
selection1:
CommandLine|contains:
- 'echo '
- 'copy '
- 'type '
- 'file createnew'
selection2:
CommandLine|contains:
- ' C:\Windows\System32\Tasks\'
- ' C:\Windows\SysWow64\Tasks\'
condition: all of selection*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
all of selection*Stage 1: selection1
selection1:
CommandLine|contains:
- 'echo '
- 'copy '
- 'type '
- 'file createnew'
Stage 2: selection2
selection2:
CommandLine|contains:
- ' C:\Windows\System32\Tasks\'
- ' C:\Windows\SysWow64\Tasks\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Unauthorized or Unexpected Enabling of Cross-Origin Authentication (CORS)
#Detects when cross-origin authentication (CORS) has been enabled for an application. Cross-origin authentication feature often targeted by threat actors to conduct credential stuffing attacks. Monitoring this change helps preemptively reduce the risk of this attack vector.
Known False Positives
- An exempted application has been configured to allow cross-origin authentication.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Rule Body
title: Unauthorized or Unexpected Enabling of Cross-Origin Authentication (CORS)
id: cd0b61a4-6917-4a9e-a86c-9b10d7792e24
status: experimental
description: |
Detects when cross-origin authentication (CORS) has been enabled for an application.
Cross-origin authentication feature often targeted by threat actors to conduct credential stuffing attacks.
Monitoring this change helps preemptively reduce the risk of this attack vector.
author: Okta
date: 2025-11-03
modified: 2025-11-03
references:
- https://sec.okta.com/articles/2024/05/detecting-cross-origin-authentication-credential-stuffing-attacks/
logsource:
product: auth0
detection:
selection:
data.type:
- sapi
filter_cors_attribute:
data.details.response.body.cross_origin_authentication:
- true
condition: selection and filter_cors_attribute
explanation: >
This rule monitors Management API (sapi) calls that successfully modify client configurations (sapi).
The detection focuses specifically on events where the cross_origin_authentication parameter is set to true.
The most effective detection is to alert on every instance where this setting is newly enabled
as the event itself represents a security posture change.
The accompanying Splunk query includes an option to monitor only the latest configuration for each application, which is useful for audit purposes.
Optionally, this query can be adjusted to exclude exempted applications, but it is not recommended.
splunk: |
index=auth0 data.tenant_name="{your-tenant-name}"
data.type = sapi data.description="Update a client" data.details.response.statusCode=200
| spath data.details.response.body.client_id output=affected_client_id
``` Allow list of exempted applications ```
```| where client_id IN ({exempted_applications_client_id})```
``` Return current/latest configurations for each application/client_id ```
| sort -_time, affected_client_id
| dedup affected_client_id
``` Alert when CORS is enabled for any of the monitored applications ```
| search data.details.response.body.cross_origin_authentication=true
``` Preparing output```
| rename data.details.response.body.cross_origin_authentication as is_cors_eanbled
| rename data.details.response.body.allowed_origins{} as cors_allowed_origins
| table _time, data.ip data.user_id affected_client_id is_cors_eanbled cors_allowed_origins
comments:
- The Splunk query above shall be tuned to reflect a valid tenant name,
and optionally a list of exempted applications, i.e. {exempted_applications_client_id}
tenant_logs: |
type: (sapi)
prevention:
- Do not allow cross-origin authentication for your applications.
When it is absolutely unavoidable, restrict the permitted origins, i.e. see cors_allowed_origins
- If a user password was compromised in a credential stuffing attack (scoa event), rotate immediately credentials for these users for precaution.
- Enforce your password policies (e.g., minimum 12 characters)
- Turn on respective attack protection features
- Long term solution is to avoid password-based authentication and favour stronger factors like passkeys
falsepositives:
- An exempted application has been configured to allow cross-origin authentication.
level: medium
tags:
- attack.defense-evasion
- attack.t1562
- attack.t1562.007
Stages and Predicates
Stage 0: condition
selection and filter_cors_attributeStage 1: selection
selection:
data.type:
- sapi
Stage 2: filter_cors_attribute
filter_cors_attribute:
data.details.response.body.cross_origin_authentication:
- true
Indicators
These rows show field, operator, and value matches.
WMI Persistence - Command Line Event Consumer
#Detects WMI command line event consumers
Known False Positives
- Unknown (data set is too small; further testing needed)
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 7: Image loaded |
Rule Body
title: WMI Persistence - Command Line Event Consumer
id: 05936ce2-ee05-4dae-9d03-9a391cf2d2c6
status: test
description: Detects WMI command line event consumers
references:
- https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/
author: Thomas Patzke
date: 2018-03-07
modified: 2021-11-27
tags:
- attack.privilege-escalation
- attack.t1546.003
- attack.persistence
logsource:
category: image_load
product: windows
detection:
selection:
Image: 'C:\Windows\System32\wbem\WmiPrvSE.exe'
ImageLoaded|endswith: '\wbemcons.dll'
condition: selection
falsepositives:
- Unknown (data set is too small; further testing needed)
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image: 'C:\Windows\System32\wbem\WmiPrvSE.exe'
ImageLoaded|endswith: '\wbemcons.dll'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | eq |
| field:"Image" kind:eq value:"C:\Windows\System32\wbem\WmiPrvSE.exe" |
ImageLoaded | ends_with |
| field:"ImageLoaded" kind:ends_with value:"\wbemcons.dll" |
Xwizard.EXE Execution From Non-Default Location
#Detects the execution of Xwizard tool from a non-default directory. When executed from a non-default directory, this utility can be abused in order to side load a custom version of "xwizards.dll".
Known False Positives
- Windows installed on non-C drive
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Xwizard.EXE Execution From Non-Default Location
id: 193d5ccd-6f59-40c6-b5b0-8e32d5ddd3d1
status: test
description: |
Detects the execution of Xwizard tool from a non-default directory.
When executed from a non-default directory, this utility can be abused in order to side load a custom version of "xwizards.dll".
references:
- https://lolbas-project.github.io/lolbas/Binaries/Xwizard/
- http://www.hexacorn.com/blog/2017/07/31/the-wizard-of-x-oppa-plugx-style/
author: Christian Burkard (Nextron Systems)
date: 2021-09-20
modified: 2024-08-15
tags:
- attack.privilege-escalation
- attack.persistence
- attack.execution
- attack.stealth
- attack.t1574.001
logsource:
category: process_creation
product: windows
detection:
selection:
- Image|endswith: '\xwizard.exe'
- OriginalFileName: 'xwizard.exe'
filter_main_legit_location:
Image|startswith:
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\WinSxS\'
condition: selection and not 1 of filter_main_*
falsepositives:
- Windows installed on non-C drive
level: high
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
- Image|endswith: '\xwizard.exe'
- OriginalFileName: 'xwizard.exe'
Stage 2: not filter_main_legit_location
filter_main_legit_location:
Image|startswith:
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\WinSxS\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with value:"\xwizard.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"xwizard.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Image | starts_with | C:\Windows\SysWOW64\ | excludes:Image field:"Image" value:"C:\Windows\SysWOW64\" |
Image | starts_with | C:\Windows\System32\ | excludes:Image field:"Image" value:"C:\Windows\System32\" |
Image | starts_with | C:\Windows\WinSxS\ | excludes:Image field:"Image" value:"C:\Windows\WinSxS\" |