Detection rules › Sigma
Sigma rules: 0v
Creation Exe for Service with Unquoted Path
#Adversaries may execute their own malicious payloads by hijacking vulnerable file path references. Adversaries can take advantage of paths that lack surrounding quotations by placing an executable in a higher level directory within the path, so that Windows will choose the adversary's executable to launch.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: Creation Exe for Service with Unquoted Path
id: 8c3c76ca-8f8b-4b1d-aaf3-81aebcd367c9
status: test
description: |
Adversaries may execute their own malicious payloads by hijacking vulnerable file path references.
Adversaries can take advantage of paths that lack surrounding quotations by placing an executable in a higher level directory within the path, so that Windows will choose the adversary's executable to launch.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1574.009/T1574.009.md
author: frack113
date: 2021-12-30
tags:
- attack.privilege-escalation
- attack.persistence
- attack.t1547.009
logsource:
product: windows
category: file_event
detection:
selection:
# Feel free to add more
TargetFilename: 'C:\program.exe'
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetFilename: 'C:\program.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | eq |
| field:"TargetFilename" kind:eq value:"C:\program.exe" |
DLL Execution Via Register-cimprovider.exe
#Detects using register-cimprovider.exe to execute arbitrary dll file.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: DLL Execution Via Register-cimprovider.exe
id: a2910908-e86f-4687-aeba-76a5f996e652
status: test
description: Detects using register-cimprovider.exe to execute arbitrary dll file.
references:
- https://twitter.com/PhilipTsukerman/status/992021361106268161
- https://lolbas-project.github.io/lolbas/Binaries/Register-cimprovider/
author: Ivan Dyachkov, Yulia Fomina, oscd.community
date: 2020-10-07
modified: 2021-11-27
tags:
- attack.privilege-escalation
- attack.persistence
- attack.execution
- attack.stealth
- attack.t1574
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\register-cimprovider.exe'
CommandLine|contains|all:
- '-path'
- 'dll'
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image|endswith: '\register-cimprovider.exe'
CommandLine|contains|all:
- '-path'
- '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:"\register-cimprovider.exe" |
DLL Names Used By SVR For GraphicalProton Backdoor
#Hunts known SVR-specific DLL names.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 7: Image loaded |
Rule Body
title: DLL Names Used By SVR For GraphicalProton Backdoor
id: e64c8ef3-9f98-40c8-b71e-96110991cb4c
status: test
description: Hunts known SVR-specific DLL names.
references:
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-347a
author: CISA
date: 2023-12-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.execution
- attack.stealth
- attack.t1574.001
- detection.emerging-threats
logsource:
category: image_load
product: windows
detection:
selection:
ImageLoaded|endswith:
- '\AclNumsInvertHost.dll'
- '\AddressResourcesSpec.dll'
- '\BlendMonitorStringBuild.dll'
- '\ChildPaletteConnected.dll'
- '\DeregisterSeekUsers.dll'
- '\HandleFrequencyAll.dll'
- '\HardSwapColor.dll'
- '\LengthInMemoryActivate.dll'
- '\ModeBitmapNumericAnimate.dll'
- '\ModeFolderSignMove.dll'
- '\ParametersNamesPopup.dll'
- '\PerformanceCaptionApi.dll'
- '\ScrollbarHandleGet.dll'
- '\UnregisterAncestorAppendAuto.dll'
- '\WowIcmpRemoveReg.dll'
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ImageLoaded|endswith:
- '\AclNumsInvertHost.dll'
- '\AddressResourcesSpec.dll'
- '\BlendMonitorStringBuild.dll'
- '\ChildPaletteConnected.dll'
- '\DeregisterSeekUsers.dll'
- '\HandleFrequencyAll.dll'
- '\HardSwapColor.dll'
- '\LengthInMemoryActivate.dll'
- '\ModeBitmapNumericAnimate.dll'
- '\ModeFolderSignMove.dll'
- '\ParametersNamesPopup.dll'
- '\PerformanceCaptionApi.dll'
- '\ScrollbarHandleGet.dll'
- '\UnregisterAncestorAppendAuto.dll'
- '\WowIcmpRemoveReg.dll'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImageLoaded | ends_with |
| field:"ImageLoaded" kind:ends_with |
DNS Query to External Service Interaction Domains
#Detects DNS queries to well-known out-of-band application security testing (OAST) and callback domains. These services (e.g. Burp Collaborator, interactsh, canarytokens, dnslog.cn) are used by security researchers and attackers alike to confirm blind vulnerabilities such as SSRF, XXE, blind RCE, and Log4Shell-style injections, where the exploit payload triggers an external DNS lookup to a controlled domain. A detection indicates that a host on your network resolved one of these domains, which may mean: (1) an attacker is actively probing or exploiting a vulnerable service and using the callback to confirm code execution or data exfiltration, (2) a security scanner (e.g. Nuclei, Gobies) is running against internal targets. Investigate the source host, the full DNS query string (the unique subdomain prefix encodes the callback session), and any concurrent outbound connections or process activity to determine intent.
Known False Positives
- Legitimate security scanning.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Reconnaissance | |
| Initial Access |
Rule Body
title: DNS Query to External Service Interaction Domains
id: aff715fa-4dd5-497a-8db3-910bea555566
status: test
description: |
Detects DNS queries to well-known out-of-band application security testing (OAST) and callback domains.
These services (e.g. Burp Collaborator, interactsh, canarytokens, dnslog.cn) are used by security
researchers and attackers alike to confirm blind vulnerabilities such as SSRF, XXE, blind RCE, and
Log4Shell-style injections, where the exploit payload triggers an external DNS lookup to a controlled domain.
A detection indicates that a host on your network resolved one of these domains, which may mean:
(1) an attacker is actively probing or exploiting a vulnerable service and using the callback to
confirm code execution or data exfiltration,
(2) a security scanner (e.g. Nuclei, Gobies) is running against internal targets.
Investigate the source host, the full DNS query string (the unique subdomain prefix encodes the callback session),
and any concurrent outbound connections or process activity to determine intent.
references:
- https://twitter.com/breakersall/status/1533493587828260866
- https://www.bitdefender.com/en-us/blog/businessinsights/bitdefender-advisory-critical-unauthenticated-rce-windows-server-update-services-cve-2025-59287
- https://github.com/SigmaHQ/sigma/pull/5724#issuecomment-3466382234
- https://hunt.io/blog/open-directory-nginx-rift-ghost-cms-multi-cve
author: Florian Roth (Nextron Systems), Matt Kelly (list of domains)
date: 2022-06-07
modified: 2026-08-28
tags:
- attack.initial-access
- attack.t1190
- attack.reconnaissance
- attack.t1595.002
logsource:
category: dns
detection:
selection:
query|endswith:
- '.burpcollaborator.net' # Portswigger Burpsuite Collaborator
- '.canarytokens.com' # Thinkst Canary Canarytokens
- '.ceye.io'
- '.ddns.1433.eu.org' # dig.pm
- '.ddns.bypass.eu.org' # dig.pm
- '.ddns.xn--gg8h.eu.org' # dig.pm
- '.digimg.store' # dnslog.ink
- '.dns.su18.org' # javaweb.org
- '.dnshook.site' # webhook.site
- '.dnslog.cn'
- '.dnslog.ink' # dnslog.ink
- '.gobygo.net' # gobies.org
- '.instances.httpworkbench.com' # httpworkbench.com
- '.interact.sh' # Project Discovery Interactsh
- '.log.dnslog.pp.ua' # dnslog.org
- '.log.dnslog.qzz.io' # dnslog.org
- '.log.dnslogs.dpdns.org' # dnslog.org
- '.log.javaweb.org' # javaweb.org
- '.log.nat.cloudns.ph' # dnslog.org
- '.oast.fun' # Project Discovery Interactsh
- '.oast.live' # Project Discovery Interactsh
- '.oast.me' # Project Discovery Interactsh
- '.oast.online' # Project Discovery Interactsh
- '.oast.pro' # Project Discovery Interactsh
- '.oast.site' # Project Discovery Interactsh
- '.oastify.com' # Portswigger Burpsuite Collaborator
- '.p8.lol' # javaweb.org
- '.requestbin.net'
filter_main_polling:
query|contains: 'polling.oastify.com'
condition: selection and not 1 of filter_main_*
falsepositives:
- Legitimate security scanning.
level: high
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
query|endswith:
- '.burpcollaborator.net'
- '.canarytokens.com'
- '.ceye.io'
- '.ddns.1433.eu.org'
- '.ddns.bypass.eu.org'
- '.ddns.xn--gg8h.eu.org'
- '.digimg.store'
- '.dns.su18.org'
- '.dnshook.site'
- '.dnslog.cn'
- '.dnslog.ink'
- '.gobygo.net'
- '.instances.httpworkbench.com'
- '.interact.sh'
- '.log.dnslog.pp.ua'
- '.log.dnslog.qzz.io'
- '.log.dnslogs.dpdns.org'
- '.log.javaweb.org'
- '.log.nat.cloudns.ph'
- '.oast.fun'
- '.oast.live'
- '.oast.me'
- '.oast.online'
- '.oast.pro'
- '.oast.site'
- '.oastify.com'
- '.p8.lol'
- '.requestbin.net'
Stage 2: not filter_main_polling
filter_main_polling:
query|contains: 'polling.oastify.com'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
query | ends_with |
| field:"query" kind:ends_with |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
query | match | polling.oastify.com | excludes:query field:"query" value:"polling.oastify.com" |
Group discovery (command)
#Detects scenarios where an attacker attempts to enumerate local or domain groups via commandline.
Known False Positives
- Pentest
- Administrator activity
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: Group discovery (command)
description: Detects scenarios where an attacker attempts to enumerate local or domain groups via commandline.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0007-Discovery/T1069-Permission%20Groups%20Discovery
- https://blogs.jpcert.or.jp/en/2016/01/windows-commands-abused-by-attackers.html
- https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Windows%20-%20Privilege%20Escalation.md
- https://attack.mitre.org/software/S0039/
- https://regex101.com/r/S6vTNM/1
tags:
- attack.discovery
- attack.t1069.001 # Permission Groups Discovery: Local Groups
- attack.t1069.002 # Permission Groups Discovery: Domain Groups
- attack.t1087.002 # Account Discovery: Domain Account
author: mdecrevoisier
logsource:
product: windows
category: process_creation
detection:
selection: # Full command example: 'net group "Domain Admins" /domain'
NewProcessName|endswith:
- '\net.exe'
- '\net1.exe'
CommandLine|contains:
- group
- localgroup
filter:
CommandLine|contains: add # refers to another use case for groupe membership change creation via commandline
condition: selection and not filter
falsepositives:
- Pentest
- Administrator activity
level: medium
Stages and Predicates
Stage 0: condition
selection and not filterStage 1: selection
selection:
NewProcessName|endswith:
- '\net.exe'
- '\net1.exe'
CommandLine|contains:
- group
- localgroup
Stage 2: not filter
filter:
CommandLine|contains: add
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 |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
CommandLine | match | add | excludes:CommandLine field:"CommandLine" value:"add" |
HackTool - CrackMapExec Execution
#This rule detect common flag combinations used by CrackMapExec in order to detect its use even if the binary has been replaced.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Persistence | |
| Privilege Escalation | |
| Credential Access | |
| 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: HackTool - CrackMapExec Execution
id: 42a993dd-bb3e-48c8-b372-4d6684c4106c
status: test
description: This rule detect common flag combinations used by CrackMapExec in order to detect its use even if the binary has been replaced.
references:
- https://mpgn.gitbook.io/crackmapexec/smb-protocol/authentication/checking-credentials-local
- https://www.mandiant.com/resources/telegram-malware-iranian-espionage
- https://www.infosecmatter.com/crackmapexec-module-library/?cmem=mssql-mimikatz
- https://www.infosecmatter.com/crackmapexec-module-library/?cmem=smb-pe_inject
author: Florian Roth (Nextron Systems)
date: 2022-02-25
modified: 2023-03-08
tags:
- attack.execution
- attack.persistence
- attack.privilege-escalation
- attack.credential-access
- attack.discovery
- attack.t1047
- attack.t1053
- attack.t1059.003
- attack.t1059.001
- attack.t1110
- attack.t1201
logsource:
category: process_creation
product: windows
detection:
selection_binary:
Image|endswith: '\crackmapexec.exe'
selection_special:
CommandLine|contains: ' -M pe_inject '
selection_execute:
CommandLine|contains|all:
- ' --local-auth'
- ' -u '
- ' -x '
selection_hash:
CommandLine|contains|all:
- ' --local-auth'
- ' -u '
- ' -p '
- " -H 'NTHASH'"
selection_module_mssql:
CommandLine|contains|all:
- ' mssql '
- ' -u '
- ' -p '
- ' -M '
- ' -d '
selection_module_smb1:
CommandLine|contains|all:
- ' smb '
- ' -u '
- ' -H '
- ' -M '
- ' -o '
selection_module_smb2:
CommandLine|contains|all:
- ' smb '
- ' -u '
- ' -p '
- ' --local-auth'
part_localauth_1:
CommandLine|contains|all:
- ' --local-auth'
- ' -u '
- ' -p '
part_localauth_2:
CommandLine|contains|all:
- ' 10.'
- ' 192.168.'
- '/24 '
condition: 1 of selection_* or all of part_localauth*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
1 of selection_* or all of part_localauth*Stage 1: selection_binary
selection_binary:
Image|endswith: '\crackmapexec.exe'
Stage 2: selection_special
selection_special:
CommandLine|contains: ' -M pe_inject '
Stage 3: selection_execute
selection_execute:
CommandLine|contains|all:
- ' --local-auth'
- ' -u '
- ' -x '
Stage 4: selection_hash
selection_hash:
CommandLine|contains|all:
- ' --local-auth'
- ' -u '
- ' -p '
- " -H 'NTHASH'"
Stage 5: selection_module_mssql
selection_module_mssql:
CommandLine|contains|all:
- ' mssql '
- ' -u '
- ' -p '
- ' -M '
- ' -d '
Stage 6: selection_module_smb1
selection_module_smb1:
CommandLine|contains|all:
- ' smb '
- ' -u '
- ' -H '
- ' -M '
- ' -o '
Stage 7: selection_module_smb2
selection_module_smb2:
CommandLine|contains|all:
- ' smb '
- ' -u '
- ' -p '
- ' --local-auth'
Stage 8: part_localauth_1
part_localauth_1:
CommandLine|contains|all:
- ' --local-auth'
- ' -u '
- ' -p '
Stage 9: part_localauth_2
part_localauth_2:
CommandLine|contains|all:
- ' 10.'
- ' 192.168.'
- '/24 '
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:"\crackmapexec.exe" |
Lazarus Group Activity
#Detects different process execution behaviors as described in various threat reports on Lazarus group activity
Known False Positives
- Unlikely
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: Lazarus Group Activity
id: 24c4d154-05a4-4b99-b57d-9b977472443a
related:
- id: 7b49c990-4a9a-4e65-ba95-47c9cc448f6e
type: obsolete
status: test
description: Detects different process execution behaviors as described in various threat reports on Lazarus group activity
references:
- https://securelist.com/lazarus-covets-covid-19-related-intelligence/99906/
- https://www.hvs-consulting.de/lazarus-report/
author: Florian Roth (Nextron Systems), wagga
date: 2020-12-23
modified: 2023-03-10
tags:
- attack.g0032
- attack.execution
- attack.t1059
- detection.emerging-threats
logsource:
category: process_creation
product: windows
detection:
selection_generic:
CommandLine|contains:
- 'reg.exe save hklm\sam %temp%\~reg_sam.save'
- '1q2w3e4r@#$@#$@#$'
- ' -hp1q2w3e4 '
- '.dat data03 10000 -p '
selection_netstat:
CommandLine|contains|all:
- 'netstat -aon | find '
- 'ESTA'
- ' > %temp%\~'
# Network share discovery
selection_network_discovery:
CommandLine|contains|all:
- '.255 10 C:\ProgramData\IBM\'
- '.DAT'
selection_persistence:
CommandLine|contains|all:
- ' /c '
- ' -p 0x'
CommandLine|contains:
- 'C:\ProgramData\'
- 'C:\RECYCLER\'
selection_rundll32:
CommandLine|contains|all:
- 'rundll32 '
- 'C:\ProgramData\'
CommandLine|contains:
- '.bin,'
- '.tmp,'
- '.dat,'
- '.io,'
- '.ini,'
- '.db,'
condition: 1 of selection_*
falsepositives:
- Unlikely
level: critical
Stages and Predicates
Stage 0: condition
1 of selection_*Stage 1: selection_generic
selection_generic:
CommandLine|contains:
- 'reg.exe save hklm\sam %temp%\~reg_sam.save'
- '1q2w3e4r@#$@#$@#$'
- ' -hp1q2w3e4 '
- '.dat data03 10000 -p '
Stage 2: selection_netstat
selection_netstat:
CommandLine|contains|all:
- 'netstat -aon | find '
- 'ESTA'
- ' > %temp%\~'
Stage 3: selection_network_discovery
selection_network_discovery:
CommandLine|contains|all:
- '.255 10 C:\ProgramData\IBM\'
- '.DAT'
Stage 4: selection_persistence
selection_persistence:
CommandLine|contains|all:
- ' /c '
- ' -p 0x'
CommandLine|contains:
- 'C:\ProgramData\'
- 'C:\RECYCLER\'
Stage 5: selection_rundll32
selection_rundll32:
CommandLine|contains|all:
- 'rundll32 '
- 'C:\ProgramData\'
CommandLine|contains:
- '.bin,'
- '.tmp,'
- '.dat,'
- '.io,'
- '.ini,'
- '.db,'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Microsoft Defender signatures not up to date
#Detects scenarios where Defender signatures are outdated.
Known False Positives
- Unconnected systems to internet
- Missconfigured systems unable to reach their signature update server (SCCM/SCEP/WSUS)
- System offline during long duration
- Windows system with license hack (date set to +10 years)
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Windows-Defender | Event ID 1151: Endpoint Protection client health report (time in UTC). |
Rule Body
title: Microsoft Defender signatures not up to date
description: Detects scenarios where Defender signatures are outdated.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/Antivirus
- https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-antivirus/troubleshoot-microsoft-defender-antivirus
tags:
- malware
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: windefend
detection:
selection_event:
EventID: 1151
selection_age : # Signature age in days
- Last AS signature age
- Last AV signature age
- Last AS security intelligence age
- Last AV security intelligence age
condition: selection_event and (selection_age > 7)
falsepositives:
- Unconnected systems to internet
- Missconfigured systems unable to reach their signature update server (SCCM/SCEP/WSUS)
- System offline during long duration
- Windows system with license hack (date set to +10 years)
level: medium
Stages and Predicates
Stage 0: condition
selection_event and (selection_age > 7)Stage 1: selection_event
selection_event:
EventID: 1151
Stage 2: selection_age
selection_age :
- Last AS signature age
- Last AV signature age
- Last AS security intelligence age
- Last AV security intelligence age
MMC Spawning Windows Shell
#Detects a Windows command line executable started from MMC
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
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: MMC Spawning Windows Shell
id: 05a2ab7e-ce11-4b63-86db-ab32e763e11d
status: test
description: Detects a Windows command line executable started from MMC
references:
- https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/
author: Karneades, Swisscom CSIRT
date: 2019-08-05
modified: 2022-07-14
tags:
- attack.lateral-movement
- attack.t1021.003
logsource:
category: process_creation
product: windows
detection:
selection1:
ParentImage|endswith: '\mmc.exe'
selection2:
- Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\sh.exe'
- '\bash.exe'
- '\reg.exe'
- '\regsvr32.exe'
- Image|contains: '\BITSADMIN'
condition: all of selection*
level: high
Stages and Predicates
Stage 0: condition
all of selection*Stage 1: selection1
selection1:
ParentImage|endswith: '\mmc.exe'
Stage 2: selection2
selection2:
- Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\sh.exe'
- '\bash.exe'
- '\reg.exe'
- '\regsvr32.exe'
- Image|contains: '\BITSADMIN'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with |
Image | match |
| field:"Image" kind:match value:"\BITSADMIN" |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with value:"\mmc.exe" |
Octopus Scanner Malware
#Detects Octopus Scanner Malware.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: Octopus Scanner Malware
id: 805c55d9-31e6-4846-9878-c34c75054fe9
status: test
description: Detects Octopus Scanner Malware.
references:
- https://securitylab.github.com/research/octopus-scanner-malware-open-source-supply-chain
author: NVISO
date: 2020-06-09
modified: 2021-11-27
tags:
- attack.initial-access
- attack.t1195
- attack.t1195.001
logsource:
product: windows
category: file_event
detection:
selection:
TargetFilename|endswith:
- '\AppData\Local\Microsoft\Cache134.dat'
- '\AppData\Local\Microsoft\ExplorerSync.db'
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetFilename|endswith:
- '\AppData\Local\Microsoft\Cache134.dat'
- '\AppData\Local\Microsoft\ExplorerSync.db'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with |
Okta Security Threat Detected
#Detects when an security threat is detected in Okta.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control | No specific technique |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Okta | System Log event type security.threat.detected: Request from malicious IP detected by ThreatInsight |
Rules Detecting the Same Action
These rules filter on the same operation.
- Device Registration from Malicious IP (Kusto)
- Okta ThreatInsight Login Failure With High Unknown Users (YARA-L)
- Okta ThreatInsight Security Threat Detected (Panther)
- Okta ThreatInsight Suspected Bruteforce Attack (YARA-L)
- Okta ThreatInsight Suspected Password Spray Attack (YARA-L)
- Okta ThreatInsight Threat Detected (Splunk)
- Okta ThreatInsight Threat Suspected Promotion (Elastic)
Rule Body
title: Okta Security Threat Detected
id: 5c82f0b9-3c6d-477f-a318-0e14a1df73e0
status: test
description: Detects when an security threat is detected in Okta.
references:
- https://okta.github.io/okta-help/en/prod/Content/Topics/Security/threat-insight/configure-threatinsight-system-log.htm
- https://developer.okta.com/docs/reference/api/system-log/
- https://developer.okta.com/docs/reference/api/event-types/
author: Austin Songer @austinsonger
date: 2021-09-12
modified: 2026-04-27
tags:
- attack.command-and-control
logsource:
product: okta
service: okta
detection:
selection:
eventType: security.threat.detected
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
eventType: security.threat.detected
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
eventType | eq |
| field:"eventType" kind:eq value:"security.threat.detected" |
Outbound RDP Connections Over Non-Standard Tools
#Detects Non-Standard tools initiating a connection over port 3389 indicating possible lateral movement. An initial baseline is required before using this utility to exclude third party RDP tooling that you might use.
Known False Positives
- Third party RDP tools
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 3: Network connection |
Rule Body
title: Outbound RDP Connections Over Non-Standard Tools
id: ed74fe75-7594-4b4b-ae38-e38e3fd2eb23
status: test
description: |
Detects Non-Standard tools initiating a connection over port 3389 indicating possible lateral movement.
An initial baseline is required before using this utility to exclude third party RDP tooling that you might use.
references:
- https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0708
author: Markus Neis
date: 2019-05-15
modified: 2024-02-09
tags:
- attack.lateral-movement
- attack.t1021.001
- car.2013-07-002
logsource:
category: network_connection
product: windows
detection:
selection:
DestinationPort: 3389
Initiated: 'true'
filter_main_mstsc:
Image:
- 'C:\Windows\System32\mstsc.exe'
- 'C:\Windows\SysWOW64\mstsc.exe'
filter_optional_dns:
# Note: https://github.com/SigmaHQ/sigma/pull/2249
Image: 'C:\Windows\System32\dns.exe'
SourcePort: 53
Protocol: 'udp'
filter_optional_avast:
Image|endswith:
- '\Avast Software\Avast\AvastSvc.exe'
- '\Avast\AvastSvc.exe'
filter_optional_sysinternals_rdcman:
Image|endswith: '\RDCMan.exe'
filter_optional_chrome:
Image: 'C:\Program Files\Google\Chrome\Application\chrome.exe'
filter_optional_third_party:
Image|endswith:
- '\FSAssessment.exe'
- '\FSDiscovery.exe'
- '\MobaRTE.exe'
- '\mRemote.exe'
- '\mRemoteNG.exe'
- '\Passwordstate.exe'
- '\RemoteDesktopManager.exe'
- '\RemoteDesktopManager64.exe'
- '\RemoteDesktopManagerFree.exe'
- '\RSSensor.exe'
- '\RTS2App.exe'
- '\RTSApp.exe'
- '\spiceworks-finder.exe'
- '\Terminals.exe'
- '\ws_TunnelService.exe'
filter_optional_thor:
Image|endswith:
- '\thor.exe'
- '\thor64.exe'
filter_optional_splunk:
Image|startswith: 'C:\Program Files\SplunkUniversalForwarder\bin\'
filter_optional_sentinel_one:
Image|endswith: '\Ranger\SentinelRanger.exe'
filter_optional_firefox:
Image: 'C:\Program Files\Mozilla Firefox\firefox.exe'
filter_optional_tsplus: # Some RAS
Image:
- 'C:\Program Files\TSplus\Java\bin\HTML5service.exe'
- 'C:\Program Files (x86)\TSplus\Java\bin\HTML5service.exe'
filter_optional_null:
Image: null
filter_optional_empty:
Image: ''
filter_optional_unknown:
Image: '<unknown process>'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- Third party RDP tools
level: high
regression_tests_path: regression_data/rules/windows/network_connection/net_connection_win_rdp_outbound_over_non_standard_tools/info.yml
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_* and not 1 of filter_optional_*Stage 1: selection
selection:
DestinationPort: 3389
Initiated: 'true'
Stage 2: not filter_main_mstsc
filter_main_mstsc:
Image:
- 'C:\Windows\System32\mstsc.exe'
- 'C:\Windows\SysWOW64\mstsc.exe'
Stage 3: not filter_optional_*
filter_optional_dns:
Image: 'C:\Windows\System32\dns.exe'
SourcePort: 53
Protocol: 'udp'
filter_optional_avast:
Image|endswith:
- '\Avast Software\Avast\AvastSvc.exe'
- '\Avast\AvastSvc.exe'
filter_optional_sysinternals_rdcman:
Image|endswith: '\RDCMan.exe'
filter_optional_chrome:
Image: 'C:\Program Files\Google\Chrome\Application\chrome.exe'
filter_optional_third_party:
Image|endswith:
- '\FSAssessment.exe'
- '\FSDiscovery.exe'
- '\MobaRTE.exe'
- '\mRemote.exe'
- '\mRemoteNG.exe'
- '\Passwordstate.exe'
- '\RemoteDesktopManager.exe'
- '\RemoteDesktopManager64.exe'
- '\RemoteDesktopManagerFree.exe'
- '\RSSensor.exe'
- '\RTS2App.exe'
- '\RTSApp.exe'
- '\spiceworks-finder.exe'
- '\Terminals.exe'
- '\ws_TunnelService.exe'
filter_optional_thor:
Image|endswith:
- '\thor.exe'
- '\thor64.exe'
filter_optional_splunk:
Image|startswith: 'C:\Program Files\SplunkUniversalForwarder\bin\'
filter_optional_sentinel_one:
Image|endswith: '\Ranger\SentinelRanger.exe'
filter_optional_firefox:
Image: 'C:\Program Files\Mozilla Firefox\firefox.exe'
filter_optional_tsplus:
Image:
- 'C:\Program Files\TSplus\Java\bin\HTML5service.exe'
- 'C:\Program Files (x86)\TSplus\Java\bin\HTML5service.exe'
filter_optional_null:
Image: null
filter_optional_empty:
Image: ''
filter_optional_unknown:
Image: '<unknown process>'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
DestinationPort | eq |
| field:"DestinationPort" kind:eq value:"3389" |
Initiated | eq |
| field:"Initiated" kind:eq value:"true" |
Exclusions
The rule actively suppresses these predicates.
Potential DLL Sideloading Of DBGHELP.DLL
#Detects potential DLL sideloading of "dbghelp.dll"
Known False Positives
- Legitimate applications loading their own versions of the DLL mentioned in this rule
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 7: Image loaded |
Rule Body
title: Potential DLL Sideloading Of DBGHELP.DLL
id: 6414b5cd-b19d-447e-bb5e-9f03940b5784
status: test
description: Detects potential DLL sideloading of "dbghelp.dll"
references:
- https://hijacklibs.net/ # For list of DLLs that could be sideloaded (search for dlls mentioned here in there)
author: Nasreddine Bencherchali (Nextron Systems), Wietze Beukema (project and research)
date: 2022-10-25
modified: 2025-10-07
tags:
- attack.persistence
- attack.privilege-escalation
- attack.execution
- attack.stealth
- attack.t1574.001
logsource:
category: image_load
product: windows
detection:
selection:
ImageLoaded|endswith: '\dbghelp.dll'
filter_main_generic:
ImageLoaded|startswith:
- 'C:\Program Files (x86)\'
- 'C:\Program Files\'
- 'C:\Windows\SoftwareDistribution\'
- 'C:\Windows\System32\'
- 'C:\Windows\SystemTemp\'
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\WinSxS\'
filter_optional_anaconda:
ImageLoaded|endswith:
- '\Anaconda3\Lib\site-packages\vtrace\platforms\windll\amd64\dbghelp.dll'
- '\Anaconda3\Lib\site-packages\vtrace\platforms\windll\i386\dbghelp.dll'
filter_optional_epicgames:
ImageLoaded|endswith:
- '\Epic Games\Launcher\Engine\Binaries\ThirdParty\DbgHelp\dbghelp.dll'
- '\Epic Games\MagicLegends\x86\dbghelp.dll'
filter_optional_opera:
ImageLoaded|contains: 'opera\Opera Installer Temp\opera_package'
ImageLoaded|endswith: '\assistant\dbghelp.dll'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- Legitimate applications loading their own versions of the DLL mentioned in this rule
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: '\dbghelp.dll'
Stage 2: not filter_main_generic
filter_main_generic:
ImageLoaded|startswith:
- 'C:\Program Files (x86)\'
- 'C:\Program Files\'
- 'C:\Windows\SoftwareDistribution\'
- 'C:\Windows\System32\'
- 'C:\Windows\SystemTemp\'
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\WinSxS\'
Stage 3: not filter_optional_*
filter_optional_anaconda:
ImageLoaded|endswith:
- '\Anaconda3\Lib\site-packages\vtrace\platforms\windll\amd64\dbghelp.dll'
- '\Anaconda3\Lib\site-packages\vtrace\platforms\windll\i386\dbghelp.dll'
filter_optional_epicgames:
ImageLoaded|endswith:
- '\Epic Games\Launcher\Engine\Binaries\ThirdParty\DbgHelp\dbghelp.dll'
- '\Epic Games\MagicLegends\x86\dbghelp.dll'
filter_optional_opera:
ImageLoaded|contains: 'opera\Opera Installer Temp\opera_package'
ImageLoaded|endswith: '\assistant\dbghelp.dll'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImageLoaded | ends_with |
| field:"ImageLoaded" kind:ends_with value:"\dbghelp.dll" |
Exclusions
The rule actively suppresses these predicates.
Potential Windows Defender Tampering Via Wmic.EXE
#Detects potential tampering with Windows Defender settings such as adding exclusion using wmic
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Potential Windows Defender Tampering Via Wmic.EXE
id: 51cbac1e-eee3-4a90-b1b7-358efb81fa0a
status: test
description: Detects potential tampering with Windows Defender settings such as adding exclusion using wmic
references:
- https://github.com/redcanaryco/atomic-red-team/blob/5c1e6f1b4fafd01c8d1ece85f510160fc1275fbf/atomics/T1562.001/T1562.001.md
- https://www.bleepingcomputer.com/news/security/gootkit-malware-bypasses-windows-defender-by-setting-path-exclusions/
- https://www.bleepingcomputer.com/news/security/iobit-forums-hacked-to-spread-ransomware-to-its-members/
author: frack113
date: 2022-12-11
modified: 2023-02-14
tags:
- attack.execution
- attack.defense-impairment
- attack.t1047
- attack.t1685
logsource:
product: windows
category: process_creation
detection:
selection_img:
- OriginalFileName: 'wmic.exe'
- Image|endswith: '\WMIC.exe'
selection_cli:
CommandLine|contains: '/Namespace:\\\\root\\Microsoft\\Windows\\Defender'
condition: all of selection_*
falsepositives:
- Unknown
level: high
simulation:
- type: atomic-red-team
name: WMIC Tamper with Windows Defender Evade Scanning Folder
technique: T1562.001
atomic_guid: 59d386fc-3a4b-41b8-850d-9e3eee24dfe4
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_wmic_namespace_defender/info.yml
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- OriginalFileName: 'wmic.exe'
- Image|endswith: '\WMIC.exe'
Stage 2: selection_cli
selection_cli:
CommandLine|contains: '/Namespace:\\\\root\\Microsoft\\Windows\\Defender'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:"/Namespace:\\\\root\\Microsoft\\Windows\\Defender" |
Image | ends_with |
| field:"Image" kind:ends_with value:"\WMIC.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"wmic.exe" |
PowerView PowerShell Cmdlets - ScriptBlock
#Detects Cmdlet names from PowerView of the PowerSploit exploitation framework.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: PowerView PowerShell Cmdlets - ScriptBlock
id: dcd74b95-3f36-4ed9-9598-0490951643aa
related:
- id: b2317cfa-4a47-4ead-b3ff-297438c0bc2d
type: similar
status: test
description: Detects Cmdlet names from PowerView of the PowerSploit exploitation framework.
references:
- https://powersploit.readthedocs.io/en/stable/Recon/README
- https://github.com/PowerShellMafia/PowerSploit/tree/master/Recon
- https://thedfirreport.com/2020/10/08/ryuks-return
- https://adsecurity.org/?p=2277
author: Bhabesh Raj
date: 2021-05-18
modified: 2023-11-22
tags:
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains:
- 'Export-PowerViewCSV'
- 'Find-DomainLocalGroupMember'
- 'Find-DomainObjectPropertyOutlier'
- 'Find-DomainProcess'
- 'Find-DomainShare'
- 'Find-DomainUserEvent'
- 'Find-DomainUserLocation'
- 'Find-ForeignGroup'
- 'Find-ForeignUser'
- 'Find-GPOComputerAdmin'
- 'Find-GPOLocation'
- 'Find-InterestingDomain' # Covers: Find-InterestingDomainAcl, Find-InterestingDomainShareFile
- 'Find-InterestingFile'
- 'Find-LocalAdminAccess'
- 'Find-ManagedSecurityGroups'
- 'Get-CachedRDPConnection'
- 'Get-DFSshare'
- 'Get-DomainDFSShare'
- 'Get-DomainDNSRecord'
- 'Get-DomainDNSZone'
- 'Get-DomainFileServer'
- 'Get-DomainGPOComputerLocalGroupMapping'
- 'Get-DomainGPOLocalGroup'
- 'Get-DomainGPOUserLocalGroupMapping'
- 'Get-LastLoggedOn'
- 'Get-LoggedOnLocal'
- 'Get-NetFileServer'
- 'Get-NetForest' # Covers: Get-NetForestCatalog, Get-NetForestDomain, Get-NetForestTrust
- 'Get-NetGPOGroup'
- 'Get-NetProcess'
- 'Get-NetRDPSession'
- 'Get-RegistryMountedDrive'
- 'Get-RegLoggedOn'
- 'Get-WMIRegCachedRDPConnection'
- 'Get-WMIRegLastLoggedOn'
- 'Get-WMIRegMountedDrive'
- 'Get-WMIRegProxy'
- 'Invoke-ACLScanner'
- 'Invoke-CheckLocalAdminAccess'
- 'Invoke-EnumerateLocalAdmin'
- 'Invoke-EventHunter'
- 'Invoke-FileFinder'
- 'Invoke-Kerberoast'
- 'Invoke-MapDomainTrust'
- 'Invoke-ProcessHunter'
- 'Invoke-RevertToSelf'
- 'Invoke-ShareFinder'
- 'Invoke-UserHunter'
- 'Invoke-UserImpersonation'
- 'Remove-RemoteConnection'
- 'Request-SPNTicket'
- 'Resolve-IPAddress'
# - 'Get-ADObject' # prone to FPs
# - 'Get-Domain' # too many FPs # Covers Cmdlets like: DomainComputer, DomainController, DomainDFSShare, DomainDNSRecord, DomainGPO, etc.
# - 'Add-DomainGroupMember'
# - 'Add-DomainObjectAcl'
# - 'Add-ObjectAcl'
# - 'Add-RemoteConnection'
# - 'Convert-ADName'
# - 'Convert-NameToSid'
# - 'ConvertFrom-UACValue'
# - 'ConvertTo-SID'
# - 'Get-DNSRecord'
# - 'Get-DNSZone'
# - 'Get-DomainComputer'
# - 'Get-DomainController'
# - 'Get-DomainGroup'
# - 'Get-DomainGroupMember'
# - 'Get-DomainManagedSecurityGroup'
# - 'Get-DomainObject'
# - 'Get-DomainObjectAcl'
# - 'Get-DomainOU'
# - 'Get-DomainPolicy'
# - 'Get-DomainSID'
# - 'Get-DomainSite'
# - 'Get-DomainSPNTicket'
# - 'Get-DomainSubnet'
# - 'Get-DomainUser'
# - 'Get-DomainUserEvent'
# - 'Get-Forest' # Covers: Get-ForestDomain, Get-ForestGlobalCatalog, Get-ForestTrust
# - 'Get-IPAddress'
# - 'Get-NetComputer' # Covers: Get-NetComputerSiteName
# - 'Get-NetDomain' # Covers: Get-NetDomainController, Get-NetDomainTrust
# - 'Get-NetGroup' # Covers: Get-NetGroupMember
# - 'Get-NetLocalGroup' # Covers: NetLocalGroupMember
# - 'Get-NetLoggedon'
# - 'Get-NetOU'
# - 'Get-NetSession'
# - 'Get-NetShare'
# - 'Get-NetSite'
# - 'Get-NetSubnet'
# - 'Get-NetUser'
# - 'Get-ObjectAcl'
# - 'Get-PathAcl'
# - 'Get-Proxy'
# - 'Get-SiteName'
# - 'Get-UserEvent'
# - 'Get-WMIProcess'
# - 'New-DomainGroup'
# - 'New-DomainUser'
# - 'Set-ADObject'
# - 'Set-DomainObject'
# - 'Set-DomainUserPassword'
# - 'Test-AdminAccess'
condition: selection
falsepositives:
- Unknown
level: high
regression_tests_path: regression_data/rules/windows/powershell/powershell_script/posh_ps_powerview_malicious_commandlets/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ScriptBlockText|contains:
- 'Export-PowerViewCSV'
- 'Find-DomainLocalGroupMember'
- 'Find-DomainObjectPropertyOutlier'
- 'Find-DomainProcess'
- 'Find-DomainShare'
- 'Find-DomainUserEvent'
- 'Find-DomainUserLocation'
- 'Find-ForeignGroup'
- 'Find-ForeignUser'
- 'Find-GPOComputerAdmin'
- 'Find-GPOLocation'
- 'Find-InterestingDomain'
- 'Find-InterestingFile'
- 'Find-LocalAdminAccess'
- 'Find-ManagedSecurityGroups'
- 'Get-CachedRDPConnection'
- 'Get-DFSshare'
- 'Get-DomainDFSShare'
- 'Get-DomainDNSRecord'
- 'Get-DomainDNSZone'
- 'Get-DomainFileServer'
- 'Get-DomainGPOComputerLocalGroupMapping'
- 'Get-DomainGPOLocalGroup'
- 'Get-DomainGPOUserLocalGroupMapping'
- 'Get-LastLoggedOn'
- 'Get-LoggedOnLocal'
- 'Get-NetFileServer'
- 'Get-NetForest'
- 'Get-NetGPOGroup'
- 'Get-NetProcess'
- 'Get-NetRDPSession'
- 'Get-RegistryMountedDrive'
- 'Get-RegLoggedOn'
- 'Get-WMIRegCachedRDPConnection'
- 'Get-WMIRegLastLoggedOn'
- 'Get-WMIRegMountedDrive'
- 'Get-WMIRegProxy'
- 'Invoke-ACLScanner'
- 'Invoke-CheckLocalAdminAccess'
- 'Invoke-EnumerateLocalAdmin'
- 'Invoke-EventHunter'
- 'Invoke-FileFinder'
- 'Invoke-Kerberoast'
- 'Invoke-MapDomainTrust'
- 'Invoke-ProcessHunter'
- 'Invoke-RevertToSelf'
- 'Invoke-ShareFinder'
- 'Invoke-UserHunter'
- 'Invoke-UserImpersonation'
- 'Remove-RemoteConnection'
- 'Request-SPNTicket'
- 'Resolve-IPAddress'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
Process Terminated Via Taskkill
#Detects execution of "taskkill.exe" in order to stop a service or a process. Look for suspicious parents executing this command in order to hunt for potential malicious activity. Attackers might leverage this in order to conduct data destruction or data encrypted for impact on the data stores of services like Exchange and SQL Server.
Known False Positives
- Expected FP with some processes using this techniques to terminate one of their processes during installations and updates
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Impact |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Process Terminated Via Taskkill
id: 86085955-ea48-42a2-9dd3-85d4c36b167d
status: test
description: |
Detects execution of "taskkill.exe" in order to stop a service or a process. Look for suspicious parents executing this command in order to hunt for potential malicious activity.
Attackers might leverage this in order to conduct data destruction or data encrypted for impact on the data stores of services like Exchange and SQL Server.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1489/T1489.md#atomic-test-3---windows---stop-service-by-killing-process
- https://unit42.paloaltonetworks.com/snipbot-romcom-malware-variant/
author: frack113, MalGamy (Nextron Systems), Nasreddine Bencherchali
date: 2021-12-26
modified: 2024-10-06
tags:
- attack.impact
- attack.t1489
- detection.threat-hunting
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\taskkill.exe'
- OriginalFileName: 'taskkill.exe'
selection_cli_force:
- CommandLine|contains|windash: ' /f '
- CommandLine|endswith|windash: ' /f'
selection_cli_filter_process:
CommandLine|contains|windash:
- ' /im '
- ' /pid '
filter_main_installers:
ParentImage|contains:
- '\AppData\Local\Temp\'
- ':\Windows\Temp'
ParentImage|endswith: '.tmp'
condition: all of selection_* and not 1 of filter_main_*
falsepositives:
- Expected FP with some processes using this techniques to terminate one of their processes during installations and updates
level: low
Stages and Predicates
Stage 0: condition
all of selection_* and not 1 of filter_main_*Stage 1: selection_img
selection_img:
- Image|endswith: '\taskkill.exe'
- OriginalFileName: 'taskkill.exe'
Stage 2: selection_cli_force
selection_cli_force:
- CommandLine|contains|windash: ' /f '
- CommandLine|endswith|windash: ' /f'
Stage 3: selection_cli_filter_process
selection_cli_filter_process:
CommandLine|contains|windash:
- ' /im '
- ' /pid '
Stage 4: not filter_main_installers
filter_main_installers:
ParentImage|contains:
- '\AppData\Local\Temp\'
- ':\Windows\Temp'
ParentImage|endswith: '.tmp'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | ends_with |
| field:"CommandLine" kind:ends_with |
CommandLine | match |
| field:"CommandLine" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with value:"\taskkill.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"taskkill.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
ParentImage | match | :\Windows\Temp | excludes:ParentImage field:"ParentImage" value:":\Windows\Temp" |
ParentImage | match | \AppData\Local\Temp\ | excludes:ParentImage field:"ParentImage" value:"\AppData\Local\Temp\" |
ParentImage | ends_with | .tmp | excludes:ParentImage field:"ParentImage" value:".tmp" |
PUA - Advanced IP Scanner Execution
#Detects the use of Advanced IP Scanner. Seems to be a popular tool for ransomware groups.
Known False Positives
- Legitimate administrative use
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: PUA - Advanced IP Scanner Execution
id: bef37fa2-f205-4a7b-b484-0759bfd5f86f
status: test
description: Detects the use of Advanced IP Scanner. Seems to be a popular tool for ransomware groups.
references:
- https://news.sophos.com/en-us/2019/12/09/snatch-ransomware-reboots-pcs-into-safe-mode-to-bypass-protection/
- https://www.fireeye.com/blog/threat-research/2020/05/tactics-techniques-procedures-associated-with-maze-ransomware-incidents.html
- https://labs.f-secure.com/blog/prelude-to-ransomware-systembc
- https://assets.documentcloud.org/documents/20444693/fbi-pin-egregor-ransomware-bc-01062021.pdf
- https://thedfirreport.com/2021/01/18/all-that-for-a-coinminer
- https://github.com/3CORESec/MAL-CL/tree/master/Descriptors/Other/Advanced%20IP%20Scanner
author: Nasreddine Bencherchali (Nextron Systems), @ROxPinTeddy
date: 2020-05-12
modified: 2023-02-07
tags:
- attack.discovery
- attack.t1046
- attack.t1135
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|contains: '\advanced_ip_scanner' # Covers also advanced_ip_scanner_console.exe
- OriginalFileName|contains: 'advanced_ip_scanner' # Covers also advanced_ip_scanner_console.exe
- Description|contains: 'Advanced IP Scanner'
selection_cli:
CommandLine|contains|all:
- '/portable'
- '/lng'
condition: 1 of selection_*
falsepositives:
- Legitimate administrative use
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_pua_advanced_ip_scanner/info.yml
Stages and Predicates
Stage 0: condition
1 of selection_*Stage 1: selection_img
selection_img:
- Image|contains: '\advanced_ip_scanner'
- OriginalFileName|contains: 'advanced_ip_scanner'
- Description|contains: 'Advanced IP Scanner'
Stage 2: selection_cli
selection_cli:
CommandLine|contains|all:
- '/portable'
- '/lng'
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:"Advanced IP Scanner" |
Image | match |
| field:"Image" kind:match value:"\advanced_ip_scanner" |
OriginalFileName | match |
| field:"OriginalFileName" kind:match value:"advanced_ip_scanner" |
PUA - CsExec Execution
#Detects the use of the lesser known remote execution tool named CsExec a PsExec alternative
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Resource Development | |
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: PUA - CsExec Execution
id: d08a2711-ee8b-4323-bdec-b7d85e892b31
status: test
description: Detects the use of the lesser known remote execution tool named CsExec a PsExec alternative
references:
- https://github.com/malcomvetter/CSExec
- https://www.microsoft.com/security/blog/2022/05/09/ransomware-as-a-service-understanding-the-cybercrime-gig-economy-and-how-to-protect-yourself/
author: Florian Roth (Nextron Systems)
date: 2022-08-22
modified: 2023-02-21
tags:
- attack.resource-development
- attack.t1587.001
- attack.execution
- attack.t1569.002
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\csexec.exe'
selection_pe:
Description: 'csexec'
condition: 1 of selection*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
1 of selection*Stage 1: selection
selection:
Image|endswith: '\csexec.exe'
Stage 2: selection_pe
selection_pe:
Description: 'csexec'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Description | eq |
| field:"Description" kind:eq value:"csexec" |
Image | ends_with |
| field:"Image" kind:ends_with value:"\csexec.exe" |
Refresh Token Exchange from Excessive Locations
#Detects when a refresh token is exchanged for an access token from an unusual volume of distinct locations (IP addresses, ASNs, or Geolocation). An excessive number of locations suggests the refresh token may be hijacked and actively used by an attacker, potentially indicating initial access and impersonation.
Known False Positives
- Natural user movement, such as a mobile device transitioning from a Wi-Fi network to a mobile data network.
- IP addresses changes within the same Internet Service Provider (ISP).
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Stealth | |
| Lateral Movement |
Rule Body
title: Refresh Token Exchange from Excessive Locations
id: a37fcabe-9ec1-4088-9157-b8121377cbca
name: selected_events
status: experimental
description: |
Detects when a refresh token is exchanged for an access token from an unusual volume of distinct
locations (IP addresses, ASNs, or Geolocation).
An excessive number of locations suggests the refresh token may be hijacked and actively used by an attacker,
potentially indicating initial access and impersonation.
author: Okta
date: 2025-10-01
modified: 2025-10-01
logsource:
product: auth0
detection:
selection:
data.type:
- seacft # Successful exchange of a code for access and refresh tokens
- sertft # Successful exchange of a refresh token for an access token
condition: selection
explanation: >
The query collects the events where a refresh token has been issued by the /token endpoint.
This query analyzes events from the /token endpoint where a refresh token is exchanged and optionally rotated.
When refresh token rotation is enabled, a new refresh token is released upon every access token renewal.
The underlying assumption is that attackers tend to rapidly change their source IP to evade defenses like Suspicious IP Throttling.
This rule alerts when the number of source IPs used for refresh token exchanges exceeds a defined threshold.
The provided Splunk query offers two primary options:
**Option 1 (Volume Check):** Checks if the count of distinct source IPs exceeds a static threshold.
This is suitable for Single Page Applications (SPAs) or Native Apps where token exchange occurs client-side.
**Option 2 (Allowed IPs Check):** Identifies exchanges originating from IP addresses not present in a defined allow-list.
This is better suited for Regular Web Applications (RWAs) where the /token endpoint is called from a backend.
Both options can be combined for comprehensive monitoring.
splunk: |
index=auth0 data.tenant_name="{your-tenant-name}"
data.type IN (seacft, sertft)
| fields data.ip data.user_id data.user_name data.client_id data.details.familyId
| stats dc(data.ip) as rt_ip_count values(data.ip) as observed_ips
by data.user_name data.user_id data.client_id data.details.familyId
``` Option 1 - Check the volume of used IPs (Suits SPA and Native apps)```
| where rt_ip_count > {threshold_ips_count}
``` Option 2 - Check for unapproved IPs (Suits RWA)```
```
| eval total_ip_count = mvcount(observed_ips)
| eval approved_ip = mvfilter(match(observed_ips, {list_of_allowed_ips}))
| eval approved_ip_count = mvcount(approved_ip)
| where approved_ip_count != total_ip_count
```
``` Print the suspicious records ```
| table data.user_name data.user_id data.client_id data.details.familyId rt_ip_count observed_ips
comments:
- The Splunk query above shall be tuned to reflect a valid tenant name.
- The following thresholds values should be set based on the customer's environment and expected behavior -
threshold_ips_count and list_of_allowed_ips (use the pipe "|" as a delimiter, e.g. "1.1.1.1|2.2.2.2|3.3.3.3")
- To determine a baseline of normal behavior, it is highly recommended to run the query (excluding the "where" clauses)
for a sufficient period and calculate thresholds based on the data.
- If IP enrichment data is available, consider using **ASN** or **Country/City** instead of raw IPs to significantly reduce noise.
tenant_logs: |
type: (seacft sertft)
prevention:
- Deploy a post-login action that will compare IP/ASN of initial issuance of a refresh token (event.refresh_token.device.initial_asn)
against IP/ASN of a current refresh token (event.refresh_token.device.last_asn).
If they are different, terminate the session and revoke all refresh tokens.
falsepositives:
- Natural user movement, such as a mobile device transitioning from a Wi-Fi network to a mobile data network.
- IP addresses changes within the same Internet Service Provider (ISP).
level: medium
tags:
- attack.defense-evasion
- attack.persistence
- attack.t1550
- attack.t1550.004
- attack.t1078
---
title: Refresh Token Exchange from Excessive Locations - Correlation
id: 941ab90f-c4da-4449-8cf4-82b8a4df25b5
correlation:
type: value_count
rules:
- selected_events # Referenced here
group-by:
- data.user_name
- data.user_id
- data.client_id
- data.details.familyId
timespan: 30d
condition:
gte: 1
field: data.ip
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
data.type:
- seacft
- sertft
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data.type | eq |
| field:"data.type" kind:eq |
Remote Access Tool - Simple Help Execution
#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
- Legitimate usage of the tool
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: Remote Access Tool - Simple Help Execution
id: 95e60a2b-4705-444b-b7da-ba0ea81a3ee2
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://www.huntress.com/blog/slashandgrab-screen-connect-post-exploitation-in-the-wild-cve-2024-1709-cve-2024-1708
author: Nasreddine Bencherchali (Nextron Systems)
date: 2024-02-23
tags:
- attack.command-and-control
- attack.t1219.002
logsource:
category: process_creation
product: windows
detection:
selection:
Image|contains:
- '\JWrapper-Remote Access\'
- '\JWrapper-Remote Support\'
Image|endswith: '\SimpleService.exe'
condition: selection
falsepositives:
- Legitimate usage of the tool
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image|contains:
- '\JWrapper-Remote Access\'
- '\JWrapper-Remote Support\'
Image|endswith: '\SimpleService.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with value:"\SimpleService.exe" |
Image | match |
| field:"Image" kind:match |
Remote Server Service Abuse
#Detects remote RPC calls to possibly abuse remote encryption service via MS-SRVS
Known False Positives
- Legitimate remote share creation
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 Server Service Abuse
id: b6ea3cc7-542f-43ef-bbe4-980fbed444c7
status: test
description: Detects remote RPC calls to possibly abuse remote encryption service via MS-SRVS
references:
- https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-srvs/accf23b0-0f57-441c-9185-43041f1b0ee9
- https://github.com/jsecurity101/MSRPC-to-ATTACK/blob/ddd4608fe8684fcf2fcf9b48c5f0b3c28097f8a3/documents/MS-SRVS.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:4b324fc8-1670-01d3-1278-5a47bf6ee188'
detection:
selection:
EventLog: RPCFW
EventID: 3
InterfaceUuid: 4b324fc8-1670-01d3-1278-5a47bf6ee188
condition: selection
falsepositives:
- Legitimate remote share creation
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventLog: RPCFW
EventID: 3
InterfaceUuid: 4b324fc8-1670-01d3-1278-5a47bf6ee188
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventLog | eq |
| field:"EventLog" kind:eq value:"RPCFW" |
InterfaceUuid | eq |
| field:"InterfaceUuid" kind:eq value:"4b324fc8-1670-01d3-1278-5a47bf6ee188" |
Session Manager Autorun Keys Modification
#Detects modification of autostart extensibility point (ASEP) in registry.
Known False Positives
- Legitimate software automatically (mostly, during installation) sets up autorun keys for legitimate reason
- Legitimate administrator sets up autorun keys for legitimate reason
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: Session Manager Autorun Keys Modification
id: 046218bd-e0d8-4113-a3c3-895a12b2b298
related:
- id: 17f878b8-9968-4578-b814-c4217fc5768c
type: obsolete
status: test
description: Detects modification of autostart extensibility point (ASEP) in registry.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1547.001/T1547.001.md
- https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns
- https://gist.github.com/GlebSukhodolskiy/0fc5fa5f482903064b448890db1eaf9d # a list with registry keys
author: Victor Sergeev, Daniil Yugoslavskiy, Gleb Sukhodolskiy, Timur Zinniatullin, oscd.community, Tim Shelton, frack113 (split)
date: 2019-10-25
modified: 2023-08-17
tags:
- attack.privilege-escalation
- attack.persistence
- attack.t1547.001
- attack.t1546.009
logsource:
category: registry_set
product: windows
detection:
session_manager_base:
TargetObject|contains: '\System\CurrentControlSet\Control\Session Manager'
session_manager:
TargetObject|contains:
- '\SetupExecute'
- '\S0InitialCommand'
- '\KnownDlls'
- '\Execute'
- '\BootExecute'
- '\AppCertDlls'
filter:
Details: '(Empty)'
condition: session_manager_base and session_manager and not filter
falsepositives:
- Legitimate software automatically (mostly, during installation) sets up autorun keys for legitimate reason
- Legitimate administrator sets up autorun keys for legitimate reason
level: medium
simulation:
- type: atomic-red-team
name: Modify BootExecute Value
technique: T1547.001
atomic_guid: befc2b40-d487-4a5a-8813-c11085fb5672
Stages and Predicates
Stage 0: condition
session_manager_base and session_manager and not filterStage 1: session_manager_base
session_manager_base:
TargetObject|contains: '\System\CurrentControlSet\Control\Session Manager'
Stage 2: session_manager
session_manager:
TargetObject|contains:
- '\SetupExecute'
- '\S0InitialCommand'
- '\KnownDlls'
- '\Execute'
- '\BootExecute'
- '\AppCertDlls'
Stage 3: not filter
filter:
Details: '(Empty)'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetObject | match |
| field:"TargetObject" kind:match |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Details | eq | (Empty) | excludes:Details field:"Details" value:"(Empty)" |
Suspicious Hyper-V Cmdlets
#Adversaries may carry out malicious operations using a virtual instance to avoid detection
Known False Positives
- Legitimate PowerShell scripts
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: Suspicious Hyper-V Cmdlets
id: 42d36aa1-3240-4db0-8257-e0118dcdd9cd
status: test
description: Adversaries may carry out malicious operations using a virtual instance to avoid detection
references:
- https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1564.006/T1564.006.md#atomic-test-3---create-and-start-hyper-v-virtual-machine
author: frack113
date: 2022-04-09
tags:
- attack.stealth
- attack.t1564.006
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains:
- New-VM
- Set-VMFirmware
- Start-VM
condition: selection
falsepositives:
- Legitimate PowerShell scripts
level: medium
regression_tests_path: regression_data/rules/windows/powershell/powershell_script/posh_ps_susp_hyper_v_condlet/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ScriptBlockText|contains:
- New-VM
- Set-VMFirmware
- Start-VM
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
Suspicious Invoke-WebRequest Execution With DirectIP
#Detects calls to PowerShell with Invoke-WebRequest cmdlet using direct IP access
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Suspicious Invoke-WebRequest Execution With DirectIP
id: 1edff897-9146-48d2-9066-52e8d8f80a2f
status: test
description: Detects calls to PowerShell with Invoke-WebRequest cmdlet using direct IP access
references:
- https://www.huntress.com/blog/critical-vulnerabilities-in-papercut-print-management-software
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-04-21
tags:
- attack.command-and-control
- attack.t1105
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith:
- '\powershell_ise.exe'
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'powershell_ise.EXE'
- 'PowerShell.EXE'
- 'pwsh.dll'
selection_commands:
CommandLine|contains:
# These are all aliases of Invoke-WebRequest
- 'curl '
- 'Invoke-RestMethod'
- 'Invoke-WebRequest'
- ' irm ' # Space before and after to avoid false positives with 'irm' as a substring
- 'iwr '
- 'wget '
selection_ip:
# In case of FP with local IPs add additional filters
CommandLine|contains:
- '://1'
- '://2'
- '://3'
- '://4'
- '://5'
- '://6'
- '://7'
- '://8'
- '://9'
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:
- '\powershell_ise.exe'
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'powershell_ise.EXE'
- 'PowerShell.EXE'
- 'pwsh.dll'
Stage 2: selection_commands
selection_commands:
CommandLine|contains:
- 'curl '
- 'Invoke-RestMethod'
- 'Invoke-WebRequest'
- ' irm '
- 'iwr '
- 'wget '
Stage 3: selection_ip
selection_ip:
CommandLine|contains:
- '://1'
- '://2'
- '://3'
- '://4'
- '://5'
- '://6'
- '://7'
- '://8'
- '://9'
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 |
TerraMaster TOS CVE-2020-28188
#Detects the exploitation of the TerraMaster TOS vulnerability described in CVE-2020-28188
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule Body
title: TerraMaster TOS CVE-2020-28188
id: 15c312b9-00d0-4feb-8870-7d940a4bdc5e
status: test
description: Detects the exploitation of the TerraMaster TOS vulnerability described in CVE-2020-28188
references:
- https://www.ihteam.net/advisory/terramaster-tos-multiple-vulnerabilities/
- https://research.checkpoint.com/2021/freakout-leveraging-newest-vulnerabilities-for-creating-a-botnet/
author: Bhabesh Raj
date: 2021-01-25
modified: 2023-01-02
tags:
- attack.t1190
- attack.initial-access
- cve.2020-28188
- detection.emerging-threats
logsource:
category: webserver
detection:
base_url:
cs-method: 'GET'
cs-uri-query|contains|all:
- '/include/makecvs.php'
- '?Event='
payload:
cs-uri-query|contains:
- 'curl'
- 'wget'
- '.py'
- '.sh'
- 'chmod'
- '_GET'
condition: base_url and payload
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
base_url and payloadStage 1: base_url
base_url:
cs-method: 'GET'
cs-uri-query|contains|all:
- '/include/makecvs.php'
- '?Event='
Stage 2: payload
payload:
cs-uri-query|contains:
- 'curl'
- 'wget'
- '.py'
- '.sh'
- 'chmod'
- '_GET'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
cs-method | eq |
| field:"cs-method" kind:eq value:"GET" |
cs-uri-query | match |
| field:"cs-uri-query" kind:match |
Uncommon Extension In Keyboard Layout IME File Registry Value
#Detects usage of Windows Input Method Editor (IME) keyboard layout feature, which allows an attacker to load a DLL into the process after sending the WM_INPUTLANGCHANGEREQUEST message. Before doing this, the client needs to register the DLL in a special registry key that is assumed to implement this keyboard layout. This registry key should store a value named "Ime File" with a DLL path. IMEs are essential for languages that have more characters than can be represented on a standard keyboard, such as Chinese, Japanese, and Korean.
Known False Positives
- IMEs are essential for languages that have more characters than can be represented on a standard keyboard, such as Chinese, Japanese, and Korean.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: Uncommon Extension In Keyboard Layout IME File Registry Value
id: b888e3f2-224d-4435-b00b-9dd66e9ea1f1
related:
- id: 9d8f9bb8-01af-4e15-a3a2-349071530530
type: derived
status: test
description: |
Detects usage of Windows Input Method Editor (IME) keyboard layout feature, which allows an attacker to load a DLL into the process after sending the WM_INPUTLANGCHANGEREQUEST message.
Before doing this, the client needs to register the DLL in a special registry key that is assumed to implement this keyboard layout. This registry key should store a value named "Ime File" with a DLL path.
IMEs are essential for languages that have more characters than can be represented on a standard keyboard, such as Chinese, Japanese, and Korean.
references:
- https://www.linkedin.com/pulse/guntior-story-advanced-bootkit-doesnt-rely-windows-disk-baranov-wue8e/
author: X__Junior (Nextron Systems)
date: 2023-11-21
tags:
- attack.defense-impairment
- attack.t1685
logsource:
product: windows
category: registry_set
detection:
selection:
TargetObject|contains|all:
- '\Control\Keyboard Layouts\'
- 'Ime File'
filter_main_known_extension:
Details|endswith: '.ime'
condition: selection and not 1 of filter_main_*
falsepositives:
- IMEs are essential for languages that have more characters than can be represented on a standard keyboard, such as Chinese, Japanese, and Korean.
level: high
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
TargetObject|contains|all:
- '\Control\Keyboard Layouts\'
- 'Ime File'
Stage 2: not filter_main_known_extension
filter_main_known_extension:
Details|endswith: '.ime'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetObject | match |
| field:"TargetObject" kind:match |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Details | ends_with | .ime | excludes:Details field:"Details" value:".ime" |
Use of VisualUiaVerifyNative.exe
#VisualUiaVerifyNative.exe is a Windows SDK that can be used for AWL bypass and is listed in Microsoft's recommended block rules.
Known False Positives
- Legitimate testing of Microsoft UI parts.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Use of VisualUiaVerifyNative.exe
id: b30a8bc5-e21b-4ca2-9420-0a94019ac56a
status: test
description: VisualUiaVerifyNative.exe is a Windows SDK that can be used for AWL bypass and is listed in Microsoft's recommended block rules.
references:
- https://lolbas-project.github.io/lolbas/OtherMSBinaries/VisualUiaVerifyNative/
- https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control/design/applications-that-can-bypass-wdac
- https://bohops.com/2020/10/15/exploring-the-wdac-microsoft-recommended-block-rules-visualuiaverifynative/
- https://github.com/MicrosoftDocs/windows-itpro-docs/commit/937db704b9148e9cee7c7010cad4d00ce9c4fdad
author: 'Christopher Peacock @SecurePeacock, SCYTHE @scythe_io'
date: 2022-06-01
tags:
- attack.stealth
- attack.t1218
logsource:
category: process_creation
product: windows
detection:
selection:
- Image|endswith: '\VisualUiaVerifyNative.exe'
- OriginalFileName: 'VisualUiaVerifyNative.exe'
condition: selection
falsepositives:
- Legitimate testing of Microsoft UI parts.
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
- Image|endswith: '\VisualUiaVerifyNative.exe'
- OriginalFileName: 'VisualUiaVerifyNative.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with value:"\VisualUiaVerifyNative.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"VisualUiaVerifyNative.exe" |
Windows Webshell Strings
#Detects common commands used in Windows webshells
Known False Positives
- Web sites like wikis with articles on os commands and pages that include the os commands in the URLs
- User searches in search boxes of the respective website
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Rule Body
title: Windows Webshell Strings
id: 7ff9db12-1b94-4a79-ba68-a2402c5d6729
status: test
description: Detects common commands used in Windows webshells
references:
- https://bad-jubies.github.io/RCE-NOW-WHAT/
- https://m365internals.com/2022/10/07/hunting-in-on-premises-exchange-server-logs/
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2017-02-19
modified: 2022-11-18
tags:
- attack.persistence
- attack.t1505.003
logsource:
category: webserver
detection:
selection_method:
cs-method: 'GET'
selection_keywords:
# The "%20" is URL encoded version of the space
# The "%2B" is URL encoded version of the "+"
- '=whoami'
- '=net%20user'
- '=net+user'
- '=net%2Buser'
- '=cmd%20/c%'
- '=cmd+/c+'
- '=cmd%2B/c%'
- '=cmd%20/r%'
- '=cmd+/r+'
- '=cmd%2B/r%'
- '=cmd%20/k%'
- '=cmd+/k+'
- '=cmd%2B/k%'
- '=powershell%'
- '=powershell+'
- '=tasklist%'
- '=tasklist+'
- '=wmic%'
- '=wmic+'
- '=ssh%'
- '=ssh+'
- '=python%'
- '=python+'
- '=python3%'
- '=python3+'
- '=ipconfig'
- '=wget%'
- '=wget+'
- '=curl%'
- '=curl+'
- '=certutil'
- '=copy%20%5C%5C'
- '=dsquery%'
- '=dsquery+'
- '=nltest%'
- '=nltest+'
condition: all of selection_*
falsepositives:
- Web sites like wikis with articles on os commands and pages that include the os commands in the URLs
- User searches in search boxes of the respective website
level: high
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_method
selection_method:
cs-method: 'GET'
Stage 2: selection_keywords
selection_keywords:
- '=whoami'
- '=net%20user'
- '=net+user'
- '=net%2Buser'
- '=cmd%20/c%'
- '=cmd+/c+'
- '=cmd%2B/c%'
- '=cmd%20/r%'
- '=cmd+/r+'
- '=cmd%2B/r%'
- '=cmd%20/k%'
- '=cmd+/k+'
- '=cmd%2B/k%'
- '=powershell%'
- '=powershell+'
- '=tasklist%'
- '=tasklist+'
- '=wmic%'
- '=wmic+'
- '=ssh%'
- '=ssh+'
- '=python%'
- '=python+'
- '=python3%'
- '=python3+'
- '=ipconfig'
- '=wget%'
- '=wget+'
- '=curl%'
- '=curl+'
- '=certutil'
- '=copy%20%5C%5C'
- '=dsquery%'
- '=dsquery+'
- '=nltest%'
- '=nltest+'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
cs-method | eq |
| field:"cs-method" kind:eq value:"GET" |