Detection rules › Sigma
Sigma rules: 1v
Add Windows Capability Via PowerShell Cmdlet
#Detects usage of the "Add-WindowsCapability" cmdlet to add Windows capabilities. Notable capabilities could be "OpenSSH" and others.
Known False Positives
- Legitimate usage of the capabilities by administrators or users. Add additional filters accordingly.
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: Add Windows Capability Via PowerShell Cmdlet
id: b36d01a3-ddaf-4804-be18-18a6247adfcd
related:
- id: 155c7fd5-47b4-49b2-bbeb-eb4fab335429
type: similar
status: test
description: Detects usage of the "Add-WindowsCapability" cmdlet to add Windows capabilities. Notable capabilities could be "OpenSSH" and others.
references:
- https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell
- https://www.virustotal.com/gui/file/af1c82237b6e5a3a7cdbad82cc498d298c67845d92971bada450023d1335e267/content
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-22
modified: 2023-05-09
tags:
- attack.execution
logsource:
product: windows
category: process_creation
detection:
selection_img:
- Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'PowerShell.EXE'
- 'pwsh.dll'
selection_cmdlet:
CommandLine|contains: 'Add-WindowsCapability'
selection_capa:
CommandLine|contains: 'OpenSSH.' # For both "OpenSSH.Server" and "OpenSSH.Client"
condition: all of selection_*
falsepositives:
- Legitimate usage of the capabilities by administrators or users. Add additional filters accordingly.
level: medium
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'PowerShell.EXE'
- 'pwsh.dll'
Stage 2: selection_cmdlet
selection_cmdlet:
CommandLine|contains: 'Add-WindowsCapability'
Stage 3: selection_capa
selection_capa:
CommandLine|contains: 'OpenSSH.'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq |
AppX Located in Known Staging Directory Added to Deployment Pipeline
#Detects an appx package that was added to the pipeline of the "to be processed" packages that is located in a known folder often used as a staging directory.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| AppXDeployment-Server | Event ID 854: Successfully added the following uri(s) to be processed: Path. |
Rule Body
title: AppX Located in Known Staging Directory Added to Deployment Pipeline
id: 5cdeaf3d-1489-477c-95ab-c318559fc051
status: test
description: |
Detects an appx package that was added to the pipeline of the "to be processed" packages that is located in a known folder often used as a staging directory.
references:
- https://www.sentinelone.com/labs/inside-malicious-windows-apps-for-malware-deployment/
- https://learn.microsoft.com/en-us/windows/win32/appxpkg/troubleshooting
- https://news.sophos.com/en-us/2021/11/11/bazarloader-call-me-back-attack-abuses-windows-10-apps-mechanism/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-11
tags:
- attack.stealth
logsource:
product: windows
service: appxdeployment-server
detection:
selection_eid:
EventID: 854
selection_paths_forward:
Path|contains: # Paths can be written using forward slash if the "file://" protocol is used
- ':/Perflogs/'
- ':/Users/Public/'
- ':/Windows/Temp/'
- '/AppdData/Local/Temp/'
- '/Desktop/'
- '/Downloads/'
selection_paths_back:
Path|contains: # Paths can be written using forward slash if the "file://" protocol is used
- ':\PerfLogs\'
- ':\Users\Public\'
- ':\Windows\Temp\'
- '\AppdData\Local\Temp\'
- '\Desktop\'
- '\Downloads\'
condition: selection_eid and 1 of selection_paths_*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selection_eid and 1 of selection_paths_*Stage 1: selection_eid
selection_eid:
EventID: 854
Stage 2: selection_paths_forward
selection_paths_forward:
Path|contains:
- ':/Perflogs/'
- ':/Users/Public/'
- ':/Windows/Temp/'
- '/AppdData/Local/Temp/'
- '/Desktop/'
- '/Downloads/'
Stage 3: selection_paths_back
selection_paths_back:
Path|contains:
- ':\PerfLogs\'
- ':\Users\Public\'
- ':\Windows\Temp\'
- '\AppdData\Local\Temp\'
- '\Desktop\'
- '\Downloads\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Path | match |
| field:"Path" kind:match |
Certutil payload download (command)
#Detects scenarios where an attacker attempts to abuse certutil command to download obfuscated malicious payload.
Known False Positives
- None
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Certutil payload download (command)
description: Detects scenarios where an attacker attempts to abuse certutil command to download obfuscated malicious payload.
references:
- https://www.elastic.co/guide/en/security/current/suspicious-certutil-commands.html
- https://www.bleepingcomputer.com/news/security/certutilexe-could-allow-attackers-to-download-malware-while-bypassing-av/
- https://attack.mitre.org/software/S0160/
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certutil
- https://www.sentinelone.com/blog/malware-living-off-land-with-certutil/
- https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/
- https://www.recordedfuture.com/five-common-ransomware-techniques
tags:
- attack.defense_evasion
- attack.t1105
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: process_creation
detection: # Full command: "certutil -urlcache -split -f [serverURL] virus.exe"
selection:
NewProcessName|endswith: '\certutil.exe'
CommandLine|contains:
- urlcache
#- decode # see other related rule
#- encodehex # see other related rule
#- encodehex # see other related rule
#- decodehex # see other related rule
condition: selection
falsepositives:
- None
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
NewProcessName|endswith: '\certutil.exe'
CommandLine|contains:
- urlcache
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:"urlcache" |
NewProcessName | ends_with |
| field:"Image" kind:ends_with value:"\certutil.exe" |
Cloudflared Tunnels Related DNS Requests
#Detects DNS requests to Cloudflared tunnels domains. Attackers can abuse that feature to establish a reverse shell or persistence on a machine.
Known False Positives
- Legitimate use of cloudflare tunnels will also trigger this.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 22: DNSEvent (DNS query) |
Rule Body
title: Cloudflared Tunnels Related DNS Requests
id: a1d9eec5-33b2-4177-8d24-27fe754d0812
related:
- id: 7cd1dcdc-6edf-4896-86dc-d1f19ad64903
type: similar
status: test
description: |
Detects DNS requests to Cloudflared tunnels domains.
Attackers can abuse that feature to establish a reverse shell or persistence on a machine.
references:
- https://www.guidepointsecurity.com/blog/tunnel-vision-cloudflared-abused-in-the-wild/
- Internal Research
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-12-20
tags:
- attack.command-and-control
- attack.t1071.001
- attack.t1572
logsource:
category: dns_query
product: windows
detection:
selection:
QueryName|endswith:
- '.v2.argotunnel.com'
- 'protocol-v2.argotunnel.com'
- 'trycloudflare.com'
- 'update.argotunnel.com'
condition: selection
falsepositives:
- Legitimate use of cloudflare tunnels will also trigger this.
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
QueryName|endswith:
- '.v2.argotunnel.com'
- 'protocol-v2.argotunnel.com'
- 'trycloudflare.com'
- 'update.argotunnel.com'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
QueryName | ends_with |
| field:"QueryName" kind:ends_with |
Credential Dumping Attempt Via WerFault
#Detects process LSASS memory dump using Mimikatz, NanoDump, Invoke-Mimikatz, Procdump or Taskmgr based on the CallTrace pointing to ntdll.dll, dbghelp.dll or dbgcore.dll for win10, server2016 and up.
Known False Positives
- Actual failures in lsass.exe that trigger a crash dump (unlikely)
- Unknown cases in which WerFault accesses lsass.exe
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 10: ProcessAccess |
Rule Body
title: Credential Dumping Attempt Via WerFault
id: e5b33f7d-eb93-48b6-9851-09e1e610b6d7
status: test
description: Detects process LSASS memory dump using Mimikatz, NanoDump, Invoke-Mimikatz, Procdump or Taskmgr based on the CallTrace pointing to ntdll.dll, dbghelp.dll or dbgcore.dll for win10, server2016 and up.
references:
- https://github.com/helpsystems/nanodump/commit/578116faea3d278d53d70ea932e2bbfe42569507
author: Florian Roth (Nextron Systems)
date: 2012-06-27
modified: 2023-11-29
tags:
- attack.credential-access
- attack.t1003.001
- attack.s0002
logsource:
category: process_access
product: windows
detection:
selection:
SourceImage|endswith: '\WerFault.exe'
TargetImage|endswith: '\lsass.exe'
GrantedAccess: '0x1FFFFF'
condition: selection
falsepositives:
- Actual failures in lsass.exe that trigger a crash dump (unlikely)
- Unknown cases in which WerFault accesses lsass.exe
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
SourceImage|endswith: '\WerFault.exe'
TargetImage|endswith: '\lsass.exe'
GrantedAccess: '0x1FFFFF'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
GrantedAccess | eq |
| field:"GrantedAccess" kind:eq value:"0x1FFFFF" |
SourceImage | ends_with |
| field:"SourceImage" kind:ends_with value:"\WerFault.exe" |
TargetImage | ends_with |
| field:"TargetImage" kind:ends_with value:"\lsass.exe" |
Execute Invoke-command on Remote Host
#Adversaries may use Valid Accounts to interact with remote systems using Windows Remote Management (WinRM). The adversary may then perform actions as the logged-on user.
Known False Positives
- Legitimate script
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: Execute Invoke-command on Remote Host
id: 7b836d7f-179c-4ba4-90a7-a7e60afb48e6
status: test
description: Adversaries may use Valid Accounts to interact with remote systems using Windows Remote Management (WinRM). The adversary may then perform actions as the logged-on user.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1021.006/T1021.006.md#atomic-test-2---invoke-command
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/invoke-command?view=powershell-7.4
author: frack113
date: 2022-01-07
tags:
- attack.lateral-movement
- attack.t1021.006
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection_cmdlet:
ScriptBlockText|contains|all:
- 'invoke-command '
- ' -ComputerName '
condition: selection_cmdlet
falsepositives:
- Legitimate script
level: medium
regression_tests_path: regression_data/rules/windows/powershell/powershell_script/posh_ps_invoke_command_remote/info.yml
Stages and Predicates
Stage 0: condition
selection_cmdletStage 1: selection_cmdlet
selection_cmdlet:
ScriptBlockText|contains|all:
- 'invoke-command '
- ' -ComputerName '
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
HybridConnectionManager Service Running
#Rule to detect the Hybrid Connection Manager service running on an endpoint.
Known False Positives
- Legitimate use of Hybrid Connection Manager via Azure function apps.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
Rule Body
title: HybridConnectionManager Service Running
id: b55d23e5-6821-44ff-8a6e-67218891e49f
status: test
description: Rule to detect the Hybrid Connection Manager service running on an endpoint.
references:
- https://twitter.com/Cyb3rWard0g/status/1381642789369286662
author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research)
date: 2021-04-12
modified: 2024-08-05
tags:
- attack.persistence
- attack.t1554
logsource:
product: windows
service: microsoft-servicebus-client # Change to servicebus-client once validators are up to date
detection:
selection:
EventID:
- 40300
- 40301
- 40302
keywords:
- 'HybridConnection'
- 'sb://'
- 'servicebus.windows.net'
- 'HybridConnectionManage'
condition: selection and keywords
falsepositives:
- Legitimate use of Hybrid Connection Manager via Azure function apps.
level: high
Stages and Predicates
Stage 0: condition
selection and keywordsStage 1: selection
selection:
EventID:
- 40300
- 40301
- 40302
Stage 2: keywords
keywords:
- 'HybridConnection'
- 'sb://'
- 'servicebus.windows.net'
- 'HybridConnectionManage'
Invoke-Obfuscation CLIP+ Launcher - PowerShell Module
#Detects Obfuscated use of Clip.exe to execute PowerShell
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 CLIP+ Launcher - PowerShell Module
id: a136cde0-61ad-4a61-9b82-8dc490e60dd2
related:
- id: 73e67340-0d25-11eb-adc1-0242ac120002
type: derived
status: test
description: Detects Obfuscated use of Clip.exe to execute PowerShell
references:
- https://github.com/SigmaHQ/sigma/issues/1009 # (Task 26)
author: Jonathan Cheong, oscd.community
date: 2020-10-13
modified: 2024-04-05
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|re: 'cmd.{0,5}(?:/c|/r).+clip(?:\.exe)?.{0,4}&&.+clipboard]::\(\s\\"\{\d\}.+-f.+"'
condition: selection_4103
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selection_4103Stage 1: selection_4103
selection_4103:
Payload|re: 'cmd.{0,5}(?:/c|/r).+clip(?:\.exe)?.{0,4}&&.+clipboard]::\(\s\\"\{\d\}.+-f.+"'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Payload | regex_match |
| field:"Payload" kind:regex_match |
Kubernetes Secrets Modified or Deleted
#Detects when Kubernetes Secrets are Modified or Deleted.
Known False Positives
- Secrets being modified or deleted may be performed by a system administrator.
- Automated processes may need to take these actions and may need to be filtered.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access | No specific technique |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
Rule Body
title: Kubernetes Secrets Modified or Deleted
id: 58d31a75-a4f8-4c40-985b-373d58162ca2
related:
- id: 2f0bae2d-bf20-4465-be86-1311addebaa3
type: similar
status: test
description: |
Detects when Kubernetes Secrets are Modified or Deleted.
references:
- https://kubernetes.io/docs/reference/config-api/apiserver-audit.v1/
- https://commandk.dev/blog/guide-to-audit-k8s-secrets-for-compliance/
author: kelnage
date: 2024-07-11
tags:
- attack.credential-access
logsource:
product: kubernetes
service: audit
detection:
selection:
objectRef.resource: 'secrets'
verb:
- 'create'
- 'delete'
- 'patch'
- 'replace'
- 'update'
condition: selection
falsepositives:
- Secrets being modified or deleted may be performed by a system administrator.
- Automated processes may need to take these actions and may need to be filtered.
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
objectRef.resource: 'secrets'
verb:
- 'create'
- 'delete'
- 'patch'
- 'replace'
- 'update'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
objectRef.resource | eq |
| field:"objectRef.resource" kind:eq value:"secrets" |
verb | eq |
| field:"verb" kind:eq |
Loaded Module Enumeration Via Tasklist.EXE
#Detects the enumeration of a specific DLL or EXE being used by a binary via "tasklist.exe". This is often used by attackers in order to find the specific process identifier (PID) that is using the DLL in question. In order to dump the process memory or perform other nefarious actions.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Loaded Module Enumeration Via Tasklist.EXE
id: 34275eb8-fa19-436b-b959-3d9ecd53fa1f
status: test
description: |
Detects the enumeration of a specific DLL or EXE being used by a binary via "tasklist.exe".
This is often used by attackers in order to find the specific process identifier (PID) that is using the DLL in question.
In order to dump the process memory or perform other nefarious actions.
references:
- https://www.n00py.io/2021/05/dumping-plaintext-rdp-credentials-from-svchost-exe/
- https://pentestlab.blog/tag/svchost/
author: Swachchhanda Shrawan Poudel
date: 2024-02-12
modified: 2024-03-13
tags:
- attack.t1003
- attack.credential-access
logsource:
product: windows
category: process_creation
detection:
selection_img:
- Image|endswith: '\tasklist.exe'
- OriginalFileName: 'tasklist.exe'
selection_flags:
CommandLine|contains|windash: '-m'
selection_module:
# Note: add other interesting modules or binaries
CommandLine|contains: 'rdpcorets.dll'
condition: all of selection_*
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Image|endswith: '\tasklist.exe'
- OriginalFileName: 'tasklist.exe'
Stage 2: selection_flags
selection_flags:
CommandLine|contains|windash: '-m'
Stage 3: selection_module
selection_module:
CommandLine|contains: 'rdpcorets.dll'
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:"\tasklist.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"tasklist.exe" |
MSI Installation From Suspicious Locations
#Detects MSI package installation from suspicious locations
Known False Positives
- False positives may occur if you allow installation from folders such as the desktop, the public folder or remote shares. A baseline is required before production use.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | No specific technique |
Telemetry Coverage
Rule Body
title: MSI Installation From Suspicious Locations
id: c7c8aa1c-5aff-408e-828b-998e3620b341
status: test
description: Detects MSI package installation from suspicious locations
references:
- https://www.trendmicro.com/en_us/research/22/h/ransomware-actor-abuses-genshin-impact-anti-cheat-driver-to-kill-antivirus.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-31
modified: 2023-10-23
tags:
- attack.execution
logsource:
product: windows
service: application
# warning: The 'data' field used in the detection section is the container for the event data as a whole. You may have to adapt the rule for your backend accordingly
detection:
selection:
Provider_Name: 'MsiInstaller'
EventID:
- 1040
- 1042
Data|contains:
# Add more suspicious paths
- ':\Windows\TEMP\'
- '\\\\'
- '\Desktop\'
- '\PerfLogs\'
- '\Users\Public\'
# - '\AppData\Local\Temp\' # too many FPs
# - '\Downloads\' # too many FPs, typical legitimate staging directory
filter_winget:
Data|contains: '\AppData\Local\Temp\WinGet\'
filter_updhealthtools:
Data|contains: 'C:\Windows\TEMP\UpdHealthTools.msi'
condition: selection and not 1 of filter_*
falsepositives:
- False positives may occur if you allow installation from folders such as the desktop, the public folder or remote shares. A baseline is required before production use.
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_*Stage 1: selection
selection:
Provider_Name: 'MsiInstaller'
EventID:
- 1040
- 1042
Data|contains:
- ':\Windows\TEMP\'
- '\\\\'
- '\Desktop\'
- '\PerfLogs\'
- '\Users\Public\'
Stage 2: not filter_*
filter_winget:
Data|contains: '\AppData\Local\Temp\WinGet\'
filter_updhealthtools:
Data|contains: 'C:\Windows\TEMP\UpdHealthTools.msi'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Data | match |
| field:"Data" kind:match |
Provider_Name | eq |
| field:"Provider_Name" kind:eq value:"MsiInstaller" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Data | match | C:\Windows\TEMP\UpdHealthTools.msi | excludes:Data field:"Data" value:"C:\Windows\TEMP\UpdHealthTools.msi" |
Data | match | \AppData\Local\Temp\WinGet\ | excludes:Data field:"Data" value:"\AppData\Local\Temp\WinGet\" |
New Application in AppCompat
#A General detection for a new application in AppCompat. This indicates an application executing for the first time on an endpoint.
Known False Positives
- This rule is to explore new applications on an endpoint. False positives depends on the organization.
- Newly setup system.
- Legitimate installation of new application.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: New Application in AppCompat
id: 60936b49-fca0-4f32-993d-7415edcf9a5d
status: test
description: A General detection for a new application in AppCompat. This indicates an application executing for the first time on an endpoint.
references:
- https://github.com/OTRF/detection-hackathon-apt29/issues/1
- https://github.com/OTRF/ThreatHunter-Playbook/blob/2d4257f630f4c9770f78d0c1df059f891ffc3fec/docs/evals/apt29/detections/1.A.1_DFD6A782-9BDB-4550-AB6B-525E825B095E.md
author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research)
date: 2020-05-02
modified: 2023-08-17
tags:
- attack.execution
- attack.t1204.002
logsource:
product: windows
category: registry_set
detection:
selection:
TargetObject|contains: '\AppCompatFlags\Compatibility Assistant\Store\'
condition: selection
falsepositives:
- This rule is to explore new applications on an endpoint. False positives depends on the organization.
- Newly setup system.
- Legitimate installation of new application.
level: informational
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetObject|contains: '\AppCompatFlags\Compatibility Assistant\Store\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetObject | match |
| field:"TargetObject" kind:match value:"\AppCompatFlags\Compatibility Assistant\Store\" |
New PDQDeploy Service - Client Side
#Detects PDQDeploy service installation on the target system. When a package is deployed via PDQDeploy it installs a remote service on the target machine with the name "PDQDeployRunner-X" where "X" is an integer starting from 1
Known False Positives
- Legitimate use of the tool
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: New PDQDeploy Service - Client Side
id: b98a10af-1e1e-44a7-bab2-4cc026917648
status: test
description: |
Detects PDQDeploy service installation on the target system.
When a package is deployed via PDQDeploy it installs a remote service on the target machine with the name "PDQDeployRunner-X" where "X" is an integer starting from 1
references:
- https://documentation.pdq.com/PDQDeploy/13.0.3.0/index.html?windows-services.htm
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-07-22
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1543.003
logsource:
product: windows
service: system
detection:
selection_root:
Provider_Name: 'Service Control Manager'
EventID: 7045
selection_service:
- ImagePath|contains: 'PDQDeployRunner-'
- ServiceName|startswith: 'PDQDeployRunner-'
condition: all of selection_*
falsepositives:
- Legitimate use of the tool
level: medium
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_root
selection_root:
Provider_Name: 'Service Control Manager'
EventID: 7045
Stage 2: selection_service
selection_service:
- ImagePath|contains: 'PDQDeployRunner-'
- ServiceName|startswith: 'PDQDeployRunner-'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImagePath | match |
| field:"ImagePath" kind:match value:"PDQDeployRunner-" |
Provider_Name | eq |
| field:"Provider_Name" kind:eq value:"Service Control Manager" |
ServiceName | starts_with |
| field:"ServiceName" kind:starts_with value:"PDQDeployRunner-" |
New Remote Desktop Connection Initiated Via Mstsc.EXE
#Detects the usage of "mstsc.exe" with the "/v" flag to initiate a connection to a remote server. Adversaries may use valid accounts to log into a computer using the Remote Desktop Protocol (RDP). The adversary may then perform actions as the logged-on user.
Known False Positives
- WSL (Windows Sub System For Linux)
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: New Remote Desktop Connection Initiated Via Mstsc.EXE
id: 954f0af7-62dd-418f-b3df-a84bc2c7a774
status: test
description: |
Detects the usage of "mstsc.exe" with the "/v" flag to initiate a connection to a remote server.
Adversaries may use valid accounts to log into a computer using the Remote Desktop Protocol (RDP). The adversary may then perform actions as the logged-on user.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1021.001/T1021.001.md#t1021001---remote-desktop-protocol
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/mstsc
author: frack113
date: 2022-01-07
modified: 2024-06-04
tags:
- attack.lateral-movement
- attack.t1021.001
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\mstsc.exe'
- OriginalFileName: 'mstsc.exe'
selection_cli:
CommandLine|contains|windash: ' /v:'
filter_optional_wsl:
# Example: mstsc.exe /v:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /hvsocketserviceid:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /silent /wslg /plugin:WSLDVC /wslgsharedmemorypath:WSL\XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\wslg C:\ProgramData\Microsoft\WSL\wslg.rdp
ParentImage: 'C:\Windows\System32\lxss\wslhost.exe'
CommandLine|contains: 'C:\ProgramData\Microsoft\WSL\wslg.rdp'
condition: all of selection_* and not 1 of filter_optional_*
falsepositives:
- WSL (Windows Sub System For Linux)
level: medium
Stages and Predicates
Stage 0: condition
all of selection_* and not 1 of filter_optional_*Stage 1: selection_img
selection_img:
- Image|endswith: '\mstsc.exe'
- OriginalFileName: 'mstsc.exe'
Stage 2: selection_cli
selection_cli:
CommandLine|contains|windash: ' /v:'
Stage 3: not filter_optional_wsl
filter_optional_wsl:
ParentImage: 'C:\Windows\System32\lxss\wslhost.exe'
CommandLine|contains: 'C:\ProgramData\Microsoft\WSL\wslg.rdp'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:" /v:" |
Image | ends_with |
| field:"Image" kind:ends_with value:"\mstsc.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"mstsc.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
CommandLine | match | C:\ProgramData\Microsoft\WSL\wslg.rdp | excludes:CommandLine field:"CommandLine" value:"C:\ProgramData\Microsoft\WSL\wslg.rdp" |
ParentImage | eq | C:\Windows\System32\lxss\wslhost.exe | excludes:ParentImage field:"ParentImage" value:"C:\Windows\System32\lxss\wslhost.exe" |
Old TLS1.0/TLS1.1 Protocol Version Enabled
#Detects applications or users re-enabling old TLS versions by setting the "Enabled" value to "1" for the "Protocols" registry key.
Known False Positives
- Legitimate enabling of the old tls versions due to incompatibility
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: Old TLS1.0/TLS1.1 Protocol Version Enabled
id: 439957a7-ad86-4a8f-9705-a28131c6821b
status: test
description: Detects applications or users re-enabling old TLS versions by setting the "Enabled" value to "1" for the "Protocols" registry key.
references:
- https://techcommunity.microsoft.com/t5/windows-it-pro-blog/tls-1-0-and-tls-1-1-soon-to-be-disabled-in-windows/ba-p/3887947
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-09-05
tags:
- attack.stealth
logsource:
category: registry_set
product: windows
detection:
selection:
TargetObject|contains:
- '\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\'
- '\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\'
TargetObject|endswith: '\Enabled'
Details: 'DWORD (0x00000001)'
condition: selection
falsepositives:
- Legitimate enabling of the old tls versions due to incompatibility
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetObject|contains:
- '\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\'
- '\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\'
TargetObject|endswith: '\Enabled'
Details: 'DWORD (0x00000001)'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Details | eq |
| field:"Details" kind:eq value:"DWORD (0x00000001)" |
TargetObject | ends_with |
| field:"TargetObject" kind:ends_with value:"\Enabled" |
TargetObject | match |
| field:"TargetObject" kind:match |
Potential COM Objects Download Cradles Usage - PS Script
#Detects usage of COM objects that can be abused to download files in PowerShell by CLSID
Known False Positives
- Legitimate use of the library
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: Potential COM Objects Download Cradles Usage - PS Script
id: 3c7d1587-3b13-439f-9941-7d14313dbdfe
related:
- id: 02b64f1b-3f33-4e67-aede-ef3b0a5a8fcf
type: similar
status: test
description: Detects usage of COM objects that can be abused to download files in PowerShell by CLSID
references:
- https://learn.microsoft.com/en-us/dotnet/api/system.type.gettypefromclsid?view=net-7.0
- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=57
author: frack113
date: 2022-12-25
tags:
- attack.command-and-control
- attack.t1105
logsource:
product: windows
category: ps_script
definition: Script Block Logging must be enable
detection:
selection_1:
ScriptBlockText|contains: '[Type]::GetTypeFromCLSID('
selection_2:
ScriptBlockText|contains:
- '0002DF01-0000-0000-C000-000000000046'
- 'F6D90F16-9C73-11D3-B32E-00C04F990BB4'
- 'F5078F35-C551-11D3-89B9-0000F81FE221'
- '88d96a0a-f192-11d4-a65f-0040963251e5'
- 'AFBA6B42-5692-48EA-8141-DC517DCF0EF1'
- 'AFB40FFD-B609-40A3-9828-F88BBE11E4E3'
- '88d96a0b-f192-11d4-a65f-0040963251e5'
- '2087c2f4-2cef-4953-a8ab-66779b670495'
- '000209FF-0000-0000-C000-000000000046'
- '00024500-0000-0000-C000-000000000046'
condition: all of selection_*
falsepositives:
- Legitimate use of the library
level: medium
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_1
selection_1:
ScriptBlockText|contains: '[Type]::GetTypeFromCLSID('
Stage 2: selection_2
selection_2:
ScriptBlockText|contains:
- '0002DF01-0000-0000-C000-000000000046'
- 'F6D90F16-9C73-11D3-B32E-00C04F990BB4'
- 'F5078F35-C551-11D3-89B9-0000F81FE221'
- '88d96a0a-f192-11d4-a65f-0040963251e5'
- 'AFBA6B42-5692-48EA-8141-DC517DCF0EF1'
- 'AFB40FFD-B609-40A3-9828-F88BBE11E4E3'
- '88d96a0b-f192-11d4-a65f-0040963251e5'
- '2087c2f4-2cef-4953-a8ab-66779b670495'
- '000209FF-0000-0000-C000-000000000046'
- '00024500-0000-0000-C000-000000000046'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
Potential RemoteFXvGPUDisablement.EXE Abuse
#Detects PowerShell module creation where the module Contents are set to "function Get-VMRemoteFXPhysicalVideoAdapter". This could be a sign of potential abuse of the "RemoteFXvGPUDisablement.exe" binary which is known to be vulnerable to module load-order hijacking.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
title: Potential RemoteFXvGPUDisablement.EXE Abuse
id: f65e22f9-819e-4f96-9c7b-498364ae7a25
related:
- id: a6fc3c46-23b8-4996-9ea2-573f4c4d88c5 # ProcCreation
type: similar
- id: 38a7625e-b2cb-485d-b83d-aff137d859f4 # PS Module
type: similar
- id: cacef8fc-9d3d-41f7-956d-455c6e881bc5 # PS ScriptBlock
type: similar
status: test
description: Detects PowerShell module creation where the module Contents are set to "function Get-VMRemoteFXPhysicalVideoAdapter". This could be a sign of potential abuse of the "RemoteFXvGPUDisablement.exe" binary which is known to be vulnerable to module load-order hijacking.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1218/T1218.md
- https://github.com/redcanaryco/AtomicTestHarnesses/blob/7e1e4da116801e3d6fcc6bedb207064577e40572/TestHarnesses/T1218_SignedBinaryProxyExecution/InvokeRemoteFXvGPUDisablementCommand.ps1
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2021-07-13
modified: 2023-05-09
tags:
- attack.stealth
- attack.t1218
logsource:
product: windows
service: powershell-classic
definition: fields have to be extract from event
detection:
selection:
Data|contains: 'ModuleContents=function Get-VMRemoteFXPhysicalVideoAdapter {'
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Data|contains: 'ModuleContents=function Get-VMRemoteFXPhysicalVideoAdapter {'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Data | match |
| field:"Data" kind:match value:"ModuleContents=function Get-VMRemoteFXPhysicalVideoAdapter {" |
Potential Script Proxy Execution Via CL_Mutexverifiers.ps1
#Detects the use of the Microsoft signed script "CL_mutexverifiers" to proxy the execution of additional PowerShell script commands
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Potential Script Proxy Execution Via CL_Mutexverifiers.ps1
id: 1e0e1a81-e79b-44bc-935b-ddb9c8006b3d
status: test
description: Detects the use of the Microsoft signed script "CL_mutexverifiers" to proxy the execution of additional PowerShell script commands
references:
- https://lolbas-project.github.io/lolbas/Scripts/CL_mutexverifiers/
author: Nasreddine Bencherchali (Nextron Systems), oscd.community, Natalia Shornikova, frack113
date: 2022-05-21
modified: 2023-08-17
tags:
- attack.stealth
- attack.t1216
logsource:
category: process_creation
product: windows
detection:
selection_pwsh:
ParentImage|endswith:
# Note: to avoid potential FPs we assume the script was launched from powershell. But in theory it can be launched by any Powershell like process
- '\powershell.exe'
- '\pwsh.exe'
Image|endswith: '\powershell.exe'
CommandLine|contains: ' -nologo -windowstyle minimized -file '
selection_temp:
# Note: Since the function uses "env:temp" the value will change depending on the context of exec
CommandLine|contains:
- '\AppData\Local\Temp\'
- '\Windows\Temp\'
condition: all of selection_*
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_pwsh
selection_pwsh:
ParentImage|endswith:
- '\powershell.exe'
- '\pwsh.exe'
Image|endswith: '\powershell.exe'
CommandLine|contains: ' -nologo -windowstyle minimized -file '
Stage 2: selection_temp
selection_temp:
CommandLine|contains:
- '\AppData\Local\Temp\'
- '\Windows\Temp\'
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:"\powershell.exe" |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with |
PrinterNightmare Mimikatz Driver Name
#Detects static QMS 810 and mimikatz driver name used by Mimikatz as exploited in CVE-2021-1675 and CVE-2021-34527
Known False Positives
- Legitimate installation of printer driver QMS 810, Texas Instruments microLaser printer (unlikely)
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
Rule Body
title: PrinterNightmare Mimikatz Driver Name
id: ba6b9e43-1d45-4d3c-a504-1043a64c8469
status: test
description: Detects static QMS 810 and mimikatz driver name used by Mimikatz as exploited in CVE-2021-1675 and CVE-2021-34527
references:
- https://github.com/gentilkiwi/mimikatz/commit/c21276072b3f2a47a21e215a46962a17d54b3760
- https://www.lexjansen.com/sesug/1993/SESUG93035.pdf
- https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rprn/4464eaf0-f34f-40d5-b970-736437a21913
- https://nvd.nist.gov/vuln/detail/cve-2021-1675
- https://nvd.nist.gov/vuln/detail/cve-2021-34527
author: Markus Neis, @markus_neis, Florian Roth
date: 2021-07-04
modified: 2023-06-12
tags:
- attack.execution
- attack.t1204
- cve.2021-1675
- cve.2021-34527
- detection.emerging-threats
logsource:
product: windows
category: registry_event
detection:
selection:
TargetObject|contains:
- '\Control\Print\Environments\Windows x64\Drivers\Version-3\QMS 810\'
- '\Control\Print\Environments\Windows x64\Drivers\Version-3\mimikatz'
selection_alt:
TargetObject|contains|all:
- 'legitprinter'
- '\Control\Print\Environments\Windows'
selection_print:
TargetObject|contains:
- '\Control\Print\Environments'
- '\CurrentVersion\Print\Printers'
selection_kiwi:
TargetObject|contains:
- 'Gentil Kiwi'
- 'mimikatz printer'
- 'Kiwi Legit Printer'
condition: selection or selection_alt or (selection_print and selection_kiwi)
falsepositives:
- Legitimate installation of printer driver QMS 810, Texas Instruments microLaser printer (unlikely)
level: critical
Stages and Predicates
Stage 0: condition
selection or selection_alt or (selection_print and selection_kiwi)Stage 1: selection
selection:
TargetObject|contains:
- '\Control\Print\Environments\Windows x64\Drivers\Version-3\QMS 810\'
- '\Control\Print\Environments\Windows x64\Drivers\Version-3\mimikatz'
Stage 2: selection_alt
selection_alt:
TargetObject|contains|all:
- 'legitprinter'
- '\Control\Print\Environments\Windows'
Stage 3: selection_print
selection_print:
TargetObject|contains:
- '\Control\Print\Environments'
- '\CurrentVersion\Print\Printers'
Stage 4: selection_kiwi
selection_kiwi:
TargetObject|contains:
- 'Gentil Kiwi'
- 'mimikatz printer'
- 'Kiwi Legit Printer'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetObject | match |
| field:"TargetObject" kind:match |
PUA - AdFind.EXE Execution
#Detects execution of Adfind.exe utility, which can be used for reconnaissance in an Active Directory environment
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: PUA - AdFind.EXE Execution
id: 514e7e3e-b3b4-4a67-af60-be20f139198b
related:
- id: 455b9d50-15a1-4b99-853f-8d37655a4c1b
type: similar
status: experimental
description: Detects execution of Adfind.exe utility, which can be used for reconnaissance in an Active Directory environment
references:
- https://www.joeware.net/freetools/tools/adfind/
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1087.002/T1087.002.md
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-02-26
tags:
- attack.discovery
- attack.t1087.002
logsource:
product: windows
category: process_creation
detection:
selection:
- Image|endswith: '\AdFind.exe'
- OriginalFileName: 'AdFind.exe'
- Hashes|contains:
- 'IMPHASH=d144de8117df2beceaba2201ad304764'
- 'IMPHASH=12ce1c0f3f5837ecc18a3782408fa975'
- 'IMPHASH=bca5675746d13a1f246e2da3c2217492'
- 'IMPHASH=4fbf3f084fbbb2470b80b2013134df35'
- 'IMPHASH=49b639b4acbecc49d72a01f357aa4930'
- 'IMPHASH=53e117a96057eaf19c41380d0e87f1c2'
- 'IMPHASH=680dad9e300346e05a85023965867201'
- 'IMPHASH=21aa085d54992511b9f115355e468782'
condition: selection
falsepositives:
- Unknown
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_pua_adfind_execution/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
- Image|endswith: '\AdFind.exe'
- OriginalFileName: 'AdFind.exe'
- Hashes|contains:
- 'IMPHASH=d144de8117df2beceaba2201ad304764'
- 'IMPHASH=12ce1c0f3f5837ecc18a3782408fa975'
- 'IMPHASH=bca5675746d13a1f246e2da3c2217492'
- 'IMPHASH=4fbf3f084fbbb2470b80b2013134df35'
- 'IMPHASH=49b639b4acbecc49d72a01f357aa4930'
- 'IMPHASH=53e117a96057eaf19c41380d0e87f1c2'
- 'IMPHASH=680dad9e300346e05a85023965867201'
- 'IMPHASH=21aa085d54992511b9f115355e468782'
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:"\AdFind.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"AdFind.exe" |
RegAsm.EXE Execution Without CommandLine Flags or Files
#Detects the execution of "RegAsm.exe" without a commandline flag or file, which might indicate potential process injection activity. Usually "RegAsm.exe" should point to a dedicated DLL file or call the help with the "/?" flag.
Known False Positives
- Legitimate use of Regasm by developers.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: RegAsm.EXE Execution Without CommandLine Flags or Files
id: 651f87f7-12db-47f9-84c5-f27b081b94b6
status: experimental
description: |
Detects the execution of "RegAsm.exe" without a commandline flag or file, which might indicate potential process injection activity.
Usually "RegAsm.exe" should point to a dedicated DLL file or call the help with the "/?" flag.
references:
- https://www.mcafee.com/blogs/other-blogs/mcafee-labs/agent-teslas-unique-approach-vbs-and-steganography-for-delivery-and-intrusion/
- https://www.zscaler.fr/blogs/security-research/threat-actors-exploit-cve-2017-11882-deliver-agent-tesla
- https://learn.microsoft.com/en-us/dotnet/framework/tools/regasm-exe-assembly-registration-tool
- https://app.any.run/tasks/ea944b89-69d8-49c8-ac1f-5c76ad300db2
- https://www.joesandbox.com/analysis/1467354/0/html
author: frack113
date: 2025-06-04
tags:
- attack.stealth
- attack.t1218.009
logsource:
product: windows
category: process_creation
detection:
selection_img:
- Image|endswith: '\RegAsm.exe'
- OriginalFileName: 'RegAsm.exe'
selection_cli:
CommandLine|endswith:
- 'RegAsm'
- 'RegAsm.exe'
- 'RegAsm.exe"'
- "RegAsm.exe'"
condition: all of selection_*
falsepositives:
- Legitimate use of Regasm by developers.
# Note: You can increase after an initial baseline
level: low
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Image|endswith: '\RegAsm.exe'
- OriginalFileName: 'RegAsm.exe'
Stage 2: selection_cli
selection_cli:
CommandLine|endswith:
- 'RegAsm'
- 'RegAsm.exe'
- 'RegAsm.exe"'
- "RegAsm.exe'"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | ends_with |
| field:"CommandLine" kind:ends_with |
Image | ends_with |
| field:"Image" kind:ends_with value:"\RegAsm.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"RegAsm.exe" |
Remote Encrypting File System Abuse
#Detects remote RPC calls to possibly abuse remote encryption service via MS-EFSR
Known False Positives
- Legitimate usage of remote file encryption
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| RPCFW | Event ID 3: An RPC server function was called. |
Rule Body
title: Remote Encrypting File System Abuse
id: 5f92fff9-82e2-48eb-8fc1-8b133556a551
status: test
description: Detects remote RPC calls to possibly abuse remote encryption service via MS-EFSR
references:
- https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-36942
- https://github.com/jsecurity101/MSRPC-to-ATTACK/blob/ddd4608fe8684fcf2fcf9b48c5f0b3c28097f8a3/documents/MS-EFSR.md
- https://github.com/zeronetworks/rpcfirewall
- https://zeronetworks.com/blog/stopping-lateral-movement-via-the-rpc-firewall/
author: Sagie Dulce, Dekel Paz
date: 2022-01-01
tags:
- attack.lateral-movement
logsource:
product: rpc_firewall
category: application
definition: 'Requirements: install and apply the RPC Firewall to all processes with "audit:true action:block uuid:df1941c5-fe89-4e79-bf10-463657acf44d or c681d488-d850-11d0-8c52-00c04fd90f7e'
detection:
selection:
EventLog: RPCFW
EventID: 3
InterfaceUuid:
- df1941c5-fe89-4e79-bf10-463657acf44d
- c681d488-d850-11d0-8c52-00c04fd90f7e
condition: selection
falsepositives:
- Legitimate usage of remote file encryption
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventLog: RPCFW
EventID: 3
InterfaceUuid:
- df1941c5-fe89-4e79-bf10-463657acf44d
- c681d488-d850-11d0-8c52-00c04fd90f7e
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventLog | eq |
| field:"EventLog" kind:eq value:"RPCFW" |
InterfaceUuid | eq |
| field:"InterfaceUuid" kind:eq |
Renamed NirCmd.EXE Execution
#Detects the execution of a renamed "NirCmd.exe" binary based on the PE metadata fields.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Renamed NirCmd.EXE Execution
id: 264982dc-dbad-4dce-b707-1e0d3e0f73d9
status: test
description: Detects the execution of a renamed "NirCmd.exe" binary based on the PE metadata fields.
references:
- https://www.microsoft.com/en-us/security/blog/2024/01/17/new-ttps-observed-in-mint-sandstorm-campaign-targeting-high-profile-individuals-at-universities-and-research-orgs/
- https://www.nirsoft.net/utils/nircmd.html
author: X__Junior (Nextron Systems)
date: 2024-03-11
tags:
- attack.execution
- attack.stealth
- attack.t1059
- attack.t1202
logsource:
category: process_creation
product: windows
detection:
selection:
OriginalFileName: 'NirCmd.exe'
filter_main_img:
Image|endswith:
- '\nircmd.exe'
- '\nircmdc.exe'
condition: selection and not 1 of filter_main_*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
OriginalFileName: 'NirCmd.exe'
Stage 2: not filter_main_img
filter_main_img:
Image|endswith:
- '\nircmd.exe'
- '\nircmdc.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"NirCmd.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Image | ends_with | \nircmd.exe | excludes:Image field:"Image" value:"\nircmd.exe" |
Image | ends_with | \nircmdc.exe | excludes:Image field:"Image" value:"\nircmdc.exe" |
SharpHound enumeration via SMB named pipes
#Detects scenarios where an attacker enumerate different host via named pipes with SharpHound for discovery purposes.
Known False Positives
- Administrator activity, backup solutions, Windows Server Manager
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
Rule Body
title: SharpHound enumeration via SMB named pipes
description: Detects scenarios where an attacker enumerate different host via named pipes with SharpHound for discovery purposes.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0007-Discovery/T1135.xxx-Network%20Share%20Discovery
- https://docs.google.com/presentation/d/1OdufXKGYPgoV1d5jDrMYSe-SYKZ7lcA4w2MFn8AkUWE/edit
- https://www.youtube.com/watch?v=_GJDkbUTSLY
- https://community.rsa.com/t5/rsa-netwitness-platform-blog/keeping-an-eye-on-your-hounds/ba-p/519889
- https://bloodhound.readthedocs.io/en/latest/data-collection/sharphound.html
tags:
- attack.discovery
- attack.t1135
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: security
detection:
selection:
EventID: 5145
ShareName: '\\*\IPC$'
RelativeTargetName:
- lsarpc
- samr
- srvsvc # May also be triggered by other tools like DonPapi, CrackMapExec
filter:
IpAddress: '%administration_hosts%' # List of IPs of your administration hosts to reduce false positive
condition: selection and not filter | count(Computer) by IpAddress > 30
timeframe: 15m
falsepositives:
- Administrator activity, backup solutions, Windows Server Manager
level: medium
Stages and Predicates
Stage 0: condition
selection and not filter | count(Computer) by IpAddress > 30Stage 1: selection
selection:
EventID: 5145
ShareName: '\\*\IPC$'
RelativeTargetName:
- lsarpc
- samr
- srvsvc
Stage 2: not filter
filter:
IpAddress: '%administration_hosts%'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
RelativeTargetName | eq |
| field:"RelativeTargetName" kind:eq |
ShareName | wildcard |
| field:"ShareName" kind:wildcard value:"\\*\IPC$" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
IpAddress | eq | %administration_hosts% | excludes:IpAddress field:"IpAddress" value:"%administration_hosts%" |
Small Sieve Malware Registry Persistence
#Detects registry value with specific intentional typo and strings seen used by the Small Sieve malware
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: Small Sieve Malware Registry Persistence
id: 65c6e3c1-fb28-4c03-a51e-84919d8185f1
status: test
description: Detects registry value with specific intentional typo and strings seen used by the Small Sieve malware
references:
- https://www.ncsc.gov.uk/static-assets/documents/malware-analysis-reports/small-sieve/NCSC-MAR-Small-Sieve.pdf
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-05-19
modified: 2023-08-17
tags:
- attack.persistence
- detection.emerging-threats
logsource:
category: registry_set
product: windows
detection:
selection_path:
TargetObject|contains: '\Microsoft\Windows\CurrentVersion\Run\'
selection_value:
- TargetObject|contains: 'Microsift'
- Details|contains: '.exe Platypus'
condition: all of selection_*
falsepositives:
- Unlikely
level: high
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_path
selection_path:
TargetObject|contains: '\Microsoft\Windows\CurrentVersion\Run\'
Stage 2: selection_value
selection_value:
- TargetObject|contains: 'Microsift'
- Details|contains: '.exe Platypus'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Details | match |
| field:"Details" kind:match value:".exe Platypus" |
TargetObject | match |
| field:"TargetObject" kind:match |
SQL Server - Connection attempt using a disabled account
#Detects scenarios where an attacker attempts authenticate to the database using a disabled user accont
Known False Positives
- Miss configured accounts or scripts
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| MSSQLSERVER | Event ID 18470 |
| MSSQLSERVER | Event ID 33205 |
Rule Body
title: SQL Server - Connection attempt using a disabled account
description: Detects scenarios where an attacker attempts authenticate to the database using a disabled user accont
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0001-Initial%20access/T1078-Valid%20accounts
- https://www.eraofdata.com/sql-server/connectivity/login-failures/
- https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms366351(v=sql.105)
tags:
- attack.valid_account
- attack.t1078
author: mdecrevoisier
status: experimental
logsource:
product: mssql
category: application
detection:
selection_basic:
EventID: 18470
selection_advanced:
EventID: 33205
action_id:
- LGFL # FAILED_LOGIN_GROUP
- LGIF # LOGIN FAILED
class_type: LX # LOGIN
additional_information|contains: "<state>7</state>" # User account is disabled
condition: selection_basic or selection_advanced
falsepositives:
- Miss configured accounts or scripts
level: medium
Stages and Predicates
Stage 0: condition
selection_basic or selection_advancedStage 1: selection_basic
selection_basic:
EventID: 18470
Stage 2: selection_advanced
selection_advanced:
EventID: 33205
action_id:
- LGFL
- LGIF
class_type: LX
additional_information|contains: "<state>7</state>"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
action_id | eq |
| field:"action_id" kind:eq |
additional_information | match |
| field:"additional_information" kind:match value:"<state>7</state>" |
class_type | eq |
| field:"class_type" kind:eq value:"LX" |
Suspicious Extrac32 Alternate Data Stream Execution
#Extract data from cab file and hide it in an alternate data stream
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Suspicious Extrac32 Alternate Data Stream Execution
id: 4b13db67-0c45-40f1-aba8-66a1a7198a1e
status: test
description: Extract data from cab file and hide it in an alternate data stream
references:
- https://lolbas-project.github.io/lolbas/Binaries/Extrac32/
author: frack113
date: 2021-11-26
modified: 2022-12-30
tags:
- attack.stealth
- attack.t1564.004
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains|all:
- extrac32.exe
- .cab
CommandLine|re: ':[^\\]'
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|contains|all:
- extrac32.exe
- .cab
CommandLine|re: ':[^\\]'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
CommandLine | regex_match |
| field:"CommandLine" kind:regex_match value:":[^\]" |
Suspicious OAuth App File Download Activities
#Detects when a Microsoft Cloud App Security reported when an app downloads multiple files from Microsoft SharePoint or Microsoft OneDrive in a manner that is unusual for the user.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Exfiltration | No specific technique |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Microsoft 365 | Suspicious OAuth app file download activities |
Rule Body
title: Suspicious OAuth App File Download Activities
id: ee111937-1fe7-40f0-962a-0eb44d57d174
status: test
description: Detects when a Microsoft Cloud App Security reported when an app downloads multiple files from Microsoft SharePoint or Microsoft OneDrive in a manner that is unusual for the user.
references:
- https://learn.microsoft.com/en-us/defender-cloud-apps/anomaly-detection-policy
- https://learn.microsoft.com/en-us/defender-cloud-apps/policy-template-reference
author: Austin Songer @austinsonger
date: 2021-08-23
modified: 2022-10-09
tags:
- attack.exfiltration
logsource:
service: threat_management
product: m365
detection:
selection:
eventSource: SecurityComplianceCenter
eventName: 'Suspicious OAuth app file download activities'
status: success
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
eventSource: SecurityComplianceCenter
eventName: 'Suspicious OAuth app file download activities'
status: success
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
eventName | eq |
| field:"aws::eventName" kind:eq value:"Suspicious OAuth app file download activities" |
eventSource | eq |
| field:"aws::eventSource" kind:eq value:"SecurityComplianceCenter" |
status | eq |
| field:"status" kind:eq value:"success" |
Suspicious Reconnaissance Activity Using Get-LocalGroupMember Cmdlet
#Detects suspicious reconnaissance command line activity on Windows systems using the PowerShell Get-LocalGroupMember Cmdlet
Known False Positives
- Administrative activity
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| 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: Suspicious Reconnaissance Activity Using Get-LocalGroupMember Cmdlet
id: c8a180d6-47a3-4345-a609-53f9c3d834fc
related:
- id: cef24b90-dddc-4ae1-a09a-8764872f69fc
type: similar
status: test
description: Detects suspicious reconnaissance command line activity on Windows systems using the PowerShell Get-LocalGroupMember Cmdlet
references:
- https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-10-10
tags:
- attack.discovery
- attack.t1087.001
logsource:
category: process_creation
product: windows
detection:
# Covers group and localgroup flags
selection_cmdlet:
CommandLine|contains: 'Get-LocalGroupMember '
selection_group:
CommandLine|contains:
# Add more groups for other languages
- 'domain admins'
- ' administrator' # Typo without an 'S' so we catch both
- ' administrateur' # Typo without an 'S' so we catch both
- 'enterprise admins'
- 'Exchange Trusted Subsystem'
- 'Remote Desktop Users'
- 'Utilisateurs du Bureau à distance' # French for "Remote Desktop Users"
- 'Usuarios de escritorio remoto' # Spanish for "Remote Desktop Users"
condition: all of selection_*
falsepositives:
- Administrative activity
level: medium
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_cmdlet
selection_cmdlet:
CommandLine|contains: 'Get-LocalGroupMember '
Stage 2: selection_group
selection_group:
CommandLine|contains:
- 'domain admins'
- ' administrator'
- ' administrateur'
- 'enterprise admins'
- 'Exchange Trusted Subsystem'
- 'Remote Desktop Users'
- 'Utilisateurs du Bureau à distance'
- 'Usuarios de escritorio remoto'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
User Removed From Group With CA Policy Modification Access
#Monitor and alert on group membership removal of groups that have CA policy modification access
Known False Positives
- User removed from the group is approved
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation | |
| Defense Impairment | |
| Credential Access |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Azure | Remove member from group |
Rules Detecting the Same Action
These rules filter on the same operation.
- Conditional Access - Dynamic Group Exclusion Changes (Kusto)
- Detect suspicious conditional access policy modifications (Kusto)
- Detecting Impossible travel with mailbox permission tampering & Privilege Escalation attempt (Kusto)
- Entra ID Successful Group Deletion (YARA-L)
- Guest accounts added in Entra ID Groups other than the ones specified (Kusto)
Rule Body
title: User Removed From Group With CA Policy Modification Access
id: 665e2d43-70dc-4ccc-9d27-026c9dd7ed9c
status: test
description: Monitor and alert on group membership removal of groups that have CA policy modification access
references:
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-infrastructure#conditional-access
author: Mark Morowczynski '@markmorow', Thomas Detzner '@tdetzner'
date: 2022-08-04
tags:
- attack.privilege-escalation
- attack.credential-access
- attack.persistence
- attack.defense-impairment
- attack.t1548
- attack.t1556
logsource:
product: azure
service: auditlogs
detection:
selection:
properties.message: Remove member from group
condition: selection
falsepositives:
- User removed from the group is approved
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
properties.message: Remove member from group
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
properties.message | eq |
| field:"properties.message" kind:eq value:"Remove member from group" |