Detection rules › Sigma
Sigma rules: 1q
7Zip Compressing Dump Files
#Detects execution of 7z in order to compress a file with a ".dmp"/".dump" extension, which could be a step in a process of dump file exfiltration.
Known False Positives
- Legitimate use of 7z with a command line in which ".dmp" or ".dump" appears accidentally
- Legitimate use of 7z to compress WER ".dmp" files for troubleshooting
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Collection |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: 7Zip Compressing Dump Files
id: ec570e53-4c76-45a9-804d-dc3f355ff7a7
related:
- id: 1ac14d38-3dfc-4635-92c7-e3fd1c5f5bfc
type: derived
status: test
description: Detects execution of 7z in order to compress a file with a ".dmp"/".dump" extension, which could be a step in a process of dump file exfiltration.
references:
- https://thedfirreport.com/2022/09/26/bumblebee-round-two/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-09-27
modified: 2026-06-05
tags:
- attack.collection
- attack.t1560.001
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Description|contains: '7-Zip'
- Image|endswith:
- '\7z.exe'
- '\7zr.exe'
- '\7za.exe'
- OriginalFileName:
- '7z.exe'
- '7za.exe'
- '7zr.exe'
selection_extension:
CommandLine|contains:
- '.dmp'
- '.dump'
- '.hdmp'
condition: all of selection_*
falsepositives:
- Legitimate use of 7z with a command line in which ".dmp" or ".dump" appears accidentally
- Legitimate use of 7z to compress WER ".dmp" files for troubleshooting
level: medium
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Description|contains: '7-Zip'
- Image|endswith:
- '\7z.exe'
- '\7zr.exe'
- '\7za.exe'
- OriginalFileName:
- '7z.exe'
- '7za.exe'
- '7zr.exe'
Stage 2: selection_extension
selection_extension:
CommandLine|contains:
- '.dmp'
- '.dump'
- '.hdmp'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Description | match |
| field:"Description" kind:match value:"7-Zip" |
Image | ends_with |
| field:"Image" kind:ends_with |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq |
AADInternals PowerShell Cmdlets Execution - PsScript
#Detects ADDInternals Cmdlet execution. A tool for administering Azure AD and Office 365. Which can be abused by threat actors to attack Azure AD or Office 365.
Known False Positives
- Legitimate use of the library for administrative activity
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Reconnaissance | No specific technique |
| Execution | No specific technique |
| Credential Access | No specific technique |
| Discovery | No specific technique |
| Impact | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: AADInternals PowerShell Cmdlets Execution - PsScript
id: 91e69562-2426-42ce-a647-711b8152ced6
related:
- id: c86500e9-a645-4680-98d7-f882c70c1ea3
type: similar
status: test
description: Detects ADDInternals Cmdlet execution. A tool for administering Azure AD and Office 365. Which can be abused by threat actors to attack Azure AD or Office 365.
references:
- https://o365blog.com/aadinternals/
- https://github.com/Gerenios/AADInternals
author: Austin Songer (@austinsonger), Nasreddine Bencherchali (Nextron Systems), Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2022-12-23
modified: 2025-02-06
tags:
- attack.execution
- attack.reconnaissance
- attack.discovery
- attack.credential-access
- attack.impact
logsource:
product: windows
category: ps_script
definition: Script Block Logging must be enable
detection:
selection:
ScriptBlockText|contains:
# Since most of the cmdlets use a unique enough string which is "-AADInt" we only used that portion. For a complete list please check the references linked above
- 'Add-AADInt'
- 'ConvertTo-AADInt'
- 'Disable-AADInt'
- 'Enable-AADInt'
- 'Export-AADInt'
- 'Find-AADInt'
- 'Get-AADInt'
- 'Grant-AADInt'
- 'Initialize-AADInt'
- 'Install-AADInt'
- 'Invoke-AADInt'
- 'Join-AADInt'
- 'New-AADInt'
- 'Open-AADInt'
- 'Read-AADInt'
- 'Register-AADInt'
- 'Remove-AADInt'
- 'Reset-AADInt'
- 'Resolve-AADInt'
- 'Restore-AADInt'
- 'Save-AADInt'
- 'Search-AADInt'
- 'Send-AADInt'
- 'Set-AADInt'
- 'Start-AADInt'
- 'Unprotect-AADInt'
- 'Update-AADInt'
condition: selection
falsepositives:
- Legitimate use of the library for administrative activity
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ScriptBlockText|contains:
- 'Add-AADInt'
- 'ConvertTo-AADInt'
- 'Disable-AADInt'
- 'Enable-AADInt'
- 'Export-AADInt'
- 'Find-AADInt'
- 'Get-AADInt'
- 'Grant-AADInt'
- 'Initialize-AADInt'
- 'Install-AADInt'
- 'Invoke-AADInt'
- 'Join-AADInt'
- 'New-AADInt'
- 'Open-AADInt'
- 'Read-AADInt'
- 'Register-AADInt'
- 'Remove-AADInt'
- 'Reset-AADInt'
- 'Resolve-AADInt'
- 'Restore-AADInt'
- 'Save-AADInt'
- 'Search-AADInt'
- 'Send-AADInt'
- 'Set-AADInt'
- 'Start-AADInt'
- 'Unprotect-AADInt'
- 'Update-AADInt'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
Access To Windows DPAPI Master Keys By Uncommon Applications
#Detects file access requests to the the Windows Data Protection API Master keys by an uncommon application. This can be a sign of credential stealing. Example case would be usage of mimikatz "dpapi::masterkey" function
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Rule Body
title: Access To Windows DPAPI Master Keys By Uncommon Applications
id: 46612ae6-86be-4802-bc07-39b59feb1309
status: test
description: |
Detects file access requests to the the Windows Data Protection API Master keys by an uncommon application.
This can be a sign of credential stealing. Example case would be usage of mimikatz "dpapi::masterkey" function
references:
- http://blog.harmj0y.net/redteaming/operational-guidance-for-offensive-user-dpapi-abuse/
- https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation/dpapi-extracting-passwords
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-10-17
modified: 2026-07-28
tags:
- attack.credential-access
- attack.t1555.004
logsource:
category: file_access
product: windows
definition: 'Requirements: Microsoft-Windows-Kernel-File ETW provider'
detection:
selection:
FileName|contains:
- '\Microsoft\Protect\S-1-5-18\' # For System32
- '\Microsoft\Protect\S-1-5-21-' # For Users
filter_main_system_folders:
Image|startswith:
- 'C:\Program Files\'
- 'C:\Program Files (x86)\'
- 'C:\Windows\system32\'
- 'C:\Windows\SysWOW64\'
filter_main_explorer:
Image: 'C:\Windows\explorer.exe'
condition: selection and not 1 of filter_main_*
falsepositives:
- Unknown
# Increase level after false positives filters are good enough
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
FileName|contains:
- '\Microsoft\Protect\S-1-5-18\'
- '\Microsoft\Protect\S-1-5-21-'
Stage 2: not filter_main_*
filter_main_system_folders:
Image|startswith:
- 'C:\Program Files\'
- 'C:\Program Files (x86)\'
- 'C:\Windows\system32\'
- 'C:\Windows\SysWOW64\'
filter_main_explorer:
Image: 'C:\Windows\explorer.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
FileName | match |
| field:"file_name" kind:match |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Image | eq | C:\Windows\explorer.exe | excludes:Image field:"Image" value:"C:\Windows\explorer.exe" |
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\" |
Antivirus Filter Driver Disallowed On Dev Drive - Registry
#Detects activity that indicates a user disabling the ability for Antivirus mini filter to inspect a "Dev Drive".
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: Antivirus Filter Driver Disallowed On Dev Drive - Registry
id: 31e124fb-5dc4-42a0-83b3-44a69c77b271
status: test
description: |
Detects activity that indicates a user disabling the ability for Antivirus mini filter to inspect a "Dev Drive".
references:
- https://twitter.com/0gtweet/status/1720419490519752955
author: '@kostastsale, Nasreddine Bencherchali (Nextron Systems)'
date: 2023-11-05
modified: 2024-08-16
tags:
- attack.defense-impairment
- attack.t1685
logsource:
category: registry_set
product: windows
detection:
selection:
TargetObject|endswith: '\FilterManager\FltmgrDevDriveAllowAntivirusFilter'
Details: 'DWORD (0x00000000)'
condition: selection
falsepositives:
- Unlikely
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetObject|endswith: '\FilterManager\FltmgrDevDriveAllowAntivirusFilter'
Details: 'DWORD (0x00000000)'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Details | eq |
| field:"Details" kind:eq value:"DWORD (0x00000000)" |
TargetObject | ends_with |
| field:"TargetObject" kind:ends_with value:"\FilterManager\FltmgrDevDriveAllowAntivirusFilter" |
Apache Threading Error
#Detects an issue in apache logs that reports threading related errors
Known False Positives
- 3rd party apache modules - https://bz.apache.org/bugzilla/show_bug.cgi?id=46185
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Lateral Movement |
Rule Body
title: Apache Threading Error
id: e9a2b582-3f6a-48ac-b4a1-6849cdc50b3c
status: test
description: Detects an issue in apache logs that reports threading related errors
references:
- https://github.com/hannob/apache-uaf/blob/da40f2be3684c8095ec6066fa68eb5c07a086233/README.md
author: Florian Roth (Nextron Systems)
date: 2019-01-22
modified: 2021-11-27
tags:
- attack.initial-access
- attack.lateral-movement
- attack.t1190
- attack.t1210
logsource:
service: apache
definition: 'Requirements: Must be able to collect the error.log file'
detection:
keywords:
- '__pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)'
condition: keywords
falsepositives:
- 3rd party apache modules - https://bz.apache.org/bugzilla/show_bug.cgi?id=46185
level: medium
Stages and Predicates
Stage 0: condition
keywordsStage 1: keywords
keywords:
- '__pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)'
Automated Collection Command Prompt
#Once established within a system or network, an adversary may use automated techniques for collecting internal data.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access | |
| Collection |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Automated Collection Command Prompt
id: f576a613-2392-4067-9d1a-9345fb58d8d1
status: test
description: Once established within a system or network, an adversary may use automated techniques for collecting internal data.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1119/T1119.md
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1552.001/T1552.001.md
author: frack113
date: 2021-07-28
modified: 2022-11-11
tags:
- attack.collection
- attack.t1119
- attack.credential-access
- attack.t1552.001
logsource:
category: process_creation
product: windows
detection:
selection_ext:
CommandLine|contains:
- '.doc'
- '.docx'
- '.xls'
- '.xlsx'
- '.ppt'
- '.pptx'
- '.rtf'
- '.pdf'
- '.txt'
selection_other_dir:
CommandLine|contains|all:
- 'dir '
- ' /b '
- ' /s '
selection_other_findstr:
OriginalFileName: 'FINDSTR.EXE'
CommandLine|contains:
- ' /e '
- ' /si '
condition: selection_ext and 1 of selection_other_*
falsepositives:
- Unknown
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_susp_automated_collection/info.yml
Stages and Predicates
Stage 0: condition
selection_ext and 1 of selection_other_*Stage 1: selection_ext
selection_ext:
CommandLine|contains:
- '.doc'
- '.docx'
- '.xls'
- '.xlsx'
- '.ppt'
- '.pptx'
- '.rtf'
- '.pdf'
- '.txt'
Stage 2: selection_other_dir
selection_other_dir:
CommandLine|contains|all:
- 'dir '
- ' /b '
- ' /s '
Stage 3: selection_other_findstr
selection_other_findstr:
OriginalFileName: 'FINDSTR.EXE'
CommandLine|contains:
- ' /e '
- ' /si '
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"FINDSTR.EXE" |
AWS IAM Backdoor Users Keys
#Detects AWS API key creation for a user by another user. Backdoored users can be used to obtain persistence in the AWS environment. Also with this alert, you can detect a flow of AWS keys in your org.
Known False Positives
- Adding user keys to their own accounts (the filter cannot cover all possible variants of user naming)
- AWS API keys legitimate exchange workflows
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- AWS IAM Credentials Added to a Bedrock API Key Phantom User (Elastic)
- AWS IAM S3Browser User or AccessKey Creation (Sigma)
- AWS IAM Sensitive Operations via Lambda Execution Role (Elastic)
- AWS IAM User Created Access Keys For Another User (Elastic)
- AWS IAM User Self-Created Access Key Subsequently Used (Elastic)
- AWS Sensitive IAM Operations Performed via CloudShell (Elastic)
- AWS User API Key Created (Panther)
- High-Risk Cross-Cloud User Impersonation (Kusto)
Rule Body
title: AWS IAM Backdoor Users Keys
id: 0a5177f4-6ca9-44c2-aacf-d3f3d8b6e4d2
status: test
description: |
Detects AWS API key creation for a user by another user.
Backdoored users can be used to obtain persistence in the AWS environment.
Also with this alert, you can detect a flow of AWS keys in your org.
references:
- https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam__backdoor_users_keys/main.py
- https://github.com/SigmaHQ/sigma/issues/6223
author: faloker
date: 2020-02-12
modified: 2026-08-14
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: iam.amazonaws.com
eventName: CreateAccessKey
filter_main_same_user:
userIdentity.arn|fieldref|contains: responseElements.accessKey.userName
condition: selection and not 1 of filter_main_*
falsepositives:
- Adding user keys to their own accounts (the filter cannot cover all possible variants of user naming)
- AWS API keys legitimate exchange workflows
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
eventSource: iam.amazonaws.com
eventName: CreateAccessKey
Stage 2: not filter_main_same_user
filter_main_same_user:
userIdentity.arn|fieldref|contains: responseElements.accessKey.userName
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
eventName | eq |
| field:"aws::eventName" kind:eq value:"CreateAccessKey" |
eventSource | eq |
| field:"aws::eventSource" kind:eq value:"iam.amazonaws.com" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
userIdentity.arn | match | responseElements.accessKey.userName | excludes:userIdentity.arn field:"userIdentity.arn" value:"responseElements.accessKey.userName" |
Chromium Browser Instance Executed With Custom Extension
#Detects a Chromium based browser process with the 'load-extension' flag to start a instance with a custom extension
Known False Positives
- Usage of Chrome Extensions in testing tools such as BurpSuite will trigger this alert
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
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: Chromium Browser Instance Executed With Custom Extension
id: 88d6e60c-759d-4ac1-a447-c0f1466c2d21
related:
- id: 27ba3207-dd30-4812-abbf-5d20c57d474e
type: similar
status: test
description: Detects a Chromium based browser process with the 'load-extension' flag to start a instance with a custom extension
references:
- https://redcanary.com/blog/chromeloader/
- https://emkc.org/s/RJjuLa
- https://www.mandiant.com/resources/blog/lnk-between-browsers
author: Aedan Russell, frack113, X__Junior (Nextron Systems)
date: 2022-06-19
modified: 2023-11-28
tags:
- attack.persistence
- attack.t1176.001
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- '\brave.exe'
- '\chrome.exe'
- '\msedge.exe'
- '\opera.exe'
- '\vivaldi.exe'
CommandLine|contains: '--load-extension='
condition: selection
falsepositives:
- Usage of Chrome Extensions in testing tools such as BurpSuite will trigger this alert
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_browsers_chromium_load_extension/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image|endswith:
- '\brave.exe'
- '\chrome.exe'
- '\msedge.exe'
- '\opera.exe'
- '\vivaldi.exe'
CommandLine|contains: '--load-extension='
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:"--load-extension=" |
Image | ends_with |
| field:"Image" kind:ends_with |
Computer account modifying Active Directory permissions (PrivExchange)
#Detects scenarios where an attacker compromise a server with high privileges to perform permissions changes. PrivExchange attack can be detected using this rule.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 5136: A directory service object was modified. |
Rule Body
title: Computer account modifying Active Directory permissions (PrivExchange)
description: Detects scenarios where an attacker compromise a server with high privileges to perform permissions changes. PrivExchange attack can be detected using this rule.
requirements: auditing SACL "Modify permissions" must be placed on the AD root container using the Active Directory console (https://www.manageengine.com/products/active-directory-audit/active-directory-auditing-configuration-guide-configure-object-level-auditing-manually.html).
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0005-Defense%20Evasion/T1222.001-File%20and%20Directory%20Permissions%20Modification
- https://dirkjanm.io/abusing-exchange-one-api-call-away-from-domain-admin/
tags:
- attack.defense_evasion
- attack.t1222.001
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: security
detection:
selection:
EventID: 5136
AttributeLDAPDisplayName: ntSecurityDescriptor
OperationType: '%%14674' # Value added
SubjectUserName: # List of Exchange servers + $
- srvexchange01$
- srvexchange02$
- srvexchange03$
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventID: 5136
AttributeLDAPDisplayName: ntSecurityDescriptor
OperationType: '%%14674'
SubjectUserName:
- srvexchange01$
- srvexchange02$
- srvexchange03$
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
AttributeLDAPDisplayName | eq |
| field:"AttributeLDAPDisplayName" kind:eq value:"ntSecurityDescriptor" |
OperationType | eq |
| field:"OperationType" kind:eq value:"%%14674" |
SubjectUserName | eq |
| field:"SubjectUserName" kind:eq |
Creation Of A Local User Account
#Detects the creation of a new user account. Such accounts may be used for persistence that do not require persistent remote access tools to be deployed on the system.
Known False Positives
- Legitimate administration activities
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
Rule Body
title: Creation Of A Local User Account
id: 51719bf5-e4fd-4e44-8ba8-b830e7ac0731
status: test
description: Detects the creation of a new user account. Such accounts may be used for persistence that do not require persistent remote access tools to be deployed on the system.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1136.001/T1136.001.md
- https://ss64.com/osx/sysadminctl.html
author: Alejandro Ortuno, oscd.community
date: 2020-10-06
modified: 2023-02-18
tags:
- attack.t1136.001
- attack.persistence
logsource:
category: process_creation
product: macos
detection:
selection_dscl:
Image|endswith: '/dscl'
CommandLine|contains: 'create'
selection_sysadminctl:
Image|endswith: '/sysadminctl'
CommandLine|contains: 'addUser'
condition: 1 of selection_*
falsepositives:
- Legitimate administration activities
level: low
Stages and Predicates
Stage 0: condition
1 of selection_*Stage 1: selection_dscl
selection_dscl:
Image|endswith: '/dscl'
CommandLine|contains: 'create'
Stage 2: selection_sysadminctl
selection_sysadminctl:
Image|endswith: '/sysadminctl'
CommandLine|contains: 'addUser'
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 |
DNS Query To Remote Access Software Domain From Non-Browser App
#An adversary may use legitimate desktop support and remote access software, such as Team Viewer, Go2Assist, LogMein, AmmyyAdmin, etc, to establish an interactive command and control channel to target systems within networks. These services are commonly used as legitimate technical support software, and may be allowed by application control within a target environment. Remote access tools like VNC, Ammyy, and Teamviewer are used frequently when compared with other legitimate software commonly used by adversaries. (Citation: Symantec Living off the Land)
Known False Positives
- Likely with other browser software. Apply additional filters for any other browsers you might use.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 22: DNSEvent (DNS query) |
Rule Body
title: DNS Query To Remote Access Software Domain From Non-Browser App
id: 4d07b1f4-cb00-4470-b9f8-b0191d48ff52
related:
- id: 71ba22cb-8a01-42e2-a6dd-5bf9b547498f
type: obsolete
- id: 7c4cf8e0-1362-48b2-a512-b606d2065d7d
type: obsolete
- id: ed785237-70fa-46f3-83b6-d264d1dc6eb4
type: obsolete
status: test
description: |
An adversary may use legitimate desktop support and remote access software, such as Team Viewer, Go2Assist, LogMein, AmmyyAdmin, etc, to establish an interactive command and control channel to target systems within networks.
These services are commonly used as legitimate technical support software, and may be allowed by application control within a target environment.
Remote access tools like VNC, Ammyy, and Teamviewer are used frequently when compared with other legitimate software commonly used by adversaries. (Citation: Symantec Living off the Land)
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1219/T1219.md#atomic-test-4---gotoassist-files-detected-test-on-windows
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1219/T1219.md#atomic-test-3---logmein-files-detected-test-on-windows
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1219/T1219.md#atomic-test-6---ammyy-admin-software-execution
- https://redcanary.com/blog/misbehaving-rats/
- https://techcommunity.microsoft.com/t5/microsoft-sentinel-blog/hunting-for-omi-vulnerability-exploitation-with-azure-sentinel/ba-p/2764093
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-320a
- https://blog.sekoia.io/scattered-spider-laying-new-eggs/
- https://learn.microsoft.com/en-us/windows/client-management/client-tools/quick-assist#disable-quick-assist-within-your-organization
author: frack113, Connor Martin
date: 2022-07-11
modified: 2024-12-17
tags:
- attack.command-and-control
- attack.t1219.002
logsource:
product: windows
category: dns_query
detection:
selection_generic:
QueryName|endswith:
- 'agent.jumpcloud.com'
- 'agentreporting.atera.com'
- 'ammyy.com'
- 'api.parsec.app'
- 'api.playanext.com'
- 'api.splashtop.com'
- 'app.atera.com'
- 'assist.zoho.com'
- 'authentication.logmeininc.com'
- 'beyondtrustcloud.com'
- 'cdn.kaseya.net'
- 'client.teamviewer.com'
- 'comserver.corporate.beanywhere.com'
- 'control.connectwise.com'
- 'downloads.zohocdn.com'
- 'dwservice.net'
- 'express.gotoassist.com'
- 'getgo.com'
- 'getscreen.me' # https://x.com/malmoeb/status/1868757130624614860?s=12&t=C0_T_re0wRP_NfKa27Xw9w
- 'integratedchat.teamviewer.com'
- 'join.zoho.com'
- 'kickstart.jumpcloud.com'
- 'license.bomgar.com'
- 'logmein-gateway.com'
- 'logmein.com'
- 'logmeincdn.http.internapcdn.net'
- 'n-able.com'
- 'net.anydesk.com'
- 'netsupportsoftware.com' # For NetSupport Manager RAT
- 'parsecusercontent.com'
- 'pubsub.atera.com'
- 'relay.kaseya.net'
- 'relay.screenconnect.com'
- 'relay.splashtop.com'
- 'remoteassistance.support.services.microsoft.com' # Quick Assist Application
- 'remotedesktop-pa.googleapis.com'
- 'remoteutilities.com' # Usage of Remote Utilities RAT
- 'secure.logmeinrescue.com'
- 'services.vnc.com'
- 'static.remotepc.com'
- 'swi-rc.com'
- 'swi-tc.com'
- 'tailscale.com' # Scattered Spider threat group used this RMM tool
- 'telemetry.servers.qetqo.com'
- 'tmate.io'
- 'twingate.com' # Scattered Spider threat group used this RMM tool
- 'zohoassist.com'
selection_rustdesk: # https://twitter.com/malmoeb/status/1668504345132822531?s=20 and https://www.adamsdesk.com/posts/rustdesk-not-connecting/ mention this pattern
QueryName|endswith: '.rustdesk.com'
QueryName|startswith: 'rs-'
# Exclude browsers for legitimate visits of the domains mentioned above
# Add missing browsers you use and exclude the ones you don't
filter_optional_chrome:
Image:
- 'C:\Program Files\Google\Chrome\Application\chrome.exe'
- 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
filter_optional_firefox:
Image:
- 'C:\Program Files\Mozilla Firefox\firefox.exe'
- 'C:\Program Files (x86)\Mozilla Firefox\firefox.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_safari:
Image|endswith: '\safari.exe'
filter_optional_defender:
Image|endswith:
- '\MsMpEng.exe' # Microsoft Defender executable
- '\MsSense.exe' # Windows Defender Advanced Threat Protection Service Executable
filter_optional_brave:
Image|endswith: '\brave.exe'
Image|startswith: 'C:\Program Files\BraveSoftware\'
filter_optional_maxthon:
Image|contains: '\AppData\Local\Maxthon\'
Image|endswith: '\maxthon.exe'
filter_optional_opera:
Image|contains: '\AppData\Local\Programs\Opera\'
Image|endswith: '\opera.exe'
filter_optional_seamonkey:
Image|startswith:
- 'C:\Program Files\SeaMonkey\'
- 'C:\Program Files (x86)\SeaMonkey\'
Image|endswith: '\seamonkey.exe'
filter_optional_vivaldi:
Image|contains: '\AppData\Local\Vivaldi\'
Image|endswith: '\vivaldi.exe'
filter_optional_whale:
Image|startswith:
- 'C:\Program Files\Naver\Naver Whale\'
- 'C:\Program Files (x86)\Naver\Naver Whale\'
Image|endswith: '\whale.exe'
filter_optional_tor:
Image|contains: '\Tor Browser\'
filter_optional_whaterfox:
Image|startswith:
- 'C:\Program Files\Waterfox\'
- 'C:\Program Files (x86)\Waterfox\'
Image|endswith: '\Waterfox.exe'
filter_optional_midori:
Image|contains: '\AppData\Local\Programs\midori-ng\'
Image|endswith: '\Midori Next Generation.exe'
filter_optional_slimbrowser:
Image|startswith:
- 'C:\Program Files\SlimBrowser\'
- 'C:\Program Files (x86)\SlimBrowser\'
Image|endswith: '\slimbrowser.exe'
filter_optional_flock:
Image|contains: '\AppData\Local\Flock\'
Image|endswith: '\Flock.exe'
filter_optional_phoebe:
Image|contains: '\AppData\Local\Phoebe\'
Image|endswith: '\Phoebe.exe'
filter_optional_falkon:
Image|startswith:
- 'C:\Program Files\Falkon\'
- 'C:\Program Files (x86)\Falkon\'
Image|endswith: '\falkon.exe'
filter_optional_avant:
Image|startswith:
- 'C:\Program Files (x86)\Avant Browser\'
- 'C:\Program Files\Avant Browser\'
Image|endswith: '\avant.exe'
condition: 1 of selection_* and not 1 of filter_optional_*
falsepositives:
- Likely with other browser software. Apply additional filters for any other browsers you might use.
level: medium
regression_tests_path: regression_data/rules/windows/dns_query/dns_query_win_remote_access_software_domains_non_browsers/info.yml
Stages and Predicates
Stage 0: condition
1 of selection_* and not 1 of filter_optional_*Stage 1: selection_generic
selection_generic:
QueryName|endswith:
- 'agent.jumpcloud.com'
- 'agentreporting.atera.com'
- 'ammyy.com'
- 'api.parsec.app'
- 'api.playanext.com'
- 'api.splashtop.com'
- 'app.atera.com'
- 'assist.zoho.com'
- 'authentication.logmeininc.com'
- 'beyondtrustcloud.com'
- 'cdn.kaseya.net'
- 'client.teamviewer.com'
- 'comserver.corporate.beanywhere.com'
- 'control.connectwise.com'
- 'downloads.zohocdn.com'
- 'dwservice.net'
- 'express.gotoassist.com'
- 'getgo.com'
- 'getscreen.me'
- 'integratedchat.teamviewer.com'
- 'join.zoho.com'
- 'kickstart.jumpcloud.com'
- 'license.bomgar.com'
- 'logmein-gateway.com'
- 'logmein.com'
- 'logmeincdn.http.internapcdn.net'
- 'n-able.com'
- 'net.anydesk.com'
- 'netsupportsoftware.com'
- 'parsecusercontent.com'
- 'pubsub.atera.com'
- 'relay.kaseya.net'
- 'relay.screenconnect.com'
- 'relay.splashtop.com'
- 'remoteassistance.support.services.microsoft.com'
- 'remotedesktop-pa.googleapis.com'
- 'remoteutilities.com'
- 'secure.logmeinrescue.com'
- 'services.vnc.com'
- 'static.remotepc.com'
- 'swi-rc.com'
- 'swi-tc.com'
- 'tailscale.com'
- 'telemetry.servers.qetqo.com'
- 'tmate.io'
- 'twingate.com'
- 'zohoassist.com'
Stage 2: selection_rustdesk
selection_rustdesk:
QueryName|endswith: '.rustdesk.com'
QueryName|startswith: 'rs-'
Stage 3: not filter_optional_*
filter_optional_chrome:
Image:
- 'C:\Program Files\Google\Chrome\Application\chrome.exe'
- 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
filter_optional_firefox:
Image:
- 'C:\Program Files\Mozilla Firefox\firefox.exe'
- 'C:\Program Files (x86)\Mozilla Firefox\firefox.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_safari:
Image|endswith: '\safari.exe'
filter_optional_defender:
Image|endswith:
- '\MsMpEng.exe'
- '\MsSense.exe'
filter_optional_brave:
Image|endswith: '\brave.exe'
Image|startswith: 'C:\Program Files\BraveSoftware\'
filter_optional_maxthon:
Image|contains: '\AppData\Local\Maxthon\'
Image|endswith: '\maxthon.exe'
filter_optional_opera:
Image|contains: '\AppData\Local\Programs\Opera\'
Image|endswith: '\opera.exe'
filter_optional_seamonkey:
Image|startswith:
- 'C:\Program Files\SeaMonkey\'
- 'C:\Program Files (x86)\SeaMonkey\'
Image|endswith: '\seamonkey.exe'
filter_optional_vivaldi:
Image|contains: '\AppData\Local\Vivaldi\'
Image|endswith: '\vivaldi.exe'
filter_optional_whale:
Image|startswith:
- 'C:\Program Files\Naver\Naver Whale\'
- 'C:\Program Files (x86)\Naver\Naver Whale\'
Image|endswith: '\whale.exe'
filter_optional_tor:
Image|contains: '\Tor Browser\'
filter_optional_whaterfox:
Image|startswith:
- 'C:\Program Files\Waterfox\'
- 'C:\Program Files (x86)\Waterfox\'
Image|endswith: '\Waterfox.exe'
filter_optional_midori:
Image|contains: '\AppData\Local\Programs\midori-ng\'
Image|endswith: '\Midori Next Generation.exe'
filter_optional_slimbrowser:
Image|startswith:
- 'C:\Program Files\SlimBrowser\'
- 'C:\Program Files (x86)\SlimBrowser\'
Image|endswith: '\slimbrowser.exe'
filter_optional_flock:
Image|contains: '\AppData\Local\Flock\'
Image|endswith: '\Flock.exe'
filter_optional_phoebe:
Image|contains: '\AppData\Local\Phoebe\'
Image|endswith: '\Phoebe.exe'
filter_optional_falkon:
Image|startswith:
- 'C:\Program Files\Falkon\'
- 'C:\Program Files (x86)\Falkon\'
Image|endswith: '\falkon.exe'
filter_optional_avant:
Image|startswith:
- 'C:\Program Files (x86)\Avant Browser\'
- 'C:\Program Files\Avant Browser\'
Image|endswith: '\avant.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
QueryName | ends_with |
| field:"QueryName" kind:ends_with |
QueryName | starts_with |
| field:"QueryName" kind:starts_with value:"rs-" |
Exclusions
The rule actively suppresses these predicates.
Exchange server impersonation via PrivExchange relay attack
#Detects scenarios where an attacker relays Exchange server authentication to abuse Exchange servers permissions and escalate privileges.
Known False Positives
- None
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4624: An account was successfully logged on. |
Rule Body
title: Exchange server impersonation via PrivExchange relay attack
description: Detects scenarios where an attacker relays Exchange server authentication to abuse Exchange servers permissions and escalate privileges.
references:
- https://dirkjanm.io/abusing-exchange-one-api-call-away-from-domain-admin/
- https://twitter.com/_dirkjan/status/1091632489561575424?s=20
tags:
- attack.credential_access
- attack.t1557.001
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: security
detection:
selection:
EventID: 4624
AuthenticationPackageName: NTLM
LogonProcessName: NtLmSsp
LogonType: 3
Computer: '%domain_controllers%' # Logon event has to be generated on a DC
TargetUserName: # Exchange server HOSTNAMES list + "$"
- SRVEXCH01$
- SRVEXCH02$
- SRVEXCH03$
filter:
IpAddress: '%exchange_server_ips%' # Source has to be attacker relay
condition: selection and not filter
falsepositives:
- None
level: high
Stages and Predicates
Stage 0: condition
selection and not filterStage 1: selection
selection:
EventID: 4624
AuthenticationPackageName: NTLM
LogonProcessName: NtLmSsp
LogonType: 3
Computer: '%domain_controllers%'
TargetUserName:
- SRVEXCH01$
- SRVEXCH02$
- SRVEXCH03$
Stage 2: not filter
filter:
IpAddress: '%exchange_server_ips%'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
AuthenticationPackageName | eq |
| field:"AuthenticationPackageName" kind:eq value:"NTLM" |
Computer | eq |
| field:"Computer" kind:eq value:"%domain_controllers%" |
LogonProcessName | eq |
| field:"LogonProcessName" kind:eq value:"NtLmSsp" |
LogonType | eq |
| field:"LogonType" kind:eq value:"3" |
TargetUserName | eq |
| field:"TargetUserName" kind:eq |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
IpAddress | eq | %exchange_server_ips% | excludes:IpAddress field:"IpAddress" value:"%exchange_server_ips%" |
Firewall deactivation (firewall)
#Detects scenarios where an attacker disabled the Windows Firewall to evade defense.
Known False Positives
- Administrator activity
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
Rule Body
title: Firewall deactivation (firewall)
description: Detects scenarios where an attacker disabled the Windows Firewall to evade defense.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0005-Defense%20Evasion/T1562.004-Impair%20Defenses-Disable%20or%20Modify%20System%20Firewall
- https://www.winhelponline.com/blog/enable-and-disable-windows-firewall-quickly-using-command-line/
tags:
- attack.defense_evasion
- attack.t1562.004
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: firewall-as
detection:
selection_advanced: # Avanced ID provides the SID of the Subject User
Channel: 'Microsoft-Windows-Windows Firewall With Advanced Security/Firewall'
EventID: 2003 # Firewall setting has changed.
SettingType: '1' # Enable Windows Firewall
SettingValueString: 'No' # Enable Windows Firewall > No
selection_basic:
EventID: 4950 # MPSSVC Rule-Level Policy Change
SettingType: 'Enable Windows Firewall'
SettingValue: 'No' # Enable Windows Firewall
condition: selection_advanced or selection_basic
falsepositives:
- Administrator activity
level: high
Stages and Predicates
Stage 0: condition
selection_advanced or selection_basicStage 1: selection_advanced
selection_advanced:
Channel: 'Microsoft-Windows-Windows Firewall With Advanced Security/Firewall'
EventID: 2003
SettingType: '1'
SettingValueString: 'No'
Stage 2: selection_basic
selection_basic:
EventID: 4950
SettingType: 'Enable Windows Firewall'
SettingValue: 'No'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
SettingType | eq |
| field:"SettingType" kind:eq |
SettingValue | eq |
| field:"SettingValue" kind:eq value:"No" |
SettingValueString | eq |
| field:"SettingValueString" kind:eq value:"No" |
HackTool - SysmonEOP Execution
#Detects the execution of the PoC that can be used to exploit Sysmon CVE-2022-41120
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: HackTool - SysmonEOP Execution
id: 8a7e90c5-fe6e-45dc-889e-057fe4378bd9
status: test
description: Detects the execution of the PoC that can be used to exploit Sysmon CVE-2022-41120
references:
- https://github.com/Wh04m1001/SysmonEoP
author: Florian Roth (Nextron Systems)
date: 2022-12-04
modified: 2024-11-23
tags:
- cve.2022-41120
- attack.t1068
- attack.privilege-escalation
logsource:
category: process_creation
product: windows
detection:
selection_img:
Image|endswith: '\SysmonEOP.exe'
selection_hash:
Hashes|contains:
- 'IMPHASH=22F4089EB8ABA31E1BB162C6D9BF72E5'
- 'IMPHASH=5123FA4C4384D431CD0D893EEB49BBEC'
condition: 1 of selection_*
falsepositives:
- Unlikely
level: critical
Stages and Predicates
Stage 0: condition
1 of selection_*Stage 1: selection_img
selection_img:
Image|endswith: '\SysmonEOP.exe'
Stage 2: selection_hash
selection_hash:
Hashes|contains:
- 'IMPHASH=22F4089EB8ABA31E1BB162C6D9BF72E5'
- 'IMPHASH=5123FA4C4384D431CD0D893EEB49BBEC'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Hashes | match |
| field:"Hashes" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with value:"\SysmonEOP.exe" |
Invoke-Obfuscation Via Use Rundll32 - PowerShell Module
#Detects Obfuscated Powershell via use Rundll32 in Scripts
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4103: Payload Context: ContextInfo User Data: UserData. |
Rule Body
title: Invoke-Obfuscation Via Use Rundll32 - PowerShell Module
id: 88a22f69-62f9-4b8a-aa00-6b0212f2f05a
related:
- id: a5a30a6e-75ca-4233-8b8c-42e0f2037d3b
type: derived
status: test
description: Detects Obfuscated Powershell via use Rundll32 in Scripts
references:
- https://github.com/SigmaHQ/sigma/issues/1009
author: Nikita Nazarov, oscd.community
date: 2019-10-08
modified: 2022-11-29
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: ps_module
definition: 0ad03ef1-f21b-4a79-8ce8-e6900c54b65b
detection:
selection_4103:
Payload|contains|all:
- '&&'
- 'rundll32'
- 'shell32.dll'
- 'shellexec_rundll'
Payload|contains:
- 'value'
- 'invoke'
- 'comspec'
- 'iex'
condition: selection_4103
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selection_4103Stage 1: selection_4103
selection_4103:
Payload|contains|all:
- '&&'
- 'rundll32'
- 'shell32.dll'
- 'shellexec_rundll'
Payload|contains:
- 'value'
- 'invoke'
- 'comspec'
- 'iex'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Payload | match |
| field:"Payload" kind:match |
macOS LaunchAgent/LaunchDaemon Persistence
#Detects creation or modification of LaunchAgent or LaunchDaemon plist files, which are commonly used for persistence on macOS. Attackers may create or modify these to execute malicious code at login or system startup.
Known False Positives
- Legitimate software installation
- System updates
- Enterprise management tools
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Rule Body
title: macOS LaunchAgent/LaunchDaemon Persistence
id: b2c3d4e5-f6a7-4890-bcde-f01234567890
status: experimental
description: |
Detects creation or modification of LaunchAgent or LaunchDaemon plist files,
which are commonly used for persistence on macOS. Attackers may create or modify
these to execute malicious code at login or system startup.
references:
- https://attack.mitre.org/techniques/T1543/001/
- https://www.sentinelone.com/blog/how-malware-persists-on-macos/
author: Eric Brown - Nebulock, Inc.
date: 2025/01/22
modified: 2025/01/22
logsource:
product: macos
service: unifiedlog
detection:
selection_subsystem:
subsystem: com.apple.launchd
selection_persistence:
message|contains:
- 'LaunchAgent'
- 'LaunchDaemon'
- 'loaded'
- 'submitted'
- 'bootstrap'
selection_paths:
message|contains:
- '/Library/LaunchAgents'
- '/Library/LaunchDaemons'
- '~/Library/LaunchAgents'
- '/System/Library/LaunchAgents'
- '/System/Library/LaunchDaemons'
filter_system:
message|contains:
- 'com.apple.'
condition: selection_subsystem and (selection_persistence or selection_paths) and not filter_system
falsepositives:
- Legitimate software installation
- System updates
- Enterprise management tools
level: medium
tags:
- attack.persistence
- attack.t1543.001
Stages and Predicates
Stage 0: condition
selection_subsystem and (selection_persistence or selection_paths) and not filter_systemStage 1: selection_subsystem
selection_subsystem:
subsystem: com.apple.launchd
Stage 2: selection_persistence
selection_persistence:
message|contains:
- 'LaunchAgent'
- 'LaunchDaemon'
- 'loaded'
- 'submitted'
- 'bootstrap'
Stage 3: selection_paths
selection_paths:
message|contains:
- '/Library/LaunchAgents'
- '/Library/LaunchDaemons'
- '~/Library/LaunchAgents'
- '/System/Library/LaunchAgents'
- '/System/Library/LaunchDaemons'
Stage 4: not filter_system
filter_system:
message|contains:
- 'com.apple.'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
message | match |
| field:"message" kind:match |
subsystem | eq |
| field:"subsystem" kind:eq value:"com.apple.launchd" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
message | match | com.apple. | excludes:message field:"message" value:"com.apple." |
Metasploit reverse shell injection in SQL Server
#Detects scenarios where an attacker inject a payload into SQL Server in order to obtain a remote shell.
Known False Positives
- none
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: Metasploit reverse shell injection in SQL Server
description: Detects scenarios where an attacker inject a payload into SQL Server in order to obtain a remote shell.
references:
- https://www.offensive-security.com/metasploit-unleashed/payloads-mssql/#
tags:
- attack.execution
- attack.t1059.003
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: process_creation
detection:
selection:
#Version: 2 # applies to ID 4688 where parent process name is available starting Windows 10 / Server 2016 and higher
ParentProcessName|endswith: '\sqlservr.exe'
NewProcessName|endswith:
- \cmd.exe
- \powershell.exe
- \pwsh.exe # PowerShell v6
CommandLine|contains|all:
- cmd
- echo
CommandLine|contains:
- /c
- -c
condition: selection
falsepositives:
- none
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ParentProcessName|endswith: '\sqlservr.exe'
NewProcessName|endswith:
- \cmd.exe
- \powershell.exe
- \pwsh.exe
CommandLine|contains|all:
- cmd
- echo
CommandLine|contains:
- /c
- -c
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
NewProcessName | ends_with |
| field:"Image" kind:ends_with |
ParentProcessName | ends_with |
| field:"parent_process_name" kind:ends_with value:"\sqlservr.exe" |
MMC Loading Script Engines DLLs
#Detects when the Microsoft Management Console (MMC) loads the DLL libraries like vbscript, jscript etc which might indicate an attempt to execute malicious scripts within a trusted system process for bypassing application whitelisting or defense evasion.
Known False Positives
- Legitimate MMC operations or extensions loading these libraries
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 7: Image loaded |
Rule Body
title: MMC Loading Script Engines DLLs
id: a9c73e8b-3b2d-4c45-8ef2-5f9a9c9998ad
status: experimental
description: |
Detects when the Microsoft Management Console (MMC) loads the DLL libraries like vbscript, jscript etc which might indicate an attempt
to execute malicious scripts within a trusted system process for bypassing application whitelisting or defense evasion.
references:
- https://tria.ge/241015-l98snsyeje/behavioral2
- https://www.elastic.co/security-labs/grimresource
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-02-05
tags:
- attack.execution
- attack.stealth
- attack.t1059.005
- attack.t1218.014
logsource:
category: image_load
product: windows
detection:
selection:
Image|endswith: '\mmc.exe'
ImageLoaded|endswith:
- '\vbscript.dll'
- '\jscript.dll'
- '\jscript9.dll'
condition: selection
falsepositives:
- Legitimate MMC operations or extensions loading these libraries
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image|endswith: '\mmc.exe'
ImageLoaded|endswith:
- '\vbscript.dll'
- '\jscript.dll'
- '\jscript9.dll'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with value:"\mmc.exe" |
ImageLoaded | ends_with |
| field:"ImageLoaded" kind:ends_with |
Moriya Rootkit File Created
#Detects the creation of a file named "MoriyaStreamWatchmen.sys" in a specific location. This filename was reported to be related to the Moriya rootkit as described in the securelist's Operation TunnelSnake report.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: Moriya Rootkit File Created
id: a1507d71-0b60-44f6-b17c-bf53220fdd88
related:
- id: 25b9c01c-350d-4b95-bed1-836d04a4f324
type: derived
status: test
description: Detects the creation of a file named "MoriyaStreamWatchmen.sys" in a specific location. This filename was reported to be related to the Moriya rootkit as described in the securelist's Operation TunnelSnake report.
references:
- https://securelist.com/operation-tunnelsnake-and-moriya-rootkit/101831
author: Bhabesh Raj
date: 2021-05-06
modified: 2023-05-05
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1543.003
- detection.emerging-threats
logsource:
product: windows
category: file_event
detection:
selection:
TargetFilename: 'C:\Windows\System32\drivers\MoriyaStreamWatchmen.sys'
condition: selection
falsepositives:
- Unknown
level: critical
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetFilename: 'C:\Windows\System32\drivers\MoriyaStreamWatchmen.sys'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | eq |
| field:"TargetFilename" kind:eq value:"C:\Windows\System32\drivers\MoriyaStreamWatchmen.sys" |
New Firewall Rule Added In Windows Firewall Exception List Via WmiPrvSE.EXE
#Detects the addition of a new "Allow" firewall rule by the WMI process (WmiPrvSE.EXE). This can occur if an attacker leverages PowerShell cmdlets such as "New-NetFirewallRule", or directly uses WMI CIM classes such as "MSFT_NetFirewallRule".
Known False Positives
- Administrator scripts or activity.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
Rule Body
title: New Firewall Rule Added In Windows Firewall Exception List Via WmiPrvSE.EXE
id: eca81e8d-09e1-4d04-8614-c91f44fd0519
status: test
description: |
Detects the addition of a new "Allow" firewall rule by the WMI process (WmiPrvSE.EXE).
This can occur if an attacker leverages PowerShell cmdlets such as "New-NetFirewallRule", or directly uses WMI CIM classes such as "MSFT_NetFirewallRule".
references:
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.004/T1562.004.md#atomic-test-24---set-a-firewall-rule-using-new-netfirewallrule
- https://malware.news/t/the-rhysida-ransomware-activity-analysis-and-ties-to-vice-society/72170
- https://cybersecuritynews.com/rhysida-ransomware-attacking-windows/
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2024-05-10
tags:
- attack.defense-impairment
- attack.t1686.003
logsource:
product: windows
service: firewall-as
detection:
selection:
EventID:
- 2004 # A rule has been added to the Windows Defender Firewall exception list
- 2071 # A rule has been added to the Windows Defender Firewall exception list. (Windows 11)
- 2097
Action: 3 # Allow
ModifyingApplication|endswith: ':\Windows\System32\wbem\WmiPrvSE.exe'
condition: selection
falsepositives:
- Administrator scripts or activity.
level: medium
regression_tests_path: regression_data/rules/windows/builtin/firewall_as/win_firewall_as_add_rule_wmiprvse/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventID:
- 2004
- 2071
- 2097
Action: 3
ModifyingApplication|endswith: ':\Windows\System32\wbem\WmiPrvSE.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Action | eq |
| field:"Action" kind:eq value:"3" |
ModifyingApplication | ends_with |
| field:"ModifyingApplication" kind:ends_with value:":\Windows\System32\wbem\WmiPrvSE.exe" |
NTLMv1 Logon Between Client and Server
#Detects the reporting of NTLMv1 being used between a client and server. NTLMv1 is insecure as the underlying encryption algorithms can be brute-forced by modern hardware.
Known False Positives
- Environments that use NTLMv1
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Telemetry Coverage
Rule Body
title: NTLMv1 Logon Between Client and Server
id: e9d4ab66-a532-4ef7-a502-66a9e4a34f5d
status: test
description: Detects the reporting of NTLMv1 being used between a client and server. NTLMv1 is insecure as the underlying encryption algorithms can be brute-forced by modern hardware.
references:
- https://github.com/nasbench/EVTX-ETW-Resources/blob/f1b010ce0ee1b71e3024180de1a3e67f99701fe4/ETWProvidersManifests/Windows10/22H2/W10_22H2_Pro_20230321_19045.2728/WEPExplorer/LsaSrv.xml
author: Tim Shelton, Nasreddine Bencherchali (Nextron Systems)
date: 2022-04-26
modified: 2023-06-06
tags:
- attack.lateral-movement
- attack.t1550.002
logsource:
product: windows
service: system
detection:
selection:
Provider_Name: "LsaSrv"
EventID:
- 6038
- 6039
condition: selection
falsepositives:
- Environments that use NTLMv1
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Provider_Name: "LsaSrv"
EventID:
- 6038
- 6039
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Provider_Name | eq |
| field:"Provider_Name" kind:eq value:"LsaSrv" |
Operation Wocao Activity
#Detects activity mentioned in Operation Wocao report
Known False Positives
- Administrators that use checkadmin.exe tool to enumerate local administrators
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Persistence | |
| Privilege Escalation | |
| Stealth | |
| Discovery |
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: Operation Wocao Activity
id: 1cfac73c-be78-4f9a-9b08-5bde0c3953ab
related:
- id: 74ad4314-482e-4c3e-b237-3f7ed3b9ca8d
type: derived
status: test
description: Detects activity mentioned in Operation Wocao report
references:
- https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/
- https://twitter.com/SBousseaden/status/1207671369963646976
author: Florian Roth (Nextron Systems), frack113
date: 2019-12-20
modified: 2022-10-09
tags:
- attack.privilege-escalation
- attack.persistence
- attack.discovery
- attack.stealth
- attack.t1012
- attack.t1036.004
- attack.t1027
- attack.execution
- attack.t1053.005
- attack.t1059.001
- detection.emerging-threats
logsource:
category: process_creation
product: windows
definition: The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697
detection:
selection:
CommandLine|contains:
- 'checkadmin.exe 127.0.0.1 -all'
- 'netsh advfirewall firewall add rule name=powershell dir=in'
- 'cmd /c powershell.exe -ep bypass -file c:\s.ps1'
- '/tn win32times /f'
- 'create win32times binPath='
- '\c$\windows\system32\devmgr.dll'
- ' -exec bypass -enc JgAg'
- 'type *keepass\KeePass.config.xml'
- 'iie.exe iie.txt'
- 'reg query HKEY_CURRENT_USER\Software\\*\PuTTY\Sessions\'
condition: selection
falsepositives:
- Administrators that use checkadmin.exe tool to enumerate local administrators
level: high
regression_tests_path: regression_data/rules-emerging-threats/2019/TA/Operation-Wocao/proc_creation_win_apt_wocao/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|contains:
- 'checkadmin.exe 127.0.0.1 -all'
- 'netsh advfirewall firewall add rule name=powershell dir=in'
- 'cmd /c powershell.exe -ep bypass -file c:\s.ps1'
- '/tn win32times /f'
- 'create win32times binPath='
- '\c$\windows\system32\devmgr.dll'
- ' -exec bypass -enc JgAg'
- 'type *keepass\KeePass.config.xml'
- 'iie.exe iie.txt'
- 'reg query HKEY_CURRENT_USER\Software\\*\PuTTY\Sessions\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
PIM Alert Setting Changes To Disabled
#Detects when PIM alerts are set to disabled.
Known False Positives
- Administrator disabling PIM alerts as an active choice.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Azure | Disable PIM alert |
Rule Body
title: PIM Alert Setting Changes To Disabled
id: aeaef14c-e5bf-4690-a9c8-835caad458bd
status: test
description: Detects when PIM alerts are set to disabled.
references:
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-privileged-identity-management#azure-ad-roles-assignment
author: Mark Morowczynski '@markmorow', Yochana Henderson, '@Yochana-H'
date: 2022-08-09
tags:
- attack.initial-access
- attack.persistence
- attack.privilege-escalation
- attack.stealth
- attack.t1078
logsource:
product: azure
service: auditlogs
detection:
selection:
properties.message: Disable PIM Alert
condition: selection
falsepositives:
- Administrator disabling PIM alerts as an active choice.
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
properties.message: Disable PIM Alert
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
properties.message | eq |
| field:"properties.message" kind:eq value:"Disable PIM Alert" |
Potential Binary Proxy Execution Via VSDiagnostics.EXE
#Detects execution of "VSDiagnostics.exe" with the "start" command in order to launch and proxy arbitrary binaries.
Known False Positives
- Legitimate usage for tracing and diagnostics purposes
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Potential Binary Proxy Execution Via VSDiagnostics.EXE
id: ac1c92b4-ac81-405a-9978-4604d78cc47e
status: test
description: Detects execution of "VSDiagnostics.exe" with the "start" command in order to launch and proxy arbitrary binaries.
references:
- https://twitter.com/0xBoku/status/1679200664013135872
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-08-03
tags:
- attack.stealth
- attack.t1218
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\VSDiagnostics.exe'
- OriginalFileName: 'VSDiagnostics.exe'
selection_cli_start:
CommandLine|contains: 'start'
selection_cli_launch:
CommandLine|contains:
- ' /launch:'
- ' -launch:'
condition: all of selection_*
falsepositives:
- Legitimate usage for tracing and diagnostics purposes
level: medium
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Image|endswith: '\VSDiagnostics.exe'
- OriginalFileName: 'VSDiagnostics.exe'
Stage 2: selection_cli_start
selection_cli_start:
CommandLine|contains: 'start'
Stage 3: selection_cli_launch
selection_cli_launch:
CommandLine|contains:
- ' /launch:'
- ' -launch:'
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:"\VSDiagnostics.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"VSDiagnostics.exe" |
Potential Chrome Frame Helper DLL Sideloading
#Detects potential DLL sideloading of "chrome_frame_helper.dll"
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 7: Image loaded |
Rule Body
title: Potential Chrome Frame Helper DLL Sideloading
id: 72ca7c75-bf85-45cd-aca7-255d360e423c
status: test
description: Detects potential DLL sideloading of "chrome_frame_helper.dll"
references:
- https://hijacklibs.net/entries/3rd_party/google/chrome_frame_helper.html
author: Nasreddine Bencherchali (Nextron Systems), Wietze Beukema (project and research)
date: 2022-08-17
modified: 2023-05-15
tags:
- attack.persistence
- attack.privilege-escalation
- attack.execution
- attack.stealth
- attack.t1574.001
logsource:
category: image_load
product: windows
detection:
selection:
ImageLoaded|endswith: '\chrome_frame_helper.dll'
filter_main_path:
ImageLoaded|startswith:
- 'C:\Program Files\Google\Chrome\Application\'
- 'C:\Program Files (x86)\Google\Chrome\Application\'
filter_optional_user_path:
ImageLoaded|contains: '\AppData\local\Google\Chrome\Application\'
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:
ImageLoaded|endswith: '\chrome_frame_helper.dll'
Stage 2: not filter_main_path
filter_main_path:
ImageLoaded|startswith:
- 'C:\Program Files\Google\Chrome\Application\'
- 'C:\Program Files (x86)\Google\Chrome\Application\'
Stage 3: not filter_optional_user_path
filter_optional_user_path:
ImageLoaded|contains: '\AppData\local\Google\Chrome\Application\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImageLoaded | ends_with |
| field:"ImageLoaded" kind:ends_with value:"\chrome_frame_helper.dll" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
ImageLoaded | starts_with | C:\Program Files (x86)\Google\Chrome\Application\ | excludes:ImageLoaded field:"ImageLoaded" value:"C:\Program Files (x86)\Google\Chrome\Application\" |
ImageLoaded | starts_with | C:\Program Files\Google\Chrome\Application\ | excludes:ImageLoaded field:"ImageLoaded" value:"C:\Program Files\Google\Chrome\Application\" |
ImageLoaded | match | \AppData\local\Google\Chrome\Application\ | excludes:ImageLoaded field:"ImageLoaded" value:"\AppData\local\Google\Chrome\Application\" |
Potential Configuration And Service Reconnaissance Via Reg.EXE
#Detects the usage of "reg.exe" in order to query reconnaissance information from the registry. Adversaries may interact with the Windows registry to gather information about credentials, the system, configuration, and installed software.
Known False Positives
- Discord
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Potential Configuration And Service Reconnaissance Via Reg.EXE
id: 970007b7-ce32-49d0-a4a4-fbef016950bd
status: test
description: Detects the usage of "reg.exe" in order to query reconnaissance information from the registry. Adversaries may interact with the Windows registry to gather information about credentials, the system, configuration, and installed software.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1012/T1012.md
author: Timur Zinniatullin, oscd.community
date: 2019-10-21
modified: 2023-02-05
tags:
- attack.discovery
- attack.t1012
- attack.t1007
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\reg.exe'
- OriginalFileName: 'reg.exe'
selection_flag:
CommandLine|contains: 'query'
selection_key:
CommandLine|contains:
- 'currentVersion\windows'
- 'winlogon\'
- 'currentVersion\shellServiceObjectDelayLoad'
- 'currentVersion\run' # Also covers the strings "RunOnce", "RunOnceEx" and "runServicesOnce"
- 'currentVersion\policies\explorer\run'
- 'currentcontrolset\services'
condition: all of selection_*
falsepositives:
- Discord
level: medium
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Image|endswith: '\reg.exe'
- OriginalFileName: 'reg.exe'
Stage 2: selection_flag
selection_flag:
CommandLine|contains: 'query'
Stage 3: selection_key
selection_key:
CommandLine|contains:
- 'currentVersion\windows'
- 'winlogon\'
- 'currentVersion\shellServiceObjectDelayLoad'
- 'currentVersion\run'
- 'currentVersion\policies\explorer\run'
- 'currentcontrolset\services'
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:"\reg.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"reg.exe" |
Potential CVE-2021-26857 Exploitation Attempt
#Detects possible successful exploitation for vulnerability described in CVE-2021-26857 by looking for | abnormal subprocesses spawning by Exchange Server's Unified Messaging service
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: Potential CVE-2021-26857 Exploitation Attempt
id: cd479ccc-d8f0-4c66-ba7d-e06286f3f887
status: stable
description: Detects possible successful exploitation for vulnerability described in CVE-2021-26857 by looking for | abnormal subprocesses spawning by Exchange Server's Unified Messaging service
references:
- https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/
author: Bhabesh Raj
date: 2021-03-03
modified: 2023-02-07
tags:
- attack.t1203
- attack.execution
- cve.2021-26857
- detection.emerging-threats
logsource:
category: process_creation
product: windows
detection:
selection:
ParentImage|endswith: '\UMWorkerProcess.exe'
filter:
Image|endswith:
- 'wermgr.exe'
- 'WerFault.exe'
condition: selection and not filter
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selection and not filterStage 1: selection
selection:
ParentImage|endswith: '\UMWorkerProcess.exe'
Stage 2: not filter
filter:
Image|endswith:
- 'wermgr.exe'
- 'WerFault.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with value:"\UMWorkerProcess.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Image | ends_with | WerFault.exe | excludes:Image field:"Image" value:"WerFault.exe" |
Image | ends_with | wermgr.exe | excludes:Image field:"Image" value:"wermgr.exe" |
Potential CVE-2022-29072 Exploitation Attempt
#Detects potential exploitation attempts of CVE-2022-29072, a 7-Zip privilege escalation and command execution vulnerability. 7-Zip version 21.07 and earlier on Windows allows privilege escalation (CVE-2022-29072) and command execution when a file with the .7z extension is dragged to the Help>Contents area. This is caused by misconfiguration of 7z.dll and a heap overflow. The command runs in a child process under the 7zFM.exe process.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Potential CVE-2022-29072 Exploitation Attempt
id: 9a4ccd1a-3526-4d99-b980-9f9c5d3a6ee3
status: test
description: |
Detects potential exploitation attempts of CVE-2022-29072, a 7-Zip privilege escalation and command execution vulnerability.
7-Zip version 21.07 and earlier on Windows allows privilege escalation (CVE-2022-29072) and command execution when a file with the .7z extension is dragged to the Help>Contents area. This is caused by misconfiguration of 7z.dll and a heap overflow.
The command runs in a child process under the 7zFM.exe process.
references:
- https://github.com/kagancapar/CVE-2022-29072
- https://twitter.com/kagancapar/status/1515219358234161153
author: frack113, @kostastsale
date: 2022-04-17
modified: 2024-08-15
tags:
- attack.execution
- cve.2022-29072
- detection.emerging-threats
logsource:
product: windows
category: process_creation
detection:
selection_parent:
ParentImage|endswith: '\7zFM.exe'
selection_img:
- Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'Cmd.Exe'
- 'PowerShell.EXE'
- 'pwsh.dll'
filter_main_extensions_and_flags:
- CommandLine|contains:
- ' /c '
- ' /k '
- ' /r '
- CommandLine|endswith:
- '.bat'
- '.cmd'
- '.ps1'
filter_main_null:
CommandLine: null
condition: all of selection_* and not 1 of filter_main_*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
all of selection_* and not 1 of filter_main_*Stage 1: selection_parent
selection_parent:
ParentImage|endswith: '\7zFM.exe'
Stage 2: selection_img
selection_img:
- Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'Cmd.Exe'
- 'PowerShell.EXE'
- 'pwsh.dll'
Stage 3: not filter_main_*
filter_main_extensions_and_flags:
- CommandLine|contains:
- ' /c '
- ' /k '
- ' /r '
- CommandLine|endswith:
- '.bat'
- '.cmd'
- '.ps1'
filter_main_null:
CommandLine: null
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with value:"\7zFM.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
CommandLine | ends_with | .bat | excludes:CommandLine field:"CommandLine" value:".bat" |
CommandLine | ends_with | .cmd | excludes:CommandLine field:"CommandLine" value:".cmd" |
CommandLine | ends_with | .ps1 | excludes:CommandLine field:"CommandLine" value:".ps1" |
CommandLine | is_null | excludes:CommandLine | |
CommandLine | match | /c | excludes:CommandLine field:"CommandLine" value:" /c " |
CommandLine | match | /k | excludes:CommandLine field:"CommandLine" value:" /k " |
CommandLine | match | /r | excludes:CommandLine field:"CommandLine" value:" /r " |
Potential Meterpreter/CobaltStrike Activity
#Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting a specific service starting
Known False Positives
- Commandlines containing components like cmd accidentally
- Jobs and services started with cmd
MITRE ATT&CK Coverage
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 Meterpreter/CobaltStrike Activity
id: 15619216-e993-4721-b590-4c520615a67d
status: test
description: Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting a specific service starting
references:
- https://speakerdeck.com/heirhabarov/hunting-for-privilege-escalation-in-windows-environment
- https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/
author: Teymur Kheirkhabarov, Ecco, Florian Roth
date: 2019-10-26
modified: 2023-02-05
tags:
- attack.privilege-escalation
- attack.stealth
- attack.t1134.001
- attack.t1134.002
logsource:
category: process_creation
product: windows
detection:
selection_img:
ParentImage|endswith: '\services.exe'
selection_technique_1:
# Examples:
# Meterpreter getsystem technique 1: cmd.exe /c echo 559891bb017 > \\.\pipe\5e120a
# CobaltStrike getsystem technique 1b (expanded env var): %COMSPEC% /c echo 559891bb017 > \\.\pipe\5e120a
# CobaltStrike getsystem technique 1: %COMSPEC% /c echo 559891bb017 > \\.\pipe\5e120a
CommandLine|contains|all:
- '/c'
- 'echo'
- '\pipe\'
CommandLine|contains:
- 'cmd'
- '%COMSPEC%'
selection_technique_2:
# meterpreter getsystem technique 2: rundll32.exe C:\Users\test\AppData\Local\Temp\tmexsn.dll,a /p:tmexsn
CommandLine|contains|all:
- 'rundll32'
- '.dll,a'
- '/p:'
filter_defender:
CommandLine|contains: 'MpCmdRun'
condition: selection_img and 1 of selection_technique_* and not 1 of filter_*
falsepositives:
- Commandlines containing components like cmd accidentally
- Jobs and services started with cmd
level: high
Stages and Predicates
Stage 0: condition
selection_img and 1 of selection_technique_* and not 1 of filter_*Stage 1: selection_img
selection_img:
ParentImage|endswith: '\services.exe'
Stage 2: selection_technique_1
selection_technique_1:
CommandLine|contains|all:
- '/c'
- 'echo'
- '\pipe\'
CommandLine|contains:
- 'cmd'
- '%COMSPEC%'
Stage 3: selection_technique_2
selection_technique_2:
CommandLine|contains|all:
- 'rundll32'
- '.dll,a'
- '/p:'
Stage 4: not filter_defender
filter_defender:
CommandLine|contains: 'MpCmdRun'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with value:"\services.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
CommandLine | match | MpCmdRun | excludes:CommandLine field:"CommandLine" value:"MpCmdRun" |
Potential Persistence Via Excel Add-in - Registry
#Detect potential persistence via the creation of an excel add-in (XLL) file to make it run automatically when Excel is started.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: Potential Persistence Via Excel Add-in - Registry
id: 961e33d1-4f86-4fcf-80ab-930a708b2f82
status: test
description: Detect potential persistence via the creation of an excel add-in (XLL) file to make it run automatically when Excel is started.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/4ae9580a1a8772db87a1b6cdb0d03e5af231e966/atomics/T1137.006/T1137.006.md
- https://labs.withsecure.com/publications/add-in-opportunities-for-office-persistence
author: frack113
date: 2023-01-15
modified: 2023-08-17
tags:
- attack.persistence
- attack.t1137.006
logsource:
product: windows
category: registry_set
detection:
selection:
TargetObject|contains: 'Software\Microsoft\Office\'
TargetObject|endswith: '\Excel\Options'
Details|startswith: '/R '
Details|endswith: '.xll'
condition: selection
falsepositives:
- Unknown
level: high
simulation:
- type: atomic-red-team
name: Persistent Code Execution Via Excel Add-in File (XLL)
technique: T1137.006
atomic_guid: 9c307886-9fef-41d5-b344-073a0f5b2f5f
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetObject|contains: 'Software\Microsoft\Office\'
TargetObject|endswith: '\Excel\Options'
Details|startswith: '/R '
Details|endswith: '.xll'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Details | ends_with |
| field:"Details" kind:ends_with value:".xll" |
Details | starts_with |
| field:"Details" kind:starts_with value:"/R " |
TargetObject | ends_with |
| field:"TargetObject" kind:ends_with value:"\Excel\Options" |
TargetObject | match |
| field:"TargetObject" kind:match value:"Software\Microsoft\Office\" |
Potentially Suspicious Child Process Of ClickOnce Application
#Detects potentially suspicious child processes of a ClickOnce deployment application
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | No specific technique |
| Stealth | 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: Potentially Suspicious Child Process Of ClickOnce Application
id: 67bc0e75-c0a9-4cfc-8754-84a505b63c04
status: test
description: Detects potentially suspicious child processes of a ClickOnce deployment application
references:
- https://posts.specterops.io/less-smartscreen-more-caffeine-ab-using-clickonce-for-trusted-code-execution-1446ea8051c5
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-06-12
tags:
- attack.execution
- attack.stealth
logsource:
category: process_creation
product: windows
detection:
selection:
ParentImage|contains: '\AppData\Local\Apps\2.0\'
Image|endswith:
# Add more suspicious processes
- '\calc.exe'
- '\cmd.exe'
- '\cscript.exe'
- '\explorer.exe'
- '\mshta.exe'
- '\net.exe'
- '\net1.exe'
- '\nltest.exe'
- '\notepad.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\reg.exe'
- '\regsvr32.exe'
- '\rundll32.exe'
- '\schtasks.exe'
- '\werfault.exe'
- '\wscript.exe'
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ParentImage|contains: '\AppData\Local\Apps\2.0\'
Image|endswith:
- '\calc.exe'
- '\cmd.exe'
- '\cscript.exe'
- '\explorer.exe'
- '\mshta.exe'
- '\net.exe'
- '\net1.exe'
- '\nltest.exe'
- '\notepad.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\reg.exe'
- '\regsvr32.exe'
- '\rundll32.exe'
- '\schtasks.exe'
- '\werfault.exe'
- '\wscript.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with |
ParentImage | match |
| field:"ParentImage" kind:match value:"\AppData\Local\Apps\2.0\" |
Process Memory Dump via RdrLeakDiag.EXE
#Detects the use of the Microsoft Windows Resource Leak Diagnostic tool "rdrleakdiag.exe" to dump process memory
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Process Memory Dump via RdrLeakDiag.EXE
id: edadb1e5-5919-4e4c-8462-a9e643b02c4b
related:
- id: 6355a919-2e97-4285-a673-74645566340d
type: obsolete
status: test
description: Detects the use of the Microsoft Windows Resource Leak Diagnostic tool "rdrleakdiag.exe" to dump process memory
references:
- https://www.pureid.io/dumping-abusing-windows-credentials-part-1/
- https://www.crowdstrike.com/blog/overwatch-exposes-aquatic-panda-in-possession-of-log-4-shell-exploit-tools/
- https://lolbas-project.github.io/lolbas/Binaries/Rdrleakdiag/
- https://twitter.com/0gtweet/status/1299071304805560321?s=21
- https://news.sophos.com/en-us/2024/06/05/operation-crimson-palace-a-technical-deep-dive
author: Cedric MAURUGEON, Florian Roth (Nextron Systems), Swachchhanda Shrawan Poudel, Nasreddine Bencherchali (Nextron Systems)
date: 2021-09-24
modified: 2024-08-15
tags:
- attack.credential-access
- attack.t1003.001
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\rdrleakdiag.exe'
- OriginalFileName: RdrLeakDiag.exe
selection_cli_dump:
CommandLine|contains|windash:
- '/memdmp'
- 'fullmemdmp'
selection_cli_output_process:
CommandLine|contains|windash:
- ' /o ' # Output
- ' /p ' # Process
condition: all of selection_*
falsepositives:
- Unlikely
level: high
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Image|endswith: '\rdrleakdiag.exe'
- OriginalFileName: RdrLeakDiag.exe
Stage 2: selection_cli_dump
selection_cli_dump:
CommandLine|contains|windash:
- '/memdmp'
- 'fullmemdmp'
Stage 3: selection_cli_output_process
selection_cli_output_process:
CommandLine|contains|windash:
- ' /o '
- ' /p '
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:"\rdrleakdiag.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"RdrLeakDiag.exe" |
RDP session hijack via service creation abuse
#Detects scenarios where an attacker create a service that triggers TSCON in order to preform local RDP session hijack.
Known False Positives
- None
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Lateral Movement |
Telemetry Coverage
Rule Body
title: RDP session hijack via service creation abuse
description: Detects scenarios where an attacker create a service that triggers TSCON in order to preform local RDP session hijack.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0003-Persistence/T1543.003-Create%20or%20Modify%20System%20Process-Windows%20Service
- https://www.ired.team/offensive-security/lateral-movement/t1076-rdp-hijacking-for-lateral-movement
- https://www.csoonline.com/article/3566917/rdp-hijacking-attacks-explained-and-how-to-mitigate-them.html
- https://gist.github.com/bohops/f722f1a54d9ac1070350bdcaf2da618b
- https://doublepulsar.com/rdp-hijacking-how-to-hijack-rds-and-remoteapp-sessions-transparently-to-move-through-an-da2a1e73a5f6
- https://twitter.com/bohops/status/992232940900962304
tags:
- attack.persistence
- attack.t1543.003
- attack.lateral_movement
- attack.t1563.002
author: mdecrevoisier
status: experimental
logsource:
product: windows
service:
- system
- security
detection:
selection1:
EventID: 4697 # Security channel
ServiceFileName|contains|all: # Full command: "cmd.exe /k tscon 2 /dest:rdp-tcp#5"
- 'tscon '
- '/dest:rdp-' # can also be UDP (rarely)
selection2:
EventID: 7045 # System channel
ImagePath|contains|all:
- 'tscon '
- '/dest:rdp-' # can also be UDP (rarely)
condition: 1 of selection*
falsepositives:
- None
level: high
Stages and Predicates
Stage 0: condition
1 of selection*Stage 1: selection1
selection1:
EventID: 4697
ServiceFileName|contains|all:
- 'tscon '
- '/dest:rdp-'
Stage 2: selection2
selection2:
EventID: 7045
ImagePath|contains|all:
- 'tscon '
- '/dest:rdp-'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImagePath | match |
| field:"ImagePath" kind:match |
ServiceFileName | match |
| field:"ServiceFileName" kind:match |
RDP tunneling detected
#Detects scenarios where an attacker uses RDP tunneling to redirect traffic to a C&C target.
Known False Positives
- None
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | |
| Command & Control |
Telemetry Coverage
Rule Body
title: RDP tunneling detected
description: Detects scenarios where an attacker uses RDP tunneling to redirect traffic to a C&C target.
references:
- https://github.com/sbousseaden/Slides/blob/master/Windows%20DFIR%20Events.pdf
tags:
- attack.command_and_control
- attack.t1572 # tunneling
- attack.lateral_movement
- attack.t1021.001 # remote services: RDP
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: rdp
detection:
selection:
EventID: 1149 # 'User authentication succeeded': DOES NOT indicate a successful user authentication !!!
Channel: Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational
EventXML.Param3: '127.0.0.1' # In ID 1149, IP address is provided in "EventXML.Param3"
condition: selection
falsepositives:
- None
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventID: 1149
Channel: Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational
EventXML.Param3: '127.0.0.1'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventXML.Param3 | eq |
| field:"EventXML.Param3" kind:eq value:"127.0.0.1" |
Remote domain controller password reset (Zerologon)
#Detects scenarios where an attacker attempts to exploit the Zerologon vulnerabiliy which triggers, bsides others things, a password reset on a domain controller.
Known False Positives
- None
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Telemetry Coverage
Rule Body
title: Remote domain controller password reset (Zerologon)
description: Detects scenarios where an attacker attempts to exploit the Zerologon vulnerabiliy which triggers, bsides others things, a password reset on a domain controller.
references:
- https://thedfirreport.com/2022/11/14/bumblebee-zeros-in-on-meterpreter/
- https://stealthbits.com/blog/zerologon-from-zero-to-hero-part-2/
- https://www.lares.com/blog/from-lares-labs-defensive-guidance-for-zerologon-cve-2020-1472/
- https://blog.nviso.eu/2020/09/17/sentinel-query-detect-zerologon-cve-2020-1472/
- https://blog.zsec.uk/zerologon-attacking-defending/
tags:
- attack.lateral_movement
- attack.t1210 # Exploitation of Remote Services
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: security
detection:
domain_controller:
Computer: '%domain_controllers%'
selection_account_changed:
EventID: 4742 # computer account changed
TargetUserName|endswith: '$' # focus only on computer accounts
filter_account_changed:
PasswordLastSet: '-'
selection_reset:
EventID: 4724
condition: domain_controller and (selection_reset or (selection_account_changed and not filter_account_changed) )
falsepositives:
- None
level: high
Stages and Predicates
Stage 0: condition
domain_controller and (selection_reset or (selection_account_changed and not filter_account_changed) )Stage 1: domain_controller
domain_controller:
Computer: '%domain_controllers%'
Stage 2: selection_reset
selection_reset:
EventID: 4724
Stage 3: selection_account_changed
selection_account_changed:
EventID: 4742
TargetUserName|endswith: '$'
Stage 4: not filter_account_changed
filter_account_changed:
PasswordLastSet: '-'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Computer | eq |
| field:"Computer" kind:eq value:"%domain_controllers%" |
TargetUserName | ends_with |
| field:"TargetUserName" kind:ends_with value:"$" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
PasswordLastSet | eq | - | excludes:PasswordLastSet field:"PasswordLastSet" value:"-" |
Scheduled Cron Task/Job - MacOs
#Detects abuse of the cron utility to perform task scheduling for initial or recurring execution of malicious code. Detection will focus on crontab jobs uploaded from the tmp folder.
Known False Positives
- Legitimate administration activities
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
Rule Body
title: Scheduled Cron Task/Job - MacOs
id: 7c3b43d8-d794-47d2-800a-d277715aa460
status: test
description: Detects abuse of the cron utility to perform task scheduling for initial or recurring execution of malicious code. Detection will focus on crontab jobs uploaded from the tmp folder.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1053.003/T1053.003.md
author: Alejandro Ortuno, oscd.community
date: 2020-10-06
modified: 2022-11-27
tags:
- attack.execution
- attack.persistence
- attack.privilege-escalation
- attack.t1053.003
logsource:
category: process_creation
product: macos
detection:
selection:
Image|endswith: '/crontab'
CommandLine|contains: '/tmp/'
condition: selection
falsepositives:
- Legitimate administration activities
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image|endswith: '/crontab'
CommandLine|contains: '/tmp/'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:"/tmp/" |
Image | ends_with |
| field:"Image" kind:ends_with value:"/crontab" |
Suspicious Child Process of SAP NetWeaver - Linux
#Detects suspicious child processes spawned by SAP NetWeaver on Linux systems that could indicate potential exploitation of vulnerability that allows arbitrary execution via webshells such as CVE-2025-31324.
Known False Positives
- Legitimate administrative activities such as software updates
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Execution |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Linux | Event ID 1: Process Create |
Rule Body
title: Suspicious Child Process of SAP NetWeaver - Linux
id: 69dea60b-2deb-4c9e-a685-ad542f4367f9
status: experimental
description: |
Detects suspicious child processes spawned by SAP NetWeaver on Linux systems that could indicate potential
exploitation of vulnerability that allows arbitrary execution via webshells such as CVE-2025-31324.
author: Elastic (idea), Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-04-28
tags:
- attack.execution
- attack.initial-access
- attack.t1190
- attack.persistence
- attack.t1059.003
- cve.2025-31324
- detection.emerging-threats
references:
- https://reliaquest.com/blog/threat-spotlight-reliaquest-uncovers-vulnerability-behind-sap-netweaver-compromise/
- https://onapsis.com/blog/active-exploitation-of-sap-vulnerability-cve-2025-31324/
logsource:
category: process_creation
product: linux
detection:
selection_parent_img:
ParentImage|contains:
- '/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/work'
- '/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/root'
selection_current_dict:
CurrentDirectory|contains:
- '/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/work'
- '/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/root'
selection_child:
Image|endswith:
- '/ash'
- '/bash'
- '/csh'
- '/dash'
- '/ksh'
- '/sh'
- '/tcsh'
- '/zsh'
- '/python'
- '/python2'
- '/python3'
- '/perl'
- '/ruby'
- '/curl'
- '/wget'
- '/nc'
- '/netcat'
- '/ncat'
- '/socat'
- '/nmap'
- '/telnet'
- '/awk'
- '/sed'
condition: (selection_parent_img or selection_current_dict) and selection_child
falsepositives:
- Legitimate administrative activities such as software updates
level: medium
Stages and Predicates
Stage 0: condition
(selection_parent_img or selection_current_dict) and selection_childStage 1: selection_parent_img
selection_parent_img:
ParentImage|contains:
- '/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/work'
- '/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/root'
Stage 2: selection_current_dict
selection_current_dict:
CurrentDirectory|contains:
- '/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/work'
- '/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/root'
Stage 3: selection_child
selection_child:
Image|endswith:
- '/ash'
- '/bash'
- '/csh'
- '/dash'
- '/ksh'
- '/sh'
- '/tcsh'
- '/zsh'
- '/python'
- '/python2'
- '/python3'
- '/perl'
- '/ruby'
- '/curl'
- '/wget'
- '/nc'
- '/netcat'
- '/ncat'
- '/socat'
- '/nmap'
- '/telnet'
- '/awk'
- '/sed'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CurrentDirectory | match |
| field:"CurrentDirectory" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with |
ParentImage | match |
| field:"ParentImage" kind:match |
Suspicious Driver/DLL Installation Via Odbcconf.EXE
#Detects execution of "odbcconf" with the "INSTALLDRIVER" action where the driver doesn't contain a ".dll" extension. This is often used as a defense evasion method.
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: Suspicious Driver/DLL Installation Via Odbcconf.EXE
id: cb0fe7c5-f3a3-484d-aa25-d350a7912729
related:
- id: 3f5491e2-8db8-496b-9e95-1029fce852d4
type: derived
status: test
description: Detects execution of "odbcconf" with the "INSTALLDRIVER" action where the driver doesn't contain a ".dll" extension. This is often used as a defense evasion method.
references:
- https://lolbas-project.github.io/lolbas/Binaries/Odbcconf/
- https://web.archive.org/web/20191023232753/https://twitter.com/Hexacorn/status/1187143326673330176
- https://www.hexacorn.com/blog/2020/08/23/odbcconf-lolbin-trifecta/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-05-23
tags:
- attack.stealth
- attack.t1218.008
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\odbcconf.exe'
- OriginalFileName: 'odbcconf.exe'
selection_cli:
# Note: The "/A" flag is not required to call a specific action
CommandLine|contains: 'INSTALLDRIVER '
filter_main_dll_ext:
CommandLine|contains: '.dll'
condition: all of selection_* and not 1 of filter_main_*
falsepositives:
- Unlikely
level: high
Stages and Predicates
Stage 0: condition
all of selection_* and not 1 of filter_main_*Stage 1: selection_img
selection_img:
- Image|endswith: '\odbcconf.exe'
- OriginalFileName: 'odbcconf.exe'
Stage 2: selection_cli
selection_cli:
CommandLine|contains: 'INSTALLDRIVER '
Stage 3: not filter_main_dll_ext
filter_main_dll_ext:
CommandLine|contains: '.dll'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:"INSTALLDRIVER " |
Image | ends_with |
| field:"Image" kind:ends_with value:"\odbcconf.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"odbcconf.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
CommandLine | match | .dll | excludes:CommandLine field:"CommandLine" value:".dll" |
Suspicious File Drop by Exchange
#Detects suspicious file type dropped by an Exchange component in IIS
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: Suspicious File Drop by Exchange
id: 6b269392-9eba-40b5-acb6-55c882b20ba6
related:
- id: bd1212e5-78da-431e-95fa-c58e3237a8e6
type: similar
status: test
description: Detects suspicious file type dropped by an Exchange component in IIS
references:
- https://www.microsoft.com/security/blog/2022/09/30/analyzing-attacks-using-the-exchange-vulnerabilities-cve-2022-41040-and-cve-2022-41082/
- https://www.gteltsc.vn/blog/canh-bao-chien-dich-tan-cong-su-dung-lo-hong-zero-day-tren-microsoft-exchange-server-12714.html
- https://en.gteltsc.vn/blog/cap-nhat-nhe-ve-lo-hong-bao-mat-0day-microsoft-exchange-dang-duoc-su-dung-de-tan-cong-cac-to-chuc-tai-viet-nam-9685.html
author: Florian Roth (Nextron Systems)
date: 2022-10-04
tags:
- attack.persistence
- attack.t1190
- attack.initial-access
- attack.t1505.003
logsource:
product: windows
category: file_event
detection:
selection:
Image|endswith: '\w3wp.exe'
CommandLine|contains: 'MSExchange'
selection_types:
TargetFilename|endswith:
- '.aspx'
- '.asp'
- '.ashx'
- '.ps1'
- '.bat'
- '.exe'
- '.dll'
- '.vbs'
condition: all of selection*
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
all of selection*Stage 1: selection
selection:
Image|endswith: '\w3wp.exe'
CommandLine|contains: 'MSExchange'
Stage 2: selection_types
selection_types:
TargetFilename|endswith:
- '.aspx'
- '.asp'
- '.ashx'
- '.ps1'
- '.bat'
- '.exe'
- '.dll'
- '.vbs'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:"MSExchange" |
Image | ends_with |
| field:"Image" kind:ends_with value:"\w3wp.exe" |
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with |
UAC Bypass Using MSConfig Token Modification - Process
#Detects the pattern of UAC Bypass using a msconfig GUI hack (UACMe 55)
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
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: UAC Bypass Using MSConfig Token Modification - Process
id: ad92e3f9-7eb6-460e-96b1-582b0ccbb980
status: test
description: Detects the pattern of UAC Bypass using a msconfig GUI hack (UACMe 55)
references:
- https://github.com/hfiref0x/UACME
author: Christian Burkard (Nextron Systems)
date: 2021-08-30
modified: 2024-12-01
tags:
- attack.privilege-escalation
- attack.t1548.002
logsource:
category: process_creation
product: windows
detection:
selection:
IntegrityLevel:
- 'High'
- 'System'
- 'S-1-16-16384' # System
- 'S-1-16-12288' # High
ParentImage|endswith: '\AppData\Local\Temp\pkgmgr.exe'
CommandLine: '"C:\Windows\system32\msconfig.exe" -5'
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
IntegrityLevel:
- 'High'
- 'System'
- 'S-1-16-16384'
- 'S-1-16-12288'
ParentImage|endswith: '\AppData\Local\Temp\pkgmgr.exe'
CommandLine: '"C:\Windows\system32\msconfig.exe" -5'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | eq |
| field:"CommandLine" kind:eq |
IntegrityLevel | eq |
| field:"IntegrityLevel" kind:eq |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with value:"\AppData\Local\Temp\pkgmgr.exe" |
Uncommon Service Installation Image Path
#Detects uncommon service installation commands by looking at suspicious or uncommon image path values containing references to encoded powershell commands, temporary paths, etc.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Service-Control-Manager | Event ID 7045: A service was installed in the system. |
Rule Body
title: Uncommon Service Installation Image Path
id: 26481afe-db26-4228-b264-25a29fe6efc7
related:
- id: ca83e9f3-657a-45d0-88d6-c1ac280caf53
type: obsolete
- id: 1d61f71d-59d2-479e-9562-4ff5f4ead16b
type: derived
status: test
description: |
Detects uncommon service installation commands by looking at suspicious or uncommon image path values containing references to encoded powershell commands, temporary paths, etc.
references:
- Internal Research
author: Florian Roth (Nextron Systems)
date: 2022-03-18
modified: 2024-02-09
tags:
- attack.persistence
- attack.privilege-escalation
- car.2013-09-005
- attack.t1543.003
logsource:
product: windows
service: system
detection:
selection:
Provider_Name: 'Service Control Manager'
EventID: 7045
suspicious_paths:
ImagePath|contains:
- '\\\\.\\pipe'
- '\Users\Public\'
- '\Windows\Temp\'
suspicious_encoded_flag:
ImagePath|contains: ' -e'
suspicious_encoded_keywords:
ImagePath|contains:
- ' aQBlAHgA' # PowerShell encoded commands
- ' aWV4I' # PowerShell encoded commands
- ' IAB' # PowerShell encoded commands
- ' JAB' # PowerShell encoded commands
- ' PAA' # PowerShell encoded commands
- ' SQBFAFgA' # PowerShell encoded commands
- ' SUVYI' # PowerShell encoded commands
filter_optional_thor_remote:
ImagePath|startswith: 'C:\WINDOWS\TEMP\thor10-remote\thor64.exe'
filter_main_defender_def_updates:
ImagePath|startswith: 'C:\ProgramData\Microsoft\Windows Defender\Definition Updates\'
condition: selection and ( suspicious_paths or all of suspicious_encoded_* ) and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selection and ( suspicious_paths or all of suspicious_encoded_* ) and not 1 of filter_main_* and not 1 of filter_optional_*Stage 1: selection
selection:
Provider_Name: 'Service Control Manager'
EventID: 7045
Stage 2: suspicious_paths
suspicious_paths:
ImagePath|contains:
- '\\\\.\\pipe'
- '\Users\Public\'
- '\Windows\Temp\'
Stage 3: suspicious_encoded_flag
suspicious_encoded_flag:
ImagePath|contains: ' -e'
Stage 4: suspicious_encoded_keywords
suspicious_encoded_keywords:
ImagePath|contains:
- ' aQBlAHgA'
- ' aWV4I'
- ' IAB'
- ' JAB'
- ' PAA'
- ' SQBFAFgA'
- ' SUVYI'
Stage 5: not filter_main_defender_def_updates
filter_main_defender_def_updates:
ImagePath|startswith: 'C:\ProgramData\Microsoft\Windows Defender\Definition Updates\'
Stage 6: not filter_optional_thor_remote
filter_optional_thor_remote:
ImagePath|startswith: 'C:\WINDOWS\TEMP\thor10-remote\thor64.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImagePath | match |
| field:"ImagePath" kind:match |
Provider_Name | eq |
| field:"Provider_Name" kind:eq value:"Service Control Manager" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
ImagePath | starts_with | C:\ProgramData\Microsoft\Windows Defender\Definition Updates\ | excludes:ImagePath field:"ImagePath" value:"C:\ProgramData\Microsoft\Windows Defender\Definition Updates\" |
ImagePath | starts_with | C:\WINDOWS\TEMP\thor10-remote\thor64.exe | excludes:ImagePath field:"ImagePath" value:"C:\WINDOWS\TEMP\thor10-remote\thor64.exe" |
Use of Wfc.exe
#The Workflow Command-line Compiler can be used for AWL bypass and is listed in Microsoft's recommended block rules.
Known False Positives
- Legitimate use by a software developer
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Use of Wfc.exe
id: 49be8799-7b4d-4fda-ad23-cafbefdebbc5
status: test
description: The Workflow Command-line Compiler can be used for AWL bypass and is listed in Microsoft's recommended block rules.
references:
- https://lolbas-project.github.io/lolbas/OtherMSBinaries/Wfc/
- https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control/design/applications-that-can-bypass-wdac
author: 'Christopher Peacock @SecurePeacock, SCYTHE @scythe_io'
date: 2022-06-01
tags:
- attack.execution
- attack.stealth
- attack.t1127
logsource:
category: process_creation
product: windows
detection:
selection:
- Image|endswith: '\wfc.exe'
- OriginalFileName: 'wfc.exe'
condition: selection
falsepositives:
- Legitimate use by a software developer
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
- Image|endswith: '\wfc.exe'
- OriginalFileName: 'wfc.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with value:"\wfc.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"wfc.exe" |
VsCode Code Tunnel Execution File Indicator
#Detects the creation of a file with the name "code_tunnel.json" which indicate execution and usage of VsCode tunneling utility. Attackers can abuse this functionality to establish a C2 channel
Known False Positives
- Legitimate usage of VsCode tunneling functionality will also trigger this
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: VsCode Code Tunnel Execution File Indicator
id: 9661ec9d-4439-4a7a-abed-d9be4ca43b6d
status: test
description: |
Detects the creation of a file with the name "code_tunnel.json" which indicate execution and usage of VsCode tunneling utility. Attackers can abuse this functionality to establish a C2 channel
references:
- https://ipfyx.fr/post/visual-studio-code-tunnel/
- https://badoption.eu/blog/2023/01/31/code_c2.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-10-25
tags:
- attack.command-and-control
- detection.threat-hunting
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|endswith: '\code_tunnel.json'
condition: selection
falsepositives:
- Legitimate usage of VsCode tunneling functionality will also trigger this
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetFilename|endswith: '\code_tunnel.json'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with value:"\code_tunnel.json" |
Zip A Folder With PowerShell For Staging In Temp - PowerShell
#Detects PowerShell scripts that make use of the "Compress-Archive" Cmdlet in order to compress folders and files where the output is stored in a potentially suspicious location that is used often by malware for exfiltration. An adversary might compress data (e.g., sensitive documents) that is collected prior to exfiltration in order to make it portable and minimize the amount of data sent over the network.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Collection |
Rule Body
title: Zip A Folder With PowerShell For Staging In Temp - PowerShell
id: 71ff406e-b633-4989-96ec-bc49d825a412 # PowerShell Classic
related:
- id: daf7eb81-35fd-410d-9d7a-657837e602bb # PowerShell Module
type: similar
- id: b7a3c9a3-09ea-4934-8864-6a32cacd98d9 # PowerShell Script
type: similar
- id: 85a8e5ba-bd03-4bfb-bbfa-a4409a8f8b98 # Process Creation
type: similar
status: test
description: |
Detects PowerShell scripts that make use of the "Compress-Archive" Cmdlet in order to compress folders and files where the output is stored in a potentially suspicious location that is used often by malware for exfiltration.
An adversary might compress data (e.g., sensitive documents) that is collected prior to exfiltration in order to make it portable and minimize the amount of data sent over the network.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1074.001/T1074.001.md
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-347a
author: Nasreddine Bencherchali (Nextron Systems), frack113
date: 2021-07-20
modified: 2023-12-18
tags:
- attack.collection
- attack.t1074.001
logsource:
product: windows
service: powershell-classic
detection:
selection:
Data|contains:
- 'Compress-Archive -Path*-DestinationPath $env:TEMP'
- 'Compress-Archive -Path*-DestinationPath*\AppData\Local\Temp\'
- 'Compress-Archive -Path*-DestinationPath*:\Windows\Temp\'
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Data|contains:
- 'Compress-Archive -Path*-DestinationPath $env:TEMP'
- 'Compress-Archive -Path*-DestinationPath*\AppData\Local\Temp\'
- 'Compress-Archive -Path*-DestinationPath*:\Windows\Temp\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Data | match |
| field:"Data" kind:match |