Detection rules › Sigma
Sigma rules: 2t
Azure Kubernetes Service Account Modified or Deleted
#Identifies when a service account is modified or deleted.
Known False Positives
- Service account being modified or 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.
- Service account modified or deleted from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule.
MITRE ATT&CK Coverage
Rule Body
title: Azure Kubernetes Service Account Modified or Deleted
id: 12d027c3-b48c-4d9d-8bb6-a732200034b2
status: test
description: Identifies when a service account is 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.t1531
- attack.t1485
- attack.t1496
- attack.t1489
logsource:
product: azure
service: activitylogs
detection:
selection:
operationName:
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/SERVICEACCOUNTS/WRITE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/SERVICEACCOUNTS/DELETE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/SERVICEACCOUNTS/IMPERSONATE/ACTION
condition: selection
falsepositives:
- Service account being modified or 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.
- Service account modified or deleted 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/SERVICEACCOUNTS/WRITE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/SERVICEACCOUNTS/DELETE
- MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/SERVICEACCOUNTS/IMPERSONATE/ACTION
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
operationName | eq |
| field:"operationName" kind:eq |
BloodHound Collection Files
#Detects default file names outputted by the BloodHound collection tool SharpHound
Known False Positives
- Some false positives may arise in some environment and this may require some tuning. Add additional filters or reduce level depending on the level of noise
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Discovery |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: BloodHound Collection Files
id: 02773bed-83bf-469f-b7ff-e676e7d78bab
status: test
description: Detects default file names outputted by the BloodHound collection tool SharpHound
references:
- https://academy.hackthebox.com/course/preview/active-directory-bloodhound/bloodhound--data-collection
author: C.J. May
date: 2022-08-09
modified: 2026-02-19
tags:
- attack.discovery
- attack.t1087.001
- attack.t1087.002
- attack.t1482
- attack.t1069.001
- attack.t1069.002
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: file_event
detection:
selection:
TargetFilename|endswith:
- 'BloodHound.zip'
- '_computers.json'
- '_containers.json'
# - '_domains.json' # prone to false positives with ProbabilisticRevealTokenRegistry function in Google Chrome
- '_gpos.json'
- '_groups.json'
- '_ous.json'
- '_users.json'
filter_optional_ms_winapps:
Image|endswith: '\svchost.exe'
TargetFilename|startswith: 'C:\Program Files\WindowsApps\Microsoft.'
TargetFilename|endswith: '\pocket_containers.json'
condition: selection and not 1 of filter_optional_*
falsepositives:
- Some false positives may arise in some environment and this may require some tuning. Add additional filters or reduce level depending on the level of noise
level: high
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_optional_*Stage 1: selection
selection:
TargetFilename|endswith:
- 'BloodHound.zip'
- '_computers.json'
- '_containers.json'
- '_gpos.json'
- '_groups.json'
- '_ous.json'
- '_users.json'
Stage 2: not filter_optional_ms_winapps
filter_optional_ms_winapps:
Image|endswith: '\svchost.exe'
TargetFilename|startswith: 'C:\Program Files\WindowsApps\Microsoft.'
TargetFilename|endswith: '\pocket_containers.json'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Image | ends_with | \svchost.exe | excludes:Image field:"Image" value:"\svchost.exe" |
TargetFilename | ends_with | \pocket_containers.json | excludes:TargetFilename field:"TargetFilename" value:"\pocket_containers.json" |
TargetFilename | starts_with | C:\Program Files\WindowsApps\Microsoft. | excludes:TargetFilename field:"TargetFilename" value:"C:\Program Files\WindowsApps\Microsoft." |
Connection to Suspicious XPC Service
#Detects connections to XPC services with suspicious or generic names that may indicate malicious IPC
Known False Positives
- Development and testing services
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
Rule Body
title: Connection to Suspicious XPC Service
id: d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f6a
status: experimental
description: Detects connections to XPC services with suspicious or generic names
that may indicate malicious IPC
references:
- https://attack.mitre.org/techniques/T1559/
- https://wojciechregula.blog/post/learn-xpc-exploitation-part-1-broken-cryptography/
author: Eric Brown - Nebulock, Inc.
date: 2025/10/29
tags:
- attack.execution
- attack.t1559
logsource:
product: macos
service: endpointsecurity
category: xpc_connection
detection:
selection:
esf.event_type: 65
event.action: xpc_connect
XpcServiceName|contains:
- backdoor
- rootkit
- shell
- payload
- exploit
- .temp.
- .test.
condition: selection
falsepositives:
- Development and testing services
level: high
modified: 2025/01/15
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
esf.event_type: 65
event.action: xpc_connect
XpcServiceName|contains:
- backdoor
- rootkit
- shell
- payload
- exploit
- .temp.
- .test.
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
XpcServiceName | match |
| field:"XpcServiceName" kind:match |
esf.event_type | eq |
| field:"esf.event_type" kind:eq value:"65" |
event.action | eq |
| field:"EventType" kind:eq value:"xpc_connect" |
Eventlog Cleared
#One of the Windows Eventlogs has been cleared. e.g. caused by "wevtutil cl" command execution
Known False Positives
- Rollout of log collection agents (the setup routine often includes a reset of the local Eventlog)
- System provisioning (system reset before the golden image creation)
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Eventlog | Event ID 104: The LogFileCleared.Channel log file was cleared. |
Rule Body
title: Eventlog Cleared
id: a62b37e0-45d3-48d9-a517-90c1a1b0186b
related:
- id: f2f01843-e7b8-4f95-a35a-d23584476423
type: obsolete
- id: d99b79d2-0a6f-4f46-ad8b-260b6e17f982
type: derived
- id: 100ef69e-3327-481c-8e5c-6d80d9507556
type: derived
status: test
description: One of the Windows Eventlogs has been cleared. e.g. caused by "wevtutil cl" command execution
references:
- https://twitter.com/deviouspolack/status/832535435960209408
- https://www.hybrid-analysis.com/sample/027cc450ef5f8c5f653329641ec1fed91f694e0d229928963b30f6b0d7d3a745?environmentId=100
author: Florian Roth (Nextron Systems)
date: 2017-01-10
modified: 2023-11-15
tags:
- attack.defense-impairment
- attack.t1685.005
- car.2016-04-002
logsource:
product: windows
service: system
detection:
selection:
EventID: 104
Provider_Name: 'Microsoft-Windows-Eventlog'
filter_main_covered:
# The channels below are already covered by the rule 100ef69e-3327-481c-8e5c-6d80d9507556
Channel:
- 'Microsoft-Windows-PowerShell/Operational'
- 'Microsoft-Windows-Sysmon/Operational'
- 'PowerShellCore/Operational'
- 'Security'
- 'System'
- 'Windows PowerShell'
condition: selection and not 1 of filter_main_*
falsepositives:
- Rollout of log collection agents (the setup routine often includes a reset of the local Eventlog)
- System provisioning (system reset before the golden image creation)
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
EventID: 104
Provider_Name: 'Microsoft-Windows-Eventlog'
Stage 2: not filter_main_covered
filter_main_covered:
Channel:
- 'Microsoft-Windows-PowerShell/Operational'
- 'Microsoft-Windows-Sysmon/Operational'
- 'PowerShellCore/Operational'
- 'Security'
- 'System'
- 'Windows PowerShell'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Provider_Name | eq |
| field:"Provider_Name" kind:eq value:"Microsoft-Windows-Eventlog" |
External Remote RDP Logon from Public IP
#Detects successful logon from public IP address via RDP. This can indicate a publicly-exposed RDP port.
Known False Positives
- Legitimate or intentional inbound connections from public IP addresses on the RDP port.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth | |
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4624: An account was successfully logged on. |
Rule Body
title: External Remote RDP Logon from Public IP
id: 259a9cdf-c4dd-4fa2-b243-2269e5ab18a2
related:
- id: 78d5cab4-557e-454f-9fb9-a222bd0d5edc
type: derived
status: test
description: Detects successful logon from public IP address via RDP. This can indicate a publicly-exposed RDP port.
references:
- https://www.inversecos.com/2020/04/successful-4624-anonymous-logons-to.html
- https://twitter.com/Purp1eW0lf/status/1616144561965002752
author: Micah Babinski (@micahbabinski), Zach Mathis (@yamatosecurity)
date: 2023-01-19
modified: 2024-03-11
tags:
- attack.privilege-escalation
- attack.persistence
- attack.initial-access
- attack.credential-access
- attack.stealth
- attack.t1133
- attack.t1078
- attack.t1110
logsource:
product: windows
service: security
detection:
selection:
EventID: 4624
LogonType: 10
filter_main_local_ranges:
IpAddress|cidr:
- '::1/128' # IPv6 loopback
- '10.0.0.0/8'
- '127.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '169.254.0.0/16'
- 'fc00::/7' # IPv6 private addresses
- 'fe80::/10' # IPv6 link-local addresses
filter_main_empty:
IpAddress: '-'
condition: selection and not 1 of filter_main_*
falsepositives:
- Legitimate or intentional inbound connections from public IP addresses on the RDP port.
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
EventID: 4624
LogonType: 10
Stage 2: not filter_main_*
filter_main_local_ranges:
IpAddress|cidr:
- '::1/128'
- '10.0.0.0/8'
- '127.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '169.254.0.0/16'
- 'fc00::/7'
- 'fe80::/10'
filter_main_empty:
IpAddress: '-'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
LogonType | eq |
| field:"LogonType" kind:eq value:"10" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
IpAddress | cidr_match | 10.0.0.0/8 | excludes:IpAddress field:"IpAddress" value:"10.0.0.0/8" |
IpAddress | cidr_match | 127.0.0.0/8 | excludes:IpAddress field:"IpAddress" value:"127.0.0.0/8" |
IpAddress | cidr_match | 169.254.0.0/16 | excludes:IpAddress field:"IpAddress" value:"169.254.0.0/16" |
IpAddress | cidr_match | 172.16.0.0/12 | excludes:IpAddress field:"IpAddress" value:"172.16.0.0/12" |
IpAddress | cidr_match | 192.168.0.0/16 | excludes:IpAddress field:"IpAddress" value:"192.168.0.0/16" |
IpAddress | cidr_match | ::1/128 | excludes:IpAddress field:"IpAddress" value:"::1/128" |
IpAddress | cidr_match | fc00::/7 | excludes:IpAddress field:"IpAddress" value:"fc00::/7" |
IpAddress | cidr_match | fe80::/10 | excludes:IpAddress field:"IpAddress" value:"fe80::/10" |
IpAddress | eq | - | excludes:IpAddress field:"IpAddress" value:"-" |
External Remote SMB Logon from Public IP
#Detects successful logon from public IP address via SMB. This can indicate a publicly-exposed SMB port.
Known False Positives
- Legitimate or intentional inbound connections from public IP addresses on the SMB port.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth | |
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4624: An account was successfully logged on. |
Rule Body
title: External Remote SMB Logon from Public IP
id: 78d5cab4-557e-454f-9fb9-a222bd0d5edc
related:
- id: 259a9cdf-c4dd-4fa2-b243-2269e5ab18a2
type: derived
status: test
description: Detects successful logon from public IP address via SMB. This can indicate a publicly-exposed SMB port.
references:
- https://www.inversecos.com/2020/04/successful-4624-anonymous-logons-to.html
- https://twitter.com/Purp1eW0lf/status/1616144561965002752
author: Micah Babinski (@micahbabinski), Zach Mathis (@yamatosecurity)
date: 2023-01-19
modified: 2024-03-11
tags:
- attack.privilege-escalation
- attack.persistence
- attack.initial-access
- attack.credential-access
- attack.stealth
- attack.t1133
- attack.t1078
- attack.t1110
logsource:
product: windows
service: security
detection:
selection:
EventID: 4624
LogonType: 3
filter_main_local_ranges:
IpAddress|cidr:
- '::1/128' # IPv6 loopback
- '10.0.0.0/8'
- '127.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '169.254.0.0/16'
- 'fc00::/7' # IPv6 private addresses
- 'fe80::/10' # IPv6 link-local addresses
filter_main_empty:
IpAddress: '-'
condition: selection and not 1 of filter_main_*
falsepositives:
- Legitimate or intentional inbound connections from public IP addresses on the SMB port.
level: high
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
EventID: 4624
LogonType: 3
Stage 2: not filter_main_*
filter_main_local_ranges:
IpAddress|cidr:
- '::1/128'
- '10.0.0.0/8'
- '127.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '169.254.0.0/16'
- 'fc00::/7'
- 'fe80::/10'
filter_main_empty:
IpAddress: '-'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
LogonType | eq |
| field:"LogonType" kind:eq value:"3" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
IpAddress | cidr_match | 10.0.0.0/8 | excludes:IpAddress field:"IpAddress" value:"10.0.0.0/8" |
IpAddress | cidr_match | 127.0.0.0/8 | excludes:IpAddress field:"IpAddress" value:"127.0.0.0/8" |
IpAddress | cidr_match | 169.254.0.0/16 | excludes:IpAddress field:"IpAddress" value:"169.254.0.0/16" |
IpAddress | cidr_match | 172.16.0.0/12 | excludes:IpAddress field:"IpAddress" value:"172.16.0.0/12" |
IpAddress | cidr_match | 192.168.0.0/16 | excludes:IpAddress field:"IpAddress" value:"192.168.0.0/16" |
IpAddress | cidr_match | ::1/128 | excludes:IpAddress field:"IpAddress" value:"::1/128" |
IpAddress | cidr_match | fc00::/7 | excludes:IpAddress field:"IpAddress" value:"fc00::/7" |
IpAddress | cidr_match | fe80::/10 | excludes:IpAddress field:"IpAddress" value:"fe80::/10" |
IpAddress | eq | - | excludes:IpAddress field:"IpAddress" value:"-" |
Function Call From Undocumented COM Interface EditionUpgradeManager
#Detects function calls from the EditionUpgradeManager COM interface. Which is an interface that is not used by standard executables.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 10: ProcessAccess |
Rule Body
title: Function Call From Undocumented COM Interface EditionUpgradeManager
id: fb3722e4-1a06-46b6-b772-253e2e7db933
status: test
description: Detects function calls from the EditionUpgradeManager COM interface. Which is an interface that is not used by standard executables.
references:
- https://www.snip2code.com/Snippet/4397378/UAC-bypass-using-EditionUpgradeManager-C/
- https://gist.github.com/hfiref0x/de9c83966623236f5ebf8d9ae2407611
author: oscd.community, Dmitry Uchakin
date: 2020-10-07
modified: 2023-11-30
tags:
- attack.privilege-escalation
- attack.t1548.002
logsource:
category: process_access
product: windows
detection:
selection:
CallTrace|contains: 'editionupgrademanagerobj.dll'
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CallTrace|contains: 'editionupgrademanagerobj.dll'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CallTrace | match |
| field:"CallTrace" kind:match value:"editionupgrademanagerobj.dll" |
HackTool - Hydra Password Bruteforce Execution
#Detects command line parameters used by Hydra password guessing hack tool
Known False Positives
- Software that uses the caret encased keywords PASS and USER in its command line
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
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: HackTool - Hydra Password Bruteforce Execution
id: aaafa146-074c-11eb-adc1-0242ac120002
status: test
description: Detects command line parameters used by Hydra password guessing hack tool
references:
- https://github.com/vanhauser-thc/thc-hydra
author: Vasiliy Burov
date: 2020-10-05
modified: 2023-02-04
tags:
- attack.credential-access
- attack.t1110
- attack.t1110.001
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains|all:
- '-u '
- '-p '
CommandLine|contains:
- '^USER^'
- '^PASS^'
condition: selection
falsepositives:
- Software that uses the caret encased keywords PASS and USER in its command line
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|contains|all:
- '-u '
- '-p '
CommandLine|contains:
- '^USER^'
- '^PASS^'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
IFM detected - ESENT (installation from media)
#Detects scenarios where an attacker attempts to create an IFM image (usually used for deploying domain controllers to reduce replication traffic) for dumping credentials.
Known False Positives
- Administrator creating a IFM image
- Backup program or script
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| ESENT | Event ID 325 |
| ESENT | Event ID 326 |
| ESENT | Event ID 327 |
Rule Body
title: IFM detected - ESENT (installation from media)
description: Detects scenarios where an attacker attempts to create an IFM image (usually used for deploying domain controllers to reduce replication traffic) for dumping credentials.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0006-Credential%20Access/T1003-Credential%20dumping
- https://adsecurity.org/?p=2398
- https://www.ired.team/offensive-security/credential-access-and-credential-dumping/ntds.dit-enumeration
tags:
- attack.credential_dumping
- attack.t1003.003
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: application # provider: ESENT
detection:
selection:
EventID:
- 325 # The database engine created a new database
- 326 # The database engine attached a new database
- 327 # The database engine detached a database
EventData|contains:
- '\ntds.dit'
filter:
- '<normal backup path>'
condition: selection and not filter
falsepositives:
- Administrator creating a IFM image
- Backup program or script
level: high
Stages and Predicates
Stage 0: condition
selection and not filterStage 1: selection
selection:
EventID:
- 325
- 326
- 327
EventData|contains:
- '\ntds.dit'
Stage 2: not filter
filter:
- '<normal backup path>'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventData | match |
| field:"EventData" kind:match value:"\ntds.dit" |
Legitimate Application Dropped Script
#Detects LOLBINs and applications that should not legitimately drop script files to disk. This may indicate malware staging or abuse of a trusted binary for script-based code execution.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: Legitimate Application Dropped Script
id: 7d604714-e071-49ff-8726-edeb95a70679
status: test
description: |
Detects LOLBINs and applications that should not legitimately drop script files to disk.
This may indicate malware staging or abuse of a trusted binary for script-based code execution.
references:
- https://github.com/Neo23x0/sysmon-config/blob/3f808d9c022c507aae21a9346afba4a59dd533b9/sysmonconfig-export-block.xml#L1326
- https://dmpdump.github.io/posts/TelegramRat/
- https://www.virustotal.com/gui/file/a0d5b30578acd1df9139e7a8a4bfc659dc2cf48f4dc0c5804b70890adeb9fa21/behavior
author: frack113, Florian Roth (Nextron Systems)
date: 2022-08-21
modified: 2026-05-11
tags:
- attack.stealth
- attack.t1218
logsource:
product: windows
category: file_event
detection:
selection:
Image|endswith:
# Microsoft Office Programs Dropping Executables / Rest of the apps are covered in: c7a74c80-ba5a-486e-9974-ab9e682bc5e4
- \eqnedt32.exe
- \wordpad.exe
- \wordview.exe
# LOLBINs that can be used to download executables
- \certutil.exe
- \certoc.exe
- \CertReq.exe
# - \bitsadmin.exe (depends on the environment; comment in if you're sure that bitsadmin doesn't do that in your env)
- \Desktopimgdownldr.exe
- \esentutl.exe
# - \expand.exe
- '\mshta.exe'
# Executables that should never drop an executable to disk (but may after a previous process injection or if it's malware that uses a legitimate name)
- '\AcroRd32.exe'
- '\RdrCEF.exe'
- '\hh.exe'
- '\finger.exe'
TargetFilename|endswith:
- '.bat'
- '.chm'
- '.csproj'
- '.hta'
- '.js'
- '.jse'
- '.proj'
- '.ps1'
- '.py'
- '.scf'
- '.vbe'
- '.vbs'
- '.wsf'
- '.wsh'
filter_main_mshta:
Image|endswith: '\mshta.exe'
TargetFilename|endswith: '.hta'
condition: selection and not 1 of filter_main_*
falsepositives:
- Unknown
level: high
regression_tests_path: regression_data/rules/windows/file/file_event/file_event_win_susp_legitimate_app_dropping_script/info.yml
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
Image|endswith:
- \eqnedt32.exe
- \wordpad.exe
- \wordview.exe
- \certutil.exe
- \certoc.exe
- \CertReq.exe
- \Desktopimgdownldr.exe
- \esentutl.exe
- '\mshta.exe'
- '\AcroRd32.exe'
- '\RdrCEF.exe'
- '\hh.exe'
- '\finger.exe'
TargetFilename|endswith:
- '.bat'
- '.chm'
- '.csproj'
- '.hta'
- '.js'
- '.jse'
- '.proj'
- '.ps1'
- '.py'
- '.scf'
- '.vbe'
- '.vbs'
- '.wsf'
- '.wsh'
Stage 2: not filter_main_mshta
filter_main_mshta:
Image|endswith: '\mshta.exe'
TargetFilename|endswith: '.hta'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with |
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Image | ends_with | \mshta.exe | excludes:Image field:"Image" value:"\mshta.exe" |
TargetFilename | ends_with | .hta | excludes:TargetFilename field:"TargetFilename" value:".hta" |
Non-privileged Usage of Reg or Powershell
#Search for usage of reg or Powershell by non-privileged users to modify service configuration in registry
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment |
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: Non-privileged Usage of Reg or Powershell
id: 8f02c935-effe-45b3-8fc9-ef8696a9e41d
status: test
description: Search for usage of reg or Powershell by non-privileged users to modify service configuration in registry
references:
- https://image.slidesharecdn.com/kheirkhabarovoffzonefinal-181117201458/95/hunting-for-privilege-escalation-in-windows-environment-20-638.jpg
author: Teymur Kheirkhabarov (idea), Ryan Plas (rule), oscd.community
date: 2020-10-05
modified: 2024-12-01
tags:
- attack.persistence
- attack.defense-impairment
- attack.t1112
logsource:
category: process_creation
product: windows
detection:
selection_cli:
- CommandLine|contains|all:
- 'reg '
- 'add'
- CommandLine|contains:
- 'powershell'
- 'set-itemproperty'
- ' sp '
- 'new-itemproperty'
selection_data:
IntegrityLevel:
- 'Medium'
- 'S-1-16-8192'
CommandLine|contains|all:
- 'ControlSet'
- 'Services'
CommandLine|contains:
- 'ImagePath'
- 'FailureCommand'
- 'ServiceDLL'
condition: all of selection_*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_cli
selection_cli:
- CommandLine|contains|all:
- 'reg '
- 'add'
- CommandLine|contains:
- 'powershell'
- 'set-itemproperty'
- ' sp '
- 'new-itemproperty'
Stage 2: selection_data
selection_data:
IntegrityLevel:
- 'Medium'
- 'S-1-16-8192'
CommandLine|contains|all:
- 'ControlSet'
- 'Services'
CommandLine|contains:
- 'ImagePath'
- 'FailureCommand'
- 'ServiceDLL'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
IntegrityLevel | eq |
| field:"IntegrityLevel" kind:eq |
OpenCanary - HTTP GET Request
#Detects instances where an HTTP service on an OpenCanary node has received a GET request.
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule Body
title: OpenCanary - HTTP GET Request
id: af6c3078-84cd-4c68-8842-08b76bd81b13
status: test
description: Detects instances where an HTTP service on an OpenCanary node has received a GET request.
references:
- https://opencanary.readthedocs.io/en/latest/starting/configuration.html#services-configuration
- https://github.com/thinkst/opencanary/blob/a0896adfcaf0328cfd5829fe10d2878c7445138e/opencanary/logger.py#L52
author: Security Onion Solutions
date: 2024-03-08
tags:
- attack.initial-access
- attack.t1190
logsource:
category: application
product: opencanary
detection:
selection:
logtype: 3000
condition: selection
falsepositives:
- Unlikely
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
logtype: 3000
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
logtype | eq |
| field:"logtype" kind:eq value:"3000" |
Potential Azure Browser SSO Abuse
#Detects abusing Azure Browser SSO by requesting OAuth 2.0 refresh tokens for an Azure-AD-authenticated Windows user (i.e. the machine is joined to Azure AD and a user logs in with their Azure AD account) wanting to perform SSO authentication in the browser. An attacker can use this to authenticate to Azure AD in a browser as that user.
Known False Positives
- False positives are expected since this rules is only looking for the DLL load event. This rule is better used in correlation with related activity
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 7: Image loaded |
Rule Body
title: Potential Azure Browser SSO Abuse
id: 50f852e6-af22-4c78-9ede-42ef36aa3453
status: test
description: |
Detects abusing Azure Browser SSO by requesting OAuth 2.0 refresh tokens for an Azure-AD-authenticated Windows user (i.e. the machine is joined to Azure AD and a user logs in with their Azure AD account) wanting to perform SSO authentication in the browser.
An attacker can use this to authenticate to Azure AD in a browser as that user.
references:
- https://posts.specterops.io/requesting-azure-ad-request-tokens-on-azure-ad-joined-machines-for-browser-sso-2b0409caad30
author: Den Iuzvyk
date: 2020-07-15
modified: 2023-04-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.execution
- attack.stealth
- attack.t1574.001
logsource:
category: image_load
product: windows
detection:
selection:
ImageLoaded: 'C:\Windows\System32\MicrosoftAccountTokenProvider.dll'
filter_main_bgtaskhost:
Image|startswith:
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
Image|endswith: '\BackgroundTaskHost.exe'
# CommandLine|contains: '-ServerNameBackgroundTaskHost.WebAccountProvider'
filter_optional_devenv:
Image|startswith:
- 'C:\Program Files\Microsoft Visual Studio\'
- 'C:\Program Files (x86)\Microsoft Visual Studio\'
Image|endswith: '\IDE\devenv.exe'
filter_optional_ie:
Image:
- 'C:\Program Files (x86)\Internet Explorer\iexplore.exe'
- 'C:\Program Files\Internet Explorer\iexplore.exe'
filter_optional_edge_1:
- Image|startswith: 'C:\Program Files (x86)\Microsoft\EdgeWebView\Application\'
- Image|endswith: '\WindowsApps\MicrosoftEdge.exe'
- Image:
- 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
- 'C:\Program Files\Microsoft\Edge\Application\msedge.exe'
filter_optional_edge_2:
Image|startswith:
- 'C:\Program Files (x86)\Microsoft\EdgeCore\'
- 'C:\Program Files\Microsoft\EdgeCore\'
Image|endswith:
- '\msedge.exe'
- '\msedgewebview2.exe'
filter_optional_onedrive:
Image|endswith: '\AppData\Local\Microsoft\OneDrive\OneDrive.exe'
filter_optional_null:
Image: null
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- False positives are expected since this rules is only looking for the DLL load event. This rule is better used in correlation with related activity
level: low
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_* and not 1 of filter_optional_*Stage 1: selection
selection:
ImageLoaded: 'C:\Windows\System32\MicrosoftAccountTokenProvider.dll'
Stage 2: not filter_main_bgtaskhost
filter_main_bgtaskhost:
Image|startswith:
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
Image|endswith: '\BackgroundTaskHost.exe'
Stage 3: not filter_optional_*
filter_optional_devenv:
Image|startswith:
- 'C:\Program Files\Microsoft Visual Studio\'
- 'C:\Program Files (x86)\Microsoft Visual Studio\'
Image|endswith: '\IDE\devenv.exe'
filter_optional_ie:
Image:
- 'C:\Program Files (x86)\Internet Explorer\iexplore.exe'
- 'C:\Program Files\Internet Explorer\iexplore.exe'
filter_optional_edge_1:
- Image|startswith: 'C:\Program Files (x86)\Microsoft\EdgeWebView\Application\'
- Image|endswith: '\WindowsApps\MicrosoftEdge.exe'
- Image:
- 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
- 'C:\Program Files\Microsoft\Edge\Application\msedge.exe'
filter_optional_edge_2:
Image|startswith:
- 'C:\Program Files (x86)\Microsoft\EdgeCore\'
- 'C:\Program Files\Microsoft\EdgeCore\'
Image|endswith:
- '\msedge.exe'
- '\msedgewebview2.exe'
filter_optional_onedrive:
Image|endswith: '\AppData\Local\Microsoft\OneDrive\OneDrive.exe'
filter_optional_null:
Image: null
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImageLoaded | eq |
| field:"ImageLoaded" kind:eq value:"C:\Windows\System32\MicrosoftAccountTokenProvider.dll" |
Exclusions
The rule actively suppresses these predicates.
Potential DLL Sideloading Via ClassicExplorer32.dll
#Detects potential DLL sideloading using ClassicExplorer32.dll from the Classic Shell software
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 7: Image loaded |
Rule Body
title: Potential DLL Sideloading Via ClassicExplorer32.dll
id: caa02837-f659-466f-bca6-48bde2826ab4
status: test
description: Detects potential DLL sideloading using ClassicExplorer32.dll from the Classic Shell software
references:
- https://blogs.blackberry.com/en/2022/12/mustang-panda-uses-the-russian-ukrainian-war-to-attack-europe-and-asia-pacific-targets
- https://app.any.run/tasks/6d8cabb0-dcda-44b6-8050-28d6ce281687/
author: frack113
date: 2022-12-13
tags:
- attack.persistence
- attack.privilege-escalation
- attack.execution
- attack.stealth
- attack.t1574.001
logsource:
category: image_load
product: windows
detection:
selection_classicexplorer:
ImageLoaded|endswith: '\ClassicExplorer32.dll'
filter_classicexplorer:
ImageLoaded|startswith: 'C:\Program Files\Classic Shell\'
condition: selection_classicexplorer and not filter_classicexplorer
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selection_classicexplorer and not filter_classicexplorerStage 1: selection_classicexplorer
selection_classicexplorer:
ImageLoaded|endswith: '\ClassicExplorer32.dll'
Stage 2: not filter_classicexplorer
filter_classicexplorer:
ImageLoaded|startswith: 'C:\Program Files\Classic Shell\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImageLoaded | ends_with |
| field:"ImageLoaded" kind:ends_with value:"\ClassicExplorer32.dll" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
ImageLoaded | starts_with | C:\Program Files\Classic Shell\ | excludes:ImageLoaded field:"ImageLoaded" value:"C:\Program Files\Classic Shell\" |
Potential Local File Read Vulnerability In JVM Based Application
#Detects potential local file read vulnerability in JVM based apps. If the exceptions are caused due to user input and contain path traversal payloads then it's a red flag.
Known False Positives
- Application bugs
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule Body
title: Potential Local File Read Vulnerability In JVM Based Application
id: e032f5bc-4563-4096-ae3b-064bab588685
status: test
description: |
Detects potential local file read vulnerability in JVM based apps.
If the exceptions are caused due to user input and contain path traversal payloads then it's a red flag.
references:
- https://www.wix.engineering/post/threat-and-vulnerability-hunting-with-application-server-error-logs
author: Moti Harmats
date: 2023-02-11
tags:
- attack.initial-access
- attack.t1190
logsource:
category: application
product: jvm
definition: 'Requirements: application error logs must be collected (with LOG_LEVEL=ERROR and above)'
detection:
keywords_local_file_read:
'|all':
- 'FileNotFoundException'
- '/../../..'
condition: keywords_local_file_read
falsepositives:
- Application bugs
level: high
Stages and Predicates
Stage 0: condition
keywords_local_file_readStage 1: keywords_local_file_read
keywords_local_file_read:
'|all':
- 'FileNotFoundException'
- '/../../..'
Potential PowerShell Console History Access Attempt via History File
#Detects potential access attempts to the PowerShell console history directly via history file (ConsoleHost_history.txt). This can give access to plaintext passwords used in PowerShell commands or used for general reconnaissance.
Known False Positives
- Legitimate access of the console history file is possible
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
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: Potential PowerShell Console History Access Attempt via History File
id: f4ff7323-b5fc-4323-8b52-6b9408e15788
status: experimental
description: |
Detects potential access attempts to the PowerShell console history directly via history file (ConsoleHost_history.txt).
This can give access to plaintext passwords used in PowerShell commands or used for general reconnaissance.
references:
- https://0xdf.gitlab.io/2018/11/08/powershell-history-file.html
author: Luc Génaux
date: 2025-04-03
tags:
- attack.credential-access
- attack.t1552.001
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains:
- 'ConsoleHost_history.txt'
- '(Get-PSReadLineOption).HistorySavePath'
condition: selection
falsepositives:
- Legitimate access of the console history file is possible
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|contains:
- 'ConsoleHost_history.txt'
- '(Get-PSReadLineOption).HistorySavePath'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Potential PowerShell Obfuscation Via WCHAR/CHAR
#Detects suspicious encoded character syntax often used for defense evasion
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: Potential PowerShell Obfuscation Via WCHAR/CHAR
id: e312efd0-35a1-407f-8439-b8d434b438a6
status: test
description: Detects suspicious encoded character syntax often used for defense evasion
references:
- https://twitter.com/0gtweet/status/1281103918693482496
author: Florian Roth (Nextron Systems)
date: 2020-07-09
modified: 2025-03-03
tags:
- attack.execution
- attack.stealth
- attack.t1059.001
- attack.t1027
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains:
- '[char]0x'
- '(WCHAR)0x'
condition: selection
falsepositives:
- Unknown
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_powershell_obfuscation_via_utf8/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|contains:
- '[char]0x'
- '(WCHAR)0x'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Registry Modification of MS-settings Protocol Handler
#Detects registry modifications to the 'ms-settings' protocol handler, which is frequently targeted for UAC bypass or persistence. Attackers can modify this registry to execute malicious code with elevated privileges by hijacking the command execution path.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation | |
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Registry Modification of MS-settings Protocol Handler
id: dd3ee8cc-f751-41c9-ba53-5a32ed47e563
related:
- id: 152f3630-77c1-4284-bcc0-4cc68ab2f6e7
type: similar
status: test
description: |
Detects registry modifications to the 'ms-settings' protocol handler, which is frequently targeted for UAC bypass or persistence.
Attackers can modify this registry to execute malicious code with elevated privileges by hijacking the command execution path.
references:
- https://thedfirreport.com/2021/12/13/diavol-ransomware/
- https://www.trendmicro.com/en_us/research/25/f/water-curse.html
author: frack113, Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2021-12-20
modified: 2026-01-24
tags:
- attack.privilege-escalation
- attack.persistence
- attack.defense-impairment
- attack.t1548.002
- attack.t1546.001
- attack.t1112
logsource:
category: process_creation
product: windows
detection:
selection_reg_img:
- Image|endswith: '\reg.exe'
- OriginalFileName: 'reg.exe'
selection_pwsh_img:
- Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'powershell.exe'
- 'pwsh.dll'
selection_reg_cli:
CommandLine|contains: 'add'
selection_pwsh_cli:
CommandLine|contains:
- 'New-ItemProperty'
- 'Set-ItemProperty'
- 'ni '
- 'sp '
selection_cli_key:
CommandLine|contains: '\ms-settings\shell\open\command'
condition: (all of selection_reg_* or all of selection_pwsh_*) and selection_cli_key
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
(all of selection_reg_* or all of selection_pwsh_*) and selection_cli_keyStage 1: selection_reg_img
selection_reg_img:
- Image|endswith: '\reg.exe'
- OriginalFileName: 'reg.exe'
Stage 2: selection_reg_cli
selection_reg_cli:
CommandLine|contains: 'add'
Stage 3: selection_pwsh_img
selection_pwsh_img:
- Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'powershell.exe'
- 'pwsh.dll'
Stage 4: selection_pwsh_cli
selection_pwsh_cli:
CommandLine|contains:
- 'New-ItemProperty'
- 'Set-ItemProperty'
- 'ni '
- 'sp '
Stage 5: selection_cli_key
selection_cli_key:
CommandLine|contains: '\ms-settings\shell\open\command'
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 |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq |
Remote Access Tool - Ammy Admin Agent Execution
#Detects the execution of the Ammy Admin RMM agent for remote management.
Known False Positives
- Legitimate use of Ammy Admin RMM agent for remote management by admins.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | No specific technique |
| Persistence | No specific technique |
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: Remote Access Tool - Ammy Admin Agent Execution
id: 7da7809e-f3d5-47a3-9d5d-fc9d019caf14
status: test
description: Detects the execution of the Ammy Admin RMM agent for remote management.
references:
- https://www.ammyy.com/en/admin_features.html
author: '@kostastsale'
date: 2024-08-05
tags:
- attack.execution
- attack.persistence
- detection.threat-hunting
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\rundll32.exe'
CommandLine|contains: 'AMMYY\aa_nts.dll",run'
condition: selection
falsepositives:
- Legitimate use of Ammy Admin RMM agent for remote management by admins.
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image|endswith: '\rundll32.exe'
CommandLine|contains: 'AMMYY\aa_nts.dll",run'
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" |
Remote Access Tool - ScreenConnect Potential Suspicious Remote Command Execution
#Detects potentially suspicious child processes launched via the ScreenConnect client service.
Known False Positives
- If the script being executed make use of any of the utilities mentioned in the detection then they should filtered out or allowed.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Remote Access Tool - ScreenConnect Potential Suspicious Remote Command Execution
id: 7b582f1a-b318-4c6a-bf4e-66fe49bf55a5
related:
- id: d1a401ab-8c47-4e86-a7d8-2460b6a53e4a
type: derived
status: test
description: |
Detects potentially suspicious child processes launched via the ScreenConnect client service.
references:
- https://www.mandiant.com/resources/telegram-malware-iranian-espionage
- https://docs.connectwise.com/ConnectWise_Control_Documentation/Get_started/Host_client/View_menu/Backstage_mode
- https://www.huntress.com/blog/slashandgrab-screen-connect-post-exploitation-in-the-wild-cve-2024-1709-cve-2024-1708
- https://www.trendmicro.com/en_us/research/24/b/threat-actor-groups-including-black-basta-are-exploiting-recent-.html
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems), @Kostastsale
date: 2022-02-25
modified: 2024-02-28
tags:
- attack.command-and-control
- attack.t1219.002
logsource:
product: windows
category: process_creation
detection:
selection:
ParentCommandLine|contains|all:
- ':\Windows\TEMP\ScreenConnect\'
- 'run.cmd'
Image|endswith:
- '\bitsadmin.exe'
- '\cmd.exe'
- '\curl.exe'
- '\dllhost.exe'
- '\net.exe'
- '\nltest.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\rundll32.exe'
- '\wevtutil.exe'
condition: selection
falsepositives:
- If the script being executed make use of any of the utilities mentioned in the detection then they should filtered out or allowed.
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ParentCommandLine|contains|all:
- ':\Windows\TEMP\ScreenConnect\'
- 'run.cmd'
Image|endswith:
- '\bitsadmin.exe'
- '\cmd.exe'
- '\curl.exe'
- '\dllhost.exe'
- '\net.exe'
- '\nltest.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\rundll32.exe'
- '\wevtutil.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with |
ParentCommandLine | match |
| field:"ParentCommandLine" kind:match |
Suspicious Child Process Of Veeam Dabatase
#Detects suspicious child processes of the Veeam service process. This could indicate potential RCE or SQL Injection.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | No specific technique |
| Persistence | No specific technique |
| Privilege Escalation | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Suspicious Child Process Of Veeam Dabatase
id: d55b793d-f847-4eea-b59a-5ab09908ac90
related:
- id: 869b9ca7-9ea2-4a5a-8325-e80e62f75445
type: similar
status: test
description: Detects suspicious child processes of the Veeam service process. This could indicate potential RCE or SQL Injection.
references:
- https://labs.withsecure.com/publications/fin7-target-veeam-servers
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-05-04
tags:
- attack.initial-access
- attack.persistence
- attack.privilege-escalation
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith: '\sqlservr.exe'
ParentCommandLine|contains: 'VEEAMSQL'
selection_child_1:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wsl.exe'
- '\wt.exe'
CommandLine|contains:
- '-ex '
- 'bypass'
- 'cscript'
- 'DownloadString'
- 'http://'
- 'https://'
- 'mshta'
- 'regsvr32'
- 'rundll32'
- 'wscript'
- 'copy '
selection_child_2:
Image|endswith:
- '\net.exe'
- '\net1.exe'
- '\netstat.exe'
- '\nltest.exe'
- '\ping.exe'
- '\tasklist.exe'
- '\whoami.exe'
condition: selection_parent and 1 of selection_child_*
level: critical
Stages and Predicates
Stage 0: condition
selection_parent and 1 of selection_child_*Stage 1: selection_parent
selection_parent:
ParentImage|endswith: '\sqlservr.exe'
ParentCommandLine|contains: 'VEEAMSQL'
Stage 2: selection_child_1
selection_child_1:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wsl.exe'
- '\wt.exe'
CommandLine|contains:
- '-ex '
- 'bypass'
- 'cscript'
- 'DownloadString'
- 'http://'
- 'https://'
- 'mshta'
- 'regsvr32'
- 'rundll32'
- 'wscript'
- 'copy '
Stage 3: selection_child_2
selection_child_2:
Image|endswith:
- '\net.exe'
- '\net1.exe'
- '\netstat.exe'
- '\nltest.exe'
- '\ping.exe'
- '\tasklist.exe'
- '\whoami.exe'
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 |
ParentCommandLine | match |
| field:"ParentCommandLine" kind:match value:"VEEAMSQL" |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with value:"\sqlservr.exe" |
Suspicious Cross-User Process Spawn
#Detects suspicious spawning of a process under a different user context than the parent process. Processes such as notepad.exe, calculator etc. are generally spawned under the same user context and also they are often targeted as sacrificial process or decoy process to check successful privilege escalation.
Known False Positives
- RunAs usage spawning one of the listed binaries under a different account
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Suspicious Cross-User Process Spawn
id: d2b7a134-9c3e-4f8a-b56d-e0c1f8a29b47
status: experimental
description: |
Detects suspicious spawning of a process under a different user context than the parent process.
Processes such as notepad.exe, calculator etc. are generally spawned under the same user context and
also they are often targeted as sacrificial process or decoy process to check successful privilege escalation.
references:
- https://github.com/MSNightmare/LegacyHive
- https://git.projectnightcrawler.dev/NightmareEclipse/LegacyHive
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2026-07-23
tags:
- attack.privilege-escalation
- attack.stealth
- attack.t1055
- attack.t1134
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- '\notepad.exe'
- '\calc.exe'
- '\mspaint.exe'
- '\wordpad.exe'
- '\write.exe'
filter_main_same_user:
User|fieldref: ParentUser
filter_optional_user_null:
User: null
filter_optional_parent_null:
ParentUser: null
filter_optional_empty_user:
- ParentUser:
- ''
- '-'
- User:
- ''
- '-'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- RunAs usage spawning one of the listed binaries under a different account
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_susp_cross_user_process_spawn/info.yml
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_* and not 1 of filter_optional_*Stage 1: selection
selection:
Image|endswith:
- '\notepad.exe'
- '\calc.exe'
- '\mspaint.exe'
- '\wordpad.exe'
- '\write.exe'
Stage 2: not filter_main_same_user
filter_main_same_user:
User|fieldref: ParentUser
Stage 3: not filter_optional_*
filter_optional_user_null:
User: null
filter_optional_parent_null:
ParentUser: null
filter_optional_empty_user:
- ParentUser:
- ''
- '-'
- User:
- ''
- '-'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
User | cross_field_compare | ParentUser | excludes:User field:"User" value:"ParentUser" |
ParentUser | eq | - | excludes:ParentUser field:"ParentUser" value:"-" |
ParentUser | is_null | excludes:ParentUser | |
User | eq | - | excludes:User field:"User" value:"-" |
User | is_null | excludes:User |
Suspicious DNS Z Flag Bit Set
#The DNS Z flag is bit within the DNS protocol header that is, per the IETF design, meant to be used reserved (unused). Although recently it has been used in DNSSec, the value being set to anything other than 0 should be rare. Otherwise if it is set to non 0 and DNSSec is being used, then excluding the legitimate domains is low effort and high reward. Determine if multiple of these files were accessed in a short period of time to further enhance the possibility of seeing if this was a one off or the possibility of larger sensitive file gathering. This Sigma query is designed to accompany the Corelight Threat Hunting Guide, which can be found here: https://www3.corelight.com/corelights-introductory-guide-to-threat-hunting-with-zeek-bro-logs'
Known False Positives
- Internal or legitimate external domains using DNSSec. Verify if these are legitimate DNSSec domains and then exclude them.
- If you work in a Public Sector then it may be good to exclude things like endswith ".edu", ".gov" and or ".mil"
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Rule Body
title: Suspicious DNS Z Flag Bit Set
id: ede05abc-2c9e-4624-9944-9ff17fdc0bf5
status: test
description: |
The DNS Z flag is bit within the DNS protocol header that is, per the IETF design, meant to be used reserved (unused).
Although recently it has been used in DNSSec, the value being set to anything other than 0 should be rare.
Otherwise if it is set to non 0 and DNSSec is being used, then excluding the legitimate domains is low effort and high reward.
Determine if multiple of these files were accessed in a short period of time to further enhance the possibility of seeing if this was a one off or the possibility of larger sensitive file gathering.
This Sigma query is designed to accompany the Corelight Threat Hunting Guide, which can be found here: https://www3.corelight.com/corelights-introductory-guide-to-threat-hunting-with-zeek-bro-logs'
references:
- https://twitter.com/neu5ron/status/1346245602502443009
- https://tdm.socprime.com/tdm/info/eLbyj4JjI15v#sigma
- https://tools.ietf.org/html/rfc2929#section-2.1
- https://www.netresec.com/?page=Blog&month=2021-01&post=Finding-Targeted-SUNBURST-Victims-with-pDNS
author: '@neu5ron, SOC Prime Team, Corelight'
date: 2021-05-04
modified: 2022-11-29
tags:
- attack.t1095
- attack.t1571
- attack.command-and-control
logsource:
product: zeek
service: dns
detection:
z_flag_unset:
Z: 0
most_probable_valid_domain:
query|contains: '.'
exclude_tlds:
query|endswith:
- '.arpa'
- '.local'
- '.ultradns.net'
- '.twtrdns.net'
- '.azuredns-prd.info'
- '.azure-dns.com'
- '.azuredns-ff.info'
- '.azuredns-ff.org'
- '.azuregov-dns.org'
exclude_query_types:
qtype_name:
- 'ns'
- 'mx'
exclude_responses:
answers|endswith: '\\x00'
exclude_netbios:
id.resp_p:
- 137
- 138
- 139
condition: not z_flag_unset and most_probable_valid_domain and not (exclude_tlds or exclude_query_types or exclude_responses or exclude_netbios)
falsepositives:
- 'Internal or legitimate external domains using DNSSec. Verify if these are legitimate DNSSec domains and then exclude them.'
- 'If you work in a Public Sector then it may be good to exclude things like endswith ".edu", ".gov" and or ".mil"'
level: medium
Stages and Predicates
Stage 0: condition
not z_flag_unset and most_probable_valid_domain and not (exclude_tlds or exclude_query_types or exclude_responses or exclude_netbios)Stage 1: not z_flag_unset
z_flag_unset:
Z: 0
Stage 2: most_probable_valid_domain
most_probable_valid_domain:
query|contains: '.'
Stage 3: not exclude_tlds
exclude_tlds:
query|endswith:
- '.arpa'
- '.local'
- '.ultradns.net'
- '.twtrdns.net'
- '.azuredns-prd.info'
- '.azure-dns.com'
- '.azuredns-ff.info'
- '.azuredns-ff.org'
- '.azuregov-dns.org'
Stage 4: not exclude_query_types
exclude_query_types:
qtype_name:
- 'ns'
- 'mx'
Stage 5: not exclude_responses
exclude_responses:
answers|endswith: '\\x00'
Stage 6: not exclude_netbios
exclude_netbios:
id.resp_p:
- 137
- 138
- 139
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
query | match |
| field:"query" kind:match value:"." |
Exclusions
The rule actively suppresses these predicates.