Detection rules › Sigma

Sigma rules: 0l

RuleSeverity
Active Directory Group Enumeration With Get-AdGrouplow
Add SafeBoot Keys Via Reg Utilityhigh
Blue Mockingbirdhigh
CMSTP Execution Process Creationhigh
DNS Query To Katz Stealer Domains - Networkhigh
DNS Server Error Failed Loading the ServerLevelPluginDLLhigh
Extended rights backdoor obfuscation (via localizationDisplayId attribute)high
Harvesting Of Wifi Credentials Via Netsh.EXEmedium
Lace Tempest PowerShell Evidence Eraserhigh
macOS ESF Suspicious File Creation in Persistence Locationshigh
MacOS Scripting Interpreter AppleScriptmedium
Modify Group Policy Settings - ScriptBlockLoggingmedium
New Federated Domain Addedmedium
Potential Persistence Via MyComputer Registry Keyshigh
Potential Persistence Via Netsh Helper DLLmedium
Potential WinAPI Calls Via CommandLinehigh
Potentially Over Permissive Permissions Granted Using Dsacls.EXEmedium
Potentially Suspicious Azure Front Door Connectionmedium
Read Contents From Stdin Via Cmd.EXEmedium
Registry Hive File Staged Outside Standard User Profile Pathhigh
RemCom Service Installationmedium
Renamed Schtasks Executionhigh
Run PowerShell Script from Redirected Input Streamhigh
Shell Process Spawned by Java.EXEmedium
SMB Create Remote File Admin Sharehigh
Special File Creation via Mknod Syscalllow
Suspicious GPO Discovery With Get-GPOlow
Suspicious MsiExec Embedding Parentmedium
Suspicious SPN enumeration previous to Kerberoasting attack (PowerShell)high
Tomcat WebServer Logs Deletedmedium
Too Many Global Adminshigh
Windows Backup Deleted Via Wbadmin.EXEmedium
Windows Mail App Mailbox Access Via PowerShell Scriptmedium
WMI Persistencemedium

Active Directory Group Enumeration With Get-AdGroup

#
Status
test
Severity
low
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects usage of the "Get-AdGroup" cmdlet to enumerate Groups within Active Directory

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Active Directory Group Enumeration With Get-AdGroup
id: 8c3a6607-b7dc-4f0d-a646-ef38c00b76ee
status: test
description: Detects usage of the "Get-AdGroup" cmdlet to enumerate Groups within Active Directory
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1018/T1018.md
author: frack113
date: 2022-03-17
modified: 2022-11-17
tags:
    - attack.discovery
    - attack.t1069.002
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains|all:
            - 'Get-AdGroup '
            - '-Filter'
    condition: selection
falsepositives:
    - Unknown
level: low

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    ScriptBlockText|contains|all:
        - 'Get-AdGroup '
        - '-Filter'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
ScriptBlockTextmatch
  • -Filter corpus 3 (sigma 2, splunk 1)
  • Get-AdGroup
field:"ScriptBlockText" kind:match

Add SafeBoot Keys Via Reg Utility

#
Status
test
Severity
high
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects execution of "reg.exe" commands with the "add" or "copy" flags on safe boot registry keys. Often used by attacker to allow the ransomware to work in safe mode as some security products do not

Known False Positives

  • Unlikely

MITRE ATT&CK Coverage

TacticTechniques
Defense Impairment

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Add SafeBoot Keys Via Reg Utility
id: d7662ff6-9e97-4596-a61d-9839e32dee8d
related:
    - id: fc0e89b5-adb0-43c1-b749-c12a10ec37de
      type: similar
status: test
description: Detects execution of "reg.exe" commands with the "add" or "copy" flags on safe boot registry keys. Often used by attacker to allow the ransomware to work in safe mode as some security products do not
references:
    - https://redacted.com/blog/bianlian-ransomware-gang-gives-it-a-go/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-09-02
modified: 2024-03-19
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\reg.exe'
        - OriginalFileName: 'reg.exe'
    selection_safeboot:
        CommandLine|contains: '\SYSTEM\CurrentControlSet\Control\SafeBoot'
    selection_flag:
        CommandLine|contains:
            - ' copy '
            - ' add '
    condition: all of selection*
falsepositives:
    - Unlikely
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_reg_add_safeboot/info.yml

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\reg.exe'
    - OriginalFileName: 'reg.exe'

Stage 2: selection_safeboot

selection_safeboot:
    CommandLine|contains: '\SYSTEM\CurrentControlSet\Control\SafeBoot'

Stage 3: selection_flag

selection_flag:
    CommandLine|contains:
        - ' copy '
        - ' add '

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • add corpus 14 (sigma 13, splunk 1)
  • copy corpus 4 (sigma 4)
  • \SYSTEM\CurrentControlSet\Control\SafeBoot corpus 2 (sigma 2)
field:"CommandLine" kind:match
Imageends_with
  • \reg.exe corpus 58 (sigma 58)
field:"Image" kind:ends_with value:"\reg.exe"
OriginalFileNameeq
  • reg.exe corpus 41 (sigma 32, splunk 8, elastic 1)
field:"OriginalFileName" kind:eq value:"reg.exe"

Blue Mockingbird

#
Status
test
Severity
high
Author
Trent Liffick (@tliffick)
Source
github.com/SigmaHQ/sigma

Attempts to detect system changes made by Blue Mockingbird

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Blue Mockingbird
id: c3198a27-23a0-4c2c-af19-e5328d49680e
related:
    - id: ce239692-aa94-41b3-b32f-9cab259c96ea
      type: merged
status: test
description: Attempts to detect system changes made by Blue Mockingbird
references:
    - https://redcanary.com/blog/blue-mockingbird-cryptominer/
author: Trent Liffick (@tliffick)
date: 2020-05-14
modified: 2022-10-09
tags:
    - attack.persistence
    - attack.execution
    - attack.defense-impairment
    - attack.t1112
    - attack.t1047
    - detection.emerging-threats
logsource:
    category: process_creation
    product: windows
detection:
    sc_cmd:
        Image|endswith: '\cmd.exe'
        CommandLine|contains|all:
            - 'sc config'
            - 'wercplsupporte.dll'
    wmic_cmd:
        Image|endswith: '\wmic.exe'
        CommandLine|endswith: 'COR_PROFILER'
    condition: sc_cmd or wmic_cmd
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

sc_cmd or wmic_cmd

Stage 1: sc_cmd

sc_cmd:
    Image|endswith: '\cmd.exe'
    CommandLine|contains|all:
        - 'sc config'
        - 'wercplsupporte.dll'

Stage 2: wmic_cmd

wmic_cmd:
    Image|endswith: '\wmic.exe'
    CommandLine|endswith: 'COR_PROFILER'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLineends_with
  • COR_PROFILER
field:"CommandLine" kind:ends_with value:"COR_PROFILER"
CommandLinematch
  • sc config
  • wercplsupporte.dll
field:"CommandLine" kind:match
Imageends_with
  • \cmd.exe corpus 132 (sigma 130, splunk 2)
  • \wmic.exe corpus 62 (sigma 62)
field:"Image" kind:ends_with

CMSTP Execution Process Creation

#
Status
stable
Severity
high
Author
Nik Seetharaman
Source
github.com/SigmaHQ/sigma

Detects various indicators of Microsoft Connection Manager Profile Installer execution

Known False Positives

  • Legitimate CMSTP use (unlikely in modern enterprise environments)

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: CMSTP Execution Process Creation
id: 7d4cdc5a-0076-40ca-aac8-f7e714570e47
status: stable
description: Detects various indicators of Microsoft Connection Manager Profile Installer execution
references:
    - https://web.archive.org/web/20190720093911/http://www.endurant.io/cmstp/detecting-cmstp-enabled-code-execution-and-uac-bypass-with-sysmon/
author: Nik Seetharaman
date: 2018-07-16
modified: 2020-12-23
tags:
    - attack.execution
    - attack.stealth
    - attack.t1218.003
    - attack.g0069
    - car.2019-04-001
logsource:
    category: process_creation
    product: windows
detection:
    # CMSTP Spawning Child Process
    selection:
        ParentImage|endswith: '\cmstp.exe'
    condition: selection
falsepositives:
    - Legitimate CMSTP use (unlikely in modern enterprise environments)
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    ParentImage|endswith: '\cmstp.exe'

Indicators

These rows show field, operator, and value matches.

DNS Query To Katz Stealer Domains - Network

#
Status
experimental
Severity
high
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects DNS queries to domains associated with Katz Stealer malware. Katz Stealer is a malware variant that is known to be used for stealing sensitive information from compromised systems. In Enterprise environments, DNS queries to these domains may indicate potential malicious activity or compromise.

Known False Positives

  • Unlikely

MITRE ATT&CK Coverage

TacticTechniques
Command & Control

Rule Body

title: DNS Query To Katz Stealer Domains - Network
id: 6b0c762f-0e1b-435f-a829-5943b08fe36a
related:
    - id: 9c3d6e32-f4c8-4d73-8b8f-95c3b383a13c
      type: similar
status: experimental
description: |
    Detects DNS queries to domains associated with Katz Stealer malware.
    Katz Stealer is a malware variant that is known to be used for stealing sensitive information from compromised systems.
    In Enterprise environments, DNS queries to these domains may indicate potential malicious activity or compromise.
references:
    - Internal research
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-05-22
tags:
    - attack.command-and-control
    - attack.t1071.004
    - detection.emerging-threats
logsource:
    category: dns
detection:
    selection:
        query|contains:
            - 'katz-panel.com'
            - 'katz-stealer.com'
            - 'katzstealer.com'
            - 'twist2katz.com'
    condition: selection
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    query|contains:
        - 'katz-panel.com'
        - 'katz-stealer.com'
        - 'katzstealer.com'
        - 'twist2katz.com'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
querymatch
  • katz-panel.com
  • katz-stealer.com
  • katzstealer.com
  • twist2katz.com
field:"query" kind:match

DNS Server Error Failed Loading the ServerLevelPluginDLL

#
Status
test
Severity
high
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects a DNS server error in which a specified plugin DLL (in registry) could not be loaded

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: DNS Server Error Failed Loading the ServerLevelPluginDLL
id: cbe51394-cd93-4473-b555-edf0144952d9
related:
    - id: e61e8a88-59a9-451c-874e-70fcc9740d67
      type: derived
    - id: f63b56ee-3f79-4b8a-97fb-5c48007e8573
      type: derived
status: test
description: Detects a DNS server error in which a specified plugin DLL (in registry) could not be loaded
references:
    - https://medium.com/@esnesenon/feature-not-bug-dnsadmin-to-dc-compromise-in-one-line-a0f779b8dc83
    - https://technet.microsoft.com/en-us/library/cc735829(v=ws.10).aspx
    - https://twitter.com/gentilkiwi/status/861641945944391680
author: Florian Roth (Nextron Systems)
date: 2017-05-08
modified: 2023-02-05
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.execution
    - attack.stealth
    - attack.t1574.001
logsource:
    product: windows
    service: dns-server
detection:
    selection:
        EventID:
            - 150
            - 770
            - 771
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    EventID:
        - 150
        - 770
        - 771

Extended rights backdoor obfuscation (via localizationDisplayId attribute)

#
Status
experimental
Severity
high
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker modifies the "configuration" partition in order to obfuscate sneaky changes that will allow him to introduce a stealthy AdminSDholder backdoor.

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Telemetry Coverage

Rule Body

title: Extended rights backdoor obfuscation (via localizationDisplayId attribute)
description: Detects scenarios where an attacker modifies the "configuration" partition in order to obfuscate sneaky changes that will allow him to introduce a stealthy AdminSDholder backdoor.
requirements: auditing SACL ("Write all properties") must be placed on the "configuration" partition using the ADSI console (https://www.manageengine.com/products/active-directory-audit/active-directory-auditing-configuration-guide-configure-object-level-auditing-manually.html). More precisely, you need to browse to Configuration > CN=Configuration > CN=ExtendedRights.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0003-Persistence/T1546-Event%20Triggered%20Execution
- https://adds-security.blogspot.com/2017/08/adminsdholder-backdoor-via-substitution.html
tags:
- attack.defense_evasion
- attack.t1564
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
    OperationType: '%%14674' # Value added
    AttributeLDAPDisplayName: localizationDisplayId
    ObjectDN|contains: "CN=Extended-Rights,CN=Configuration"
  filter:
    SubjectUserName|endswith: '$'
  condition: selection and not filter
falsepositives:
- Unknown
level: high

Stages and Predicates

Stage 0: condition

selection and not filter

Stage 1: selection

selection:
  EventID: 5136
  OperationType: '%%14674'
  AttributeLDAPDisplayName: localizationDisplayId
  ObjectDN|contains: "CN=Extended-Rights,CN=Configuration"

Stage 2: not filter

filter:
  SubjectUserName|endswith: '$'

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
SubjectUserNameends_with$excludes:SubjectUserName field:"SubjectUserName" value:"$"

Harvesting Of Wifi Credentials Via Netsh.EXE

#
Status
test
Severity
medium
Author
Andreas Hunkeler (@Karneades), oscd.community
Source
github.com/SigmaHQ/sigma

Detect the harvesting of wifi credentials using netsh.exe

MITRE ATT&CK Coverage

TacticTechniques
Credential Access
Discovery

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Harvesting Of Wifi Credentials Via Netsh.EXE
id: 42b1a5b8-353f-4f10-b256-39de4467faff
status: test
description: Detect the harvesting of wifi credentials using netsh.exe
references:
    - https://blog.malwarebytes.com/threat-analysis/2020/04/new-agenttesla-variant-steals-wifi-credentials/
author: Andreas Hunkeler (@Karneades), oscd.community
date: 2020-04-20
modified: 2023-02-13
tags:
    - attack.discovery
    - attack.credential-access
    - attack.t1040
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\netsh.exe'
        - OriginalFileName: 'netsh.exe'
    selection_cli:
        CommandLine|contains|all:
            - 'wlan'
            - ' s'
            - ' p'
            - ' k'
            - '=clear'
    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: '\netsh.exe'
    - OriginalFileName: 'netsh.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - 'wlan'
        - ' s'
        - ' p'
        - ' k'
        - '=clear'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • k
  • p corpus 2 (sigma 2)
  • s corpus 3 (sigma 3)
  • =clear
  • wlan
field:"CommandLine" kind:match
Imageends_with
  • \netsh.exe corpus 28 (sigma 28)
field:"Image" kind:ends_with value:"\netsh.exe"
OriginalFileNameeq
  • netsh.exe corpus 21 (sigma 14, splunk 7)
field:"OriginalFileName" kind:eq value:"netsh.exe"

Lace Tempest PowerShell Evidence Eraser

#
Status
test
Severity
high
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects a PowerShell script used by Lace Tempest APT to erase evidence from victim servers by exploiting CVE-2023-47246 as reported by SysAid Team

Known False Positives

  • Unlikely

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Lace Tempest PowerShell Evidence Eraser
id: b377ddab-502d-4519-9e8c-5590033d2d70
status: test
description: |
    Detects a PowerShell script used by Lace Tempest APT to erase evidence from victim servers by exploiting CVE-2023-47246 as reported by SysAid Team
references:
    - https://www.sysaid.com/blog/service-desk/on-premise-software-security-vulnerability-notification
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-11-09
tags:
    - attack.execution
    - attack.t1059.001
    - detection.emerging-threats
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains|all:
            - 'cleanLL'
            - 'usersfiles.war'
            - 'Remove-Item -Path "$tomcat_dir'
            - 'SysAidServer'
            - 'sleep '
            - 'while(1)'
    condition: selection
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    ScriptBlockText|contains|all:
        - 'cleanLL'
        - 'usersfiles.war'
        - 'Remove-Item -Path "$tomcat_dir'
        - 'SysAidServer'
        - 'sleep '
        - 'while(1)'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
ScriptBlockTextmatch
  • Remove-Item -Path "$tomcat_dir
  • SysAidServer
  • cleanLL
  • sleep
  • usersfiles.war
  • while(1)
field:"ScriptBlockText" kind:match

macOS ESF Suspicious File Creation in Persistence Locations

#
Status
experimental
Severity
high
Author
Eric Brown - Nebulock, Inc.
Source
github.com/Nebulock-Inc/macos-coresigma

Detects file creation in macOS persistence locations that could indicate malware installation

Known False Positives

  • Legitimate software installation
  • System updates

MITRE ATT&CK Coverage

TacticTechniques
PersistenceNo specific technique

Telemetry Coverage

Rule Body

title: macOS ESF Suspicious File Creation in Persistence Locations
id: b2c3d4e5-f6a7-8901-bcde-f23456789012
status: experimental
description: Detects file creation in macOS persistence locations that could indicate malware installation
author: Eric Brown - Nebulock, Inc.
date: 2025/01/15
modified: 2025/01/15
logsource:
    product: macos
    service: endpointsecurity
    category: file_create
detection:
    selection:
        event.action: create
        TargetFilename|contains:
            - '/Library/LaunchAgents'
            - '/Library/LaunchDaemons'
            - '/System/Library/LaunchAgents'
            - '/System/Library/LaunchDaemons'
            - '~/Library/LaunchAgents'
            - '/Library/StartupItems'
    condition: selection
falsepositives:
    - Legitimate software installation
    - System updates
level: high
tags:
    - attack.persistence

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    event.action: create
    TargetFilename|contains:
        - '/Library/LaunchAgents'
        - '/Library/LaunchDaemons'
        - '/System/Library/LaunchAgents'
        - '/System/Library/LaunchDaemons'
        - '~/Library/LaunchAgents'
        - '/Library/StartupItems'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
TargetFilenamematch
  • /Library/LaunchAgents
  • /Library/LaunchDaemons
  • /Library/StartupItems
  • /System/Library/LaunchAgents
  • /System/Library/LaunchDaemons
  • ~/Library/LaunchAgents
field:"TargetFilename" kind:match
event.actioneq
  • create corpus 2 (sigma 2)
field:"EventType" kind:eq value:"create"

MacOS Scripting Interpreter AppleScript

#
Status
test
Severity
medium
Author
Alejandro Ortuno, oscd.community
Source
github.com/SigmaHQ/sigma

Detects execution of AppleScript of the macOS scripting language AppleScript.

Known False Positives

  • Application installers might contain scripts as part of the installation process.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: MacOS Scripting Interpreter AppleScript
id: 1bc2e6c5-0885-472b-bed6-be5ea8eace55
status: test
description: Detects execution of AppleScript of the macOS scripting language AppleScript.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1059.002/T1059.002.md
    - https://redcanary.com/blog/applescript/
author: Alejandro Ortuno, oscd.community
date: 2020-10-21
modified: 2026-05-21
tags:
    - attack.execution
    - attack.t1059.002
logsource:
    category: process_creation
    product: macos
detection:
    selection:
        Image|endswith: '/osascript'
        CommandLine|contains:
            - ' -e '
            - '.scpt'
            - '.js'
    filter_optional_opencode:
        # OpenCode uses osascript to handle copying text from the TUI on MacOS devices. See https://github.com/anomalyco/opencode/blob/ca723f1cbc6fc4244ae57e61e9de8c4e37380ed4/packages/opencode/src/cli/cmd/tui/util/clipboard.ts#L65 for reference.
        ParentImage|endswith: 'opencode'
        CommandLine|contains|all:
            - 'osascript'
            - ' -e '
            - 'set imageData to the clipboard'
            - 'set fileRef'
    condition: selection and not 1 of filter_optional_*
falsepositives:
    - Application installers might contain scripts as part of the installation process.
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_optional_*

Stage 1: selection

selection:
    Image|endswith: '/osascript'
    CommandLine|contains:
        - ' -e '
        - '.scpt'
        - '.js'

Stage 2: not filter_optional_opencode

filter_optional_opencode:
    ParentImage|endswith: 'opencode'
    CommandLine|contains|all:
        - 'osascript'
        - ' -e '
        - 'set imageData to the clipboard'
        - 'set fileRef'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -e corpus 17 (sigma 14, elastic 3)
  • .js corpus 9 (sigma 9)
  • .scpt
field:"CommandLine" kind:match
Imageends_with
  • /osascript corpus 7 (sigma 7)
field:"Image" kind:ends_with value:"/osascript"

Exclusions

The rule actively suppresses these predicates.

Modify Group Policy Settings - ScriptBlockLogging

#
Status
test
Severity
medium
Author
frack113
Source
github.com/SigmaHQ/sigma

Detect malicious GPO modifications can be used to implement many other malicious behaviors.

Known False Positives

  • Legitimate use

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Modify Group Policy Settings - ScriptBlockLogging
id: b7216a7d-687e-4c8d-82b1-3080b2ad961f
related:
    - id: ada4b0c4-758b-46ac-9033-9004613a150d
      type: similar
status: test
description: Detect malicious GPO modifications can be used to implement many other malicious behaviors.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/40b77d63808dd4f4eafb83949805636735a1fd15/atomics/T1484.001/T1484.001.md
author: frack113
date: 2022-08-19
tags:
    - attack.privilege-escalation
    - attack.defense-impairment
    - attack.t1484.001
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_path:
        ScriptBlockText|contains: \SOFTWARE\Policies\Microsoft\Windows\System
    selection_key:
        ScriptBlockText|contains:
            - GroupPolicyRefreshTimeDC
            - GroupPolicyRefreshTimeOffsetDC
            - GroupPolicyRefreshTime
            - GroupPolicyRefreshTimeOffset
            - EnableSmartScreen
            - ShellSmartScreenLevel
    condition: all of selection_*
falsepositives:
    - Legitimate use
level: medium
regression_tests_path: regression_data/rules/windows/powershell/powershell_script/posh_ps_modify_group_policy_settings/info.yml

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_path

selection_path:
    ScriptBlockText|contains: \SOFTWARE\Policies\Microsoft\Windows\System

Stage 2: selection_key

selection_key:
    ScriptBlockText|contains:
        - GroupPolicyRefreshTimeDC
        - GroupPolicyRefreshTimeOffsetDC
        - GroupPolicyRefreshTime
        - GroupPolicyRefreshTimeOffset
        - EnableSmartScreen
        - ShellSmartScreenLevel

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
ScriptBlockTextmatch
  • EnableSmartScreen
  • GroupPolicyRefreshTime
  • GroupPolicyRefreshTimeDC
  • GroupPolicyRefreshTimeOffset
  • GroupPolicyRefreshTimeOffsetDC
  • ShellSmartScreenLevel
  • \SOFTWARE\Policies\Microsoft\Windows\System
field:"ScriptBlockText" kind:match

New Federated Domain Added

#
Status
test
Severity
medium
Author
Splunk Threat Research Team (original rule), Harjot Singh @cyb3rjy0t (sigma rule)
Source
github.com/SigmaHQ/sigma

Detects the addition of a new Federated Domain.

Known False Positives

  • The creation of a new Federated domain is not necessarily malicious, however these events need to be followed closely, as it may indicate federated credential abuse or backdoor via federated identities at a similar or different cloud provider.

MITRE ATT&CK Coverage

Rule Body

title: New Federated Domain Added
id: 58f88172-a73d-442b-94c9-95eaed3cbb36
related:
    - id: 42127bdd-9133-474f-a6f1-97b6c08a4339
      type: similar
status: test
description: Detects the addition of a new Federated Domain.
references:
    - https://research.splunk.com/cloud/e155876a-6048-11eb-ae93-0242ac130002/
    - https://o365blog.com/post/aadbackdoor/
author: Splunk Threat Research Team (original rule), Harjot Singh @cyb3rjy0t (sigma rule)
date: 2023-09-18
tags:
    - attack.privilege-escalation
    - attack.defense-impairment
    - attack.t1484.002
logsource:
    service: audit
    product: m365
detection:
    selection_domain:
        Operation|contains: 'domain'
    selection_operation:
        Operation|contains:
            - 'add'
            - 'new'
    condition: all of selection_*
falsepositives:
    - The creation of a new Federated domain is not necessarily malicious, however these events need to be followed closely, as it may indicate federated credential abuse or backdoor via federated identities at a similar or different cloud provider.
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_domain

selection_domain:
    Operation|contains: 'domain'

Stage 2: selection_operation

selection_operation:
    Operation|contains:
        - 'add'
        - 'new'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Operationmatch
  • add
  • domain
  • new
field:"Operation" kind:match

Potential Persistence Via MyComputer Registry Keys

#
Status
test
Severity
high
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects modification to the "Default" value of the "MyComputer" key and subkeys to point to a custom binary that will be launched whenever the associated action is executed (see reference section for example)

Known False Positives

  • Unlikely but if you experience FPs add specific processes and locations you would like to monitor for

MITRE ATT&CK Coverage

TacticTechniques
PersistenceNo specific technique

Telemetry Coverage

Rule Body

title: Potential Persistence Via MyComputer Registry Keys
id: 8fbe98a8-8f9d-44f8-aa71-8c572e29ef06
status: test
description: Detects modification to the "Default" value of the "MyComputer" key and subkeys to point to a custom binary that will be launched whenever the associated action is executed (see reference section for example)
references:
    - https://www.hexacorn.com/blog/2017/01/18/beyond-good-ol-run-key-part-55/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-09
modified: 2024-01-11
tags:
    - attack.persistence
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: '\Microsoft\Windows\CurrentVersion\Explorer\MyComputer'
        TargetObject|endswith: '(Default)'
    condition: selection
falsepositives:
    - Unlikely but if you experience FPs add specific processes and locations you would like to monitor for
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    TargetObject|contains: '\Microsoft\Windows\CurrentVersion\Explorer\MyComputer'
    TargetObject|endswith: '(Default)'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
TargetObjectends_with
  • (Default) corpus 2 (sigma 2)
field:"TargetObject" kind:ends_with value:"(Default)"
TargetObjectmatch
  • \Microsoft\Windows\CurrentVersion\Explorer\MyComputer
field:"TargetObject" kind:match value:"\Microsoft\Windows\CurrentVersion\Explorer\MyComputer"

Potential Persistence Via Netsh Helper DLL

#
Status
test
Severity
medium
Author
Victor Sergeev, oscd.community
Source
github.com/SigmaHQ/sigma

Detects the execution of netsh with "add helper" flag in order to add a custom helper DLL. This technique can be abused to add a malicious helper DLL that can be used as a persistence proxy that gets called when netsh.exe is executed.

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Potential Persistence Via Netsh Helper DLL
id: 56321594-9087-49d9-bf10-524fe8479452
related:
    - id: c90362e0-2df3-4e61-94fe-b37615814cb1
      type: similar
    - id: e7b18879-676e-4a0e-ae18-27039185a8e7
      type: similar
status: test
description: |
    Detects the execution of netsh with "add helper" flag in order to add a custom helper DLL. This technique can be abused to add a malicious helper DLL that can be used as a persistence proxy that gets called when netsh.exe is executed.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1546.007/T1546.007.md
    - https://github.com/outflanknl/NetshHelperBeacon
    - https://web.archive.org/web/20160928212230/https://www.adaptforward.com/2016/09/using-netshell-to-execute-evil-dlls-and-persist-on-a-host/
author: Victor Sergeev, oscd.community
date: 2019-10-25
modified: 2023-11-28
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1546.007
    - attack.s0108
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName: 'netsh.exe'
        - Image|endswith: '\netsh.exe'
    selection_cli:
        CommandLine|contains|all:
            - 'add'
            - 'helper'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - OriginalFileName: 'netsh.exe'
    - Image|endswith: '\netsh.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - 'add'
        - 'helper'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • add corpus 30 (sigma 26, splunk 4)
  • helper corpus 2 (sigma 2)
field:"CommandLine" kind:match
Imageends_with
  • \netsh.exe corpus 28 (sigma 28)
field:"Image" kind:ends_with value:"\netsh.exe"
OriginalFileNameeq
  • netsh.exe corpus 21 (sigma 14, splunk 7)
field:"OriginalFileName" kind:eq value:"netsh.exe"

Potential WinAPI Calls Via CommandLine

#
Status
test
Severity
high
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the use of WinAPI Functions via the commandline. As seen used by threat actors via the tool winapiexec

Known False Positives

  • Some legitimate action or applications may use these functions. Investigate further to determine the legitimacy of the activity.

MITRE ATT&CK Coverage

TacticTechniques
Execution

Telemetry Coverage

Rule Body

title: Potential WinAPI Calls Via CommandLine
id: ba3f5c1b-6272-4119-9dbd-0bc8d21c2702
related:
    - id: 03d83090-8cba-44a0-b02f-0b756a050306
      type: derived
status: test
description: Detects the use of WinAPI Functions via the commandline. As seen used by threat actors via the tool winapiexec
references:
    - https://twitter.com/m417z/status/1566674631788007425
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-09-06
modified: 2025-03-06
tags:
    - attack.execution
    - attack.t1106
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains:
            - 'AddSecurityPackage'
            - 'AdjustTokenPrivileges'
            - 'Advapi32'
            - 'CloseHandle'
            - 'CreateProcessWithToken'
            - 'CreatePseudoConsole'
            - 'CreateRemoteThread'
            - 'CreateThread'
            - 'CreateUserThread'
            - 'DangerousGetHandle'
            - 'DuplicateTokenEx'
            - 'EnumerateSecurityPackages'
            - 'FreeHGlobal'
            - 'FreeLibrary'
            - 'GetDelegateForFunctionPointer'
            - 'GetLogonSessionData'
            - 'GetModuleHandle'
            - 'GetProcAddress'
            - 'GetProcessHandle'
            - 'GetTokenInformation'
            - 'ImpersonateLoggedOnUser'
            - 'kernel32'
            - 'LoadLibrary'
            - 'memcpy'
            - 'MiniDumpWriteDump'
            # - 'msvcrt'
            - 'ntdll'
            - 'OpenDesktop'
            - 'OpenProcess'
            - 'OpenProcessToken'
            - 'OpenThreadToken'
            - 'OpenWindowStation'
            - 'PtrToString'
            - 'QueueUserApc'
            - 'ReadProcessMemory'
            - 'RevertToSelf'
            - 'RtlCreateUserThread'
            - 'secur32'
            - 'SetThreadToken'
            # - 'user32'
            - 'VirtualAlloc'
            - 'VirtualFree'
            - 'VirtualProtect'
            - 'WaitForSingleObject'
            - 'WriteInt32'
            - 'WriteProcessMemory'
            - 'ZeroFreeGlobalAllocUnicode'
    filter_optional_mpcmdrun:
        Image|endswith: '\MpCmdRun.exe'
        CommandLine|contains: 'GetLoadLibraryWAddress32'
    filter_optional_compatTelRunner:
        ParentImage|endswith: '\CompatTelRunner.exe'
        CommandLine|contains:
            - 'FreeHGlobal'
            - 'PtrToString'
            - 'kernel32'
            - 'CloseHandle'
    condition: selection and not 1 of filter_optional_*
falsepositives:
    - Some legitimate action or applications may use these functions. Investigate further to determine the legitimacy of the activity.
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_susp_inline_win_api_access/info.yml

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_optional_*

Stage 1: selection

selection:
    CommandLine|contains:
        - 'AddSecurityPackage'
        - 'AdjustTokenPrivileges'
        - 'Advapi32'
        - 'CloseHandle'
        - 'CreateProcessWithToken'
        - 'CreatePseudoConsole'
        - 'CreateRemoteThread'
        - 'CreateThread'
        - 'CreateUserThread'
        - 'DangerousGetHandle'
        - 'DuplicateTokenEx'
        - 'EnumerateSecurityPackages'
        - 'FreeHGlobal'
        - 'FreeLibrary'
        - 'GetDelegateForFunctionPointer'
        - 'GetLogonSessionData'
        - 'GetModuleHandle'
        - 'GetProcAddress'
        - 'GetProcessHandle'
        - 'GetTokenInformation'
        - 'ImpersonateLoggedOnUser'
        - 'kernel32'
        - 'LoadLibrary'
        - 'memcpy'
        - 'MiniDumpWriteDump'
        - 'ntdll'
        - 'OpenDesktop'
        - 'OpenProcess'
        - 'OpenProcessToken'
        - 'OpenThreadToken'
        - 'OpenWindowStation'
        - 'PtrToString'
        - 'QueueUserApc'
        - 'ReadProcessMemory'
        - 'RevertToSelf'
        - 'RtlCreateUserThread'
        - 'secur32'
        - 'SetThreadToken'
        - 'VirtualAlloc'
        - 'VirtualFree'
        - 'VirtualProtect'
        - 'WaitForSingleObject'
        - 'WriteInt32'
        - 'WriteProcessMemory'
        - 'ZeroFreeGlobalAllocUnicode'

Stage 2: not filter_optional_*

filter_optional_mpcmdrun:
    Image|endswith: '\MpCmdRun.exe'
    CommandLine|contains: 'GetLoadLibraryWAddress32'
filter_optional_compatTelRunner:
    ParentImage|endswith: '\CompatTelRunner.exe'
    CommandLine|contains:
        - 'FreeHGlobal'
        - 'PtrToString'
        - 'kernel32'
        - 'CloseHandle'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • AddSecurityPackage
  • AdjustTokenPrivileges
  • Advapi32
  • CloseHandle
  • CreateProcessWithToken
  • CreatePseudoConsole
  • CreateRemoteThread
  • CreateThread
  • CreateUserThread
  • DangerousGetHandle
  • DuplicateTokenEx
  • EnumerateSecurityPackages
  • FreeHGlobal
  • FreeLibrary
  • GetDelegateForFunctionPointer
  • GetLogonSessionData
  • GetModuleHandle
  • GetProcAddress
  • GetProcessHandle
  • GetTokenInformation
  • ImpersonateLoggedOnUser
  • LoadLibrary
  • MiniDumpWriteDump
  • OpenDesktop
  • OpenProcess
  • OpenProcessToken
  • OpenThreadToken
  • OpenWindowStation
  • PtrToString
  • QueueUserApc
  • ReadProcessMemory
  • RevertToSelf
  • RtlCreateUserThread
  • SetThreadToken
  • VirtualAlloc
  • VirtualFree
  • VirtualProtect
  • WaitForSingleObject
  • WriteInt32
  • WriteProcessMemory
  • ZeroFreeGlobalAllocUnicode
  • kernel32
  • memcpy
  • ntdll
  • secur32
field:"CommandLine" kind:match

Exclusions

The rule actively suppresses these predicates.

Potentially Over Permissive Permissions Granted Using Dsacls.EXE

#
Status
test
Severity
medium
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects usage of Dsacls to grant over permissive permissions

Known False Positives

  • Legitimate administrators granting over permissive permissions to users

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Potentially Over Permissive Permissions Granted Using Dsacls.EXE
id: 01c42d3c-242d-4655-85b2-34f1739632f7
status: test
description: Detects usage of Dsacls to grant over permissive permissions
references:
    - https://ss64.com/nt/dsacls.html
    - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771151(v=ws.11)
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-06-20
modified: 2023-02-04
tags:
    - attack.stealth
    - attack.t1218
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\dsacls.exe'
        - OriginalFileName: "DSACLS.EXE"
    selection_flag:
        CommandLine|contains: ' /G '
    selection_permissions:
        CommandLine|contains: # Add more permissions as you see fit in your environment
            - 'GR'
            - 'GE'
            - 'GW'
            - 'GA'
            - 'WP'
            - 'WD'
    condition: all of selection_*
falsepositives:
    - Legitimate administrators granting over permissive permissions to users
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\dsacls.exe'
    - OriginalFileName: "DSACLS.EXE"

Stage 2: selection_flag

selection_flag:
    CommandLine|contains: ' /G '

Stage 3: selection_permissions

selection_permissions:
    CommandLine|contains:
        - 'GR'
        - 'GE'
        - 'GW'
        - 'GA'
        - 'WP'
        - 'WD'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • /G
  • GA
  • GE
  • GR
  • GW
  • WD
  • WP
field:"CommandLine" kind:match
Imageends_with
  • \dsacls.exe corpus 2 (sigma 2)
field:"Image" kind:ends_with value:"\dsacls.exe"
OriginalFileNameeq
  • DSACLS.EXE corpus 2 (sigma 2)
field:"OriginalFileName" kind:eq value:"DSACLS.EXE"

Potentially Suspicious Azure Front Door Connection

#
Status
test
Severity
medium
Author
Isaac Dunham
Source
github.com/SigmaHQ/sigma

Detects connections with Azure Front Door (known legitimate service that can be leveraged for C2) that fall outside of known benign behavioral baseline (not using common apps or common azurefd.net endpoints)

Known False Positives

  • Results are not inherently suspicious, but should be investigated during threat hunting for potential cloud C2.
  • Organization-specific Azure Front Door endpoints

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 3: Network connection

Rule Body

title: Potentially Suspicious Azure Front Door Connection
id: 8cb4d14e-776e-43c2-8fb9-91e7fcea32b4
status: test
description: |
    Detects connections with Azure Front Door (known legitimate service that can be leveraged for C2)
    that fall outside of known benign behavioral baseline (not using common apps or common azurefd.net endpoints)
references:
    - https://lots-project.com/site/2a2e617a75726566642e6e6574
    - https://medium.com/r3d-buck3t/red-teaming-in-cloud-leverage-azure-frontdoor-cdn-for-c2-redirectors-79dd9ca98178
    - https://www.fortalicesolutions.com/posts/hiding-behind-the-front-door-with-azure-domain-fronting
author: Isaac Dunham
date: 2024-11-07
tags:
    - attack.command-and-control
    - attack.t1102.002
    - attack.t1090.004
    - detection.threat-hunting
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        DestinationHostname|contains: 'azurefd.net'
    filter_main_web_browsers:
        Image|endswith:
            - 'brave.exe'
            - 'chrome.exe'
            - 'chromium.exe'
            - 'firefox.exe'
            - 'msedge.exe'
            - 'msedgewebview2.exe'
            - 'opera.exe'
            - 'vivaldi.exe'
    filter_main_common_talkers:
        Image|endswith: 'searchapp.exe' # Windows search service uses signifcant amount of Azure FD
    filter_main_known_benign_domains:
        DestinationHostname|contains:
            - 'afdxtest.z01.azurefd.net' # used by Cortana; Cisco Umbrella top 1m
            - 'fp-afd.azurefd.net' # used by Cortana; Cisco Umbrella top 1m
            - 'fp-afdx-bpdee4gtg6frejfd.z01.azurefd.net' # used by Cortana; Cisco Umbrella top 1m
            - 'roxy.azurefd.net' # used by Cortana; Cisco Umbrella top 1m
            - 'powershellinfraartifacts-gkhedzdeaghdezhr.z01.azurefd.net' # Used by VS Code; Cisco Umbrella top 1m
            - 'storage-explorer-publishing-feapcgfgbzc2cjek.b01.azurefd.net' # Used by Azure Storage Explorer; Cisco Umbrella top 1m
            - 'graph.azurefd.net' # MS Graph; Cisco Umbrella top 1m
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Results are not inherently suspicious, but should be investigated during threat hunting for potential cloud C2.
    - Organization-specific Azure Front Door endpoints
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    DestinationHostname|contains: 'azurefd.net'

Stage 2: not filter_main_*

filter_main_web_browsers:
    Image|endswith:
        - 'brave.exe'
        - 'chrome.exe'
        - 'chromium.exe'
        - 'firefox.exe'
        - 'msedge.exe'
        - 'msedgewebview2.exe'
        - 'opera.exe'
        - 'vivaldi.exe'
filter_main_common_talkers:
    Image|endswith: 'searchapp.exe'
filter_main_known_benign_domains:
    DestinationHostname|contains:
        - 'afdxtest.z01.azurefd.net'
        - 'fp-afd.azurefd.net'
        - 'fp-afdx-bpdee4gtg6frejfd.z01.azurefd.net'
        - 'roxy.azurefd.net'
        - 'powershellinfraartifacts-gkhedzdeaghdezhr.z01.azurefd.net'
        - 'storage-explorer-publishing-feapcgfgbzc2cjek.b01.azurefd.net'
        - 'graph.azurefd.net'

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
DestinationHostnamematchafdxtest.z01.azurefd.netexcludes:DestinationHostname field:"DestinationHostname" value:"afdxtest.z01.azurefd.net"
DestinationHostnamematchfp-afd.azurefd.netexcludes:DestinationHostname field:"DestinationHostname" value:"fp-afd.azurefd.net"
DestinationHostnamematchfp-afdx-bpdee4gtg6frejfd.z01.azurefd.netexcludes:DestinationHostname field:"DestinationHostname" value:"fp-afdx-bpdee4gtg6frejfd.z01.azurefd.net"
DestinationHostnamematchgraph.azurefd.netexcludes:DestinationHostname field:"DestinationHostname" value:"graph.azurefd.net"
DestinationHostnamematchpowershellinfraartifacts-gkhedzdeaghdezhr.z01.azurefd.netexcludes:DestinationHostname field:"DestinationHostname" value:"powershellinfraartifacts-gkhedzdeaghdezhr.z01.azurefd.net"
DestinationHostnamematchroxy.azurefd.netexcludes:DestinationHostname field:"DestinationHostname" value:"roxy.azurefd.net"
DestinationHostnamematchstorage-explorer-publishing-feapcgfgbzc2cjek.b01.azurefd.netexcludes:DestinationHostname field:"DestinationHostname" value:"storage-explorer-publishing-feapcgfgbzc2cjek.b01.azurefd.net"
Imageends_withbrave.exeexcludes:Image field:"Image" value:"brave.exe"
Imageends_withchrome.exeexcludes:Image field:"Image" value:"chrome.exe"
Imageends_withchromium.exeexcludes:Image field:"Image" value:"chromium.exe"
Imageends_withfirefox.exeexcludes:Image field:"Image" value:"firefox.exe"
Imageends_withmsedge.exeexcludes:Image field:"Image" value:"msedge.exe"
Imageends_withmsedgewebview2.exeexcludes:Image field:"Image" value:"msedgewebview2.exe"
Imageends_withopera.exeexcludes:Image field:"Image" value:"opera.exe"
Imageends_withsearchapp.exeexcludes:Image field:"Image" value:"searchapp.exe"
Imageends_withvivaldi.exeexcludes:Image field:"Image" value:"vivaldi.exe"

Read Contents From Stdin Via Cmd.EXE

#
Status
test
Severity
medium
Author
frack113, Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detect the use of "<" to read and potentially execute a file via cmd.exe

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Read Contents From Stdin Via Cmd.EXE
id: 241e802a-b65e-484f-88cd-c2dc10f9206d
related:
    - id: 00a4bacd-6db4-46d5-9258-a7d5ebff4003
      type: obsolete
status: test
description: Detect the use of "<" to read and potentially execute a file via cmd.exe
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/40b77d63808dd4f4eafb83949805636735a1fd15/atomics/T1059.003/T1059.003.md
    - https://web.archive.org/web/20220306121156/https://www.x86matthew.com/view_post?id=ntdll_pipe
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2023-03-07
tags:
    - attack.execution
    - attack.t1059.003
logsource:
    category: process_creation
    product: windows
detection:
    selection_cmd:
        - OriginalFileName: 'Cmd.Exe'
        - Image|endswith: '\cmd.exe'
    selection_cli:
        CommandLine|contains: '<'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_cmd_stdin_redirect/info.yml

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_cmd

selection_cmd:
    - OriginalFileName: 'Cmd.Exe'
    - Image|endswith: '\cmd.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains: '<'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • <
field:"CommandLine" kind:match value:"<"
Imageends_with
  • \cmd.exe corpus 132 (sigma 130, splunk 2)
field:"Image" kind:ends_with value:"\cmd.exe"
OriginalFileNameeq
  • Cmd.Exe corpus 75 (sigma 43, splunk 17, elastic 15)
field:"OriginalFileName" kind:eq value:"Cmd.Exe"

Registry Hive File Staged Outside Standard User Profile Path

#
Status
experimental
Severity
high
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the creation of a registry hive file (UsrClass.dat or NTUSER.DAT) outside of the standard user profile path. These files generally contain various user-specific registry settings and are typically located in the user's profile directory. Staging these files outside of the standard path can be indicative of an attacker attempting to manipulate user registry settings for persistence, privilege escalation, or dump user registry hives for credential harvesting.

Known False Positives

  • Backup or profile migration software
  • Forensic acquisition tools

MITRE ATT&CK Coverage

TacticTechniques
Privilege Escalation
Credential Access

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 11: FileCreate

Rule Body

title: Registry Hive File Staged Outside Standard User Profile Path
id: a7f3c891-2e4d-4b6a-9f8c-d5e2a1b04c73
status: experimental
description: |
    Detects the creation of a registry hive file (UsrClass.dat or NTUSER.DAT) outside of the standard user profile path.
    These files generally contain various user-specific registry settings and are typically located in the user's profile directory.
    Staging these files outside of the standard path can be indicative of an attacker attempting to manipulate user registry settings
    for persistence, privilege escalation, or dump user registry hives for credential harvesting.
references:
    - https://github.com/MSNightmare/LegacyHive
    - https://git.projectnightcrawler.dev/NightmareEclipse/LegacyHive
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2026-07-23
tags:
    - attack.privilege-escalation
    - attack.t1548
    - attack.credential-access
    - attack.t1003
logsource:
    category: file_event
    product: windows
detection:
    selection:
        TargetFilename|endswith:
            - '\UsrClass.dat'
            - '\NTUSER.DAT'
    filter_main_usrclass:
        TargetFilename|endswith: '\AppData\Local\Microsoft\Windows\UsrClass.dat'
    filter_main_ntuser:
        TargetFilename|re|i: '^C:\\Users\\[^\\]+\\NTUSER\.DAT$'
    filter_main_system:
        TargetFilename|startswith:
            - 'C:\Windows\System32\config\'
            - 'C:\Windows\SYSVOL\'
            - 'C:\Windows\ServiceProfiles\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Backup or profile migration software
    - Forensic acquisition tools
level: high
regression_tests_path: regression_data/rules/windows/file/file_event/file_event_win_susp_registry_hive_file_creation/info.yml

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    TargetFilename|endswith:
        - '\UsrClass.dat'
        - '\NTUSER.DAT'

Stage 2: not filter_main_*

filter_main_usrclass:
    TargetFilename|endswith: '\AppData\Local\Microsoft\Windows\UsrClass.dat'
filter_main_ntuser:
    TargetFilename|re|i: '^C:\\Users\\[^\\]+\\NTUSER\.DAT$'
filter_main_system:
    TargetFilename|startswith:
        - 'C:\Windows\System32\config\'
        - 'C:\Windows\SYSVOL\'
        - 'C:\Windows\ServiceProfiles\'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
TargetFilenameends_with
  • \NTUSER.DAT
  • \UsrClass.dat
field:"TargetFilename" kind:ends_with

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
TargetFilenameends_with\AppData\Local\Microsoft\Windows\UsrClass.datexcludes:TargetFilename field:"TargetFilename" value:"\AppData\Local\Microsoft\Windows\UsrClass.dat"
TargetFilenameregex_match(?i)^C:\Users\[^\]+\NTUSER.DAT$excludes:TargetFilename field:"TargetFilename" value:"(?i)^C:\Users\[^\]+\NTUSER.DAT$"
TargetFilenamestarts_withC:\Windows\SYSVOL\excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\SYSVOL\"
TargetFilenamestarts_withC:\Windows\ServiceProfiles\excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\ServiceProfiles\"
TargetFilenamestarts_withC:\Windows\System32\config\excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\System32\config\"

RemCom Service Installation

#
Status
test
Severity
medium
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects RemCom service installation and execution events

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: RemCom Service Installation
id: 9e36ed87-4986-482e-8e3b-5c23ffff11bf
status: test
description: Detects RemCom service installation and execution events
references:
    - https://github.com/kavika13/RemCom/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-08-07
tags:
    - attack.execution
    - attack.t1569.002
logsource:
    product: windows
    service: system
detection:
    selection_eid:
        Provider_Name: 'Service Control Manager'
        EventID: 7045
    selection_service:
        - ServiceName: 'RemComSvc'
        - ImagePath|endswith: '\RemComSvc.exe'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_eid

selection_eid:
    Provider_Name: 'Service Control Manager'
    EventID: 7045

Stage 2: selection_service

selection_service:
    - ServiceName: 'RemComSvc'
    - ImagePath|endswith: '\RemComSvc.exe'

Indicators

These rows show field, operator, and value matches.

Renamed Schtasks Execution

#
Status
experimental
Severity
high
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the execution of renamed schtasks.exe binary, which is a legitimate Windows utility used for scheduling tasks. One of the very common persistence techniques is schedule malicious tasks using schtasks.exe. Since, it is heavily abused, it is also heavily monitored by security products. To evade detection, threat actors may rename the schtasks.exe binary to schedule their malicious tasks.

Known False Positives

  • Unlikely

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Renamed Schtasks Execution
id: f91e51c9-f344-4b32-969b-0b6f6b8537d4
status: experimental
description: |
    Detects the execution of renamed schtasks.exe binary, which is a legitimate Windows utility used for scheduling tasks.
    One of the very common persistence techniques is schedule malicious tasks using schtasks.exe.
    Since, it is heavily abused, it is also heavily monitored by security products. To evade detection, threat actors may rename the schtasks.exe binary to schedule their malicious tasks.
references:
    - https://x.com/JangPr0/status/1932034543026065833
    - https://ss64.com/nt/schtasks.html
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-11-27
tags:
    - attack.execution
    - attack.persistence
    - attack.privilege-escalation
    - attack.stealth
    - attack.t1036.003
    - attack.t1053.005
logsource:
    category: process_creation
    product: windows
detection:
    selection_cmd_operation:
        CommandLine|contains|windash:
            - ' /create '
            - ' /delete '
            - ' /query '
            - ' /change '
            - ' /run '
            - ' /end '
    selection_cmd_flags:
        CommandLine|contains|windash:
            - ' /tn '
            - ' /tr '
            - ' /sc '
            - ' /st '
            - ' /ru '
            - ' /fo '
    selection_pe:
        OriginalFileName: 'schtasks.exe'
    filter_main_cmd:
        CommandLine|contains: 'schtasks'
    filter_main_img:
        Image|endswith: '\schtasks.exe'
    condition: (all of selection_cmd_* and not filter_main_cmd) or (selection_pe and not filter_main_img)
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

(all of selection_cmd_* and not filter_main_cmd) or (selection_pe and not filter_main_img)

Stage 1: selection_cmd_operation

selection_cmd_operation:
    CommandLine|contains|windash:
        - ' /create '
        - ' /delete '
        - ' /query '
        - ' /change '
        - ' /run '
        - ' /end '

Stage 2: selection_cmd_flags

selection_cmd_flags:
    CommandLine|contains|windash:
        - ' /tn '
        - ' /tr '
        - ' /sc '
        - ' /st '
        - ' /ru '
        - ' /fo '

Stage 3: not filter_main_cmd

filter_main_cmd:
    CommandLine|contains: 'schtasks'

Stage 4: selection_pe

selection_pe:
    OriginalFileName: 'schtasks.exe'

Stage 5: not filter_main_img

filter_main_img:
    Image|endswith: '\schtasks.exe'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -change
  • -create corpus 4 (sigma 4)
  • -delete
  • -end
  • -fo
  • -query
  • -ru
  • -run
  • -sc corpus 3 (sigma 3)
  • -st
  • -tn
  • -tr
  • /change corpus 3 (sigma 3)
  • /create corpus 15 (sigma 15)
  • /delete corpus 2 (sigma 2)
  • /end
  • /fo
  • /query
  • /ru
  • /run
  • /sc
  • /st
  • /tn corpus 2 (sigma 2)
  • /tr
  • –change
  • –create corpus 4 (sigma 4)
  • –delete
  • –end
  • –fo
  • –query
  • –ru
  • –run
  • –sc
  • –st
  • –tn
  • –tr
  • —change
  • —create corpus 4 (sigma 4)
  • —delete
  • —end
  • —fo
  • —query
  • —ru
  • —run
  • —sc
  • —st
  • —tn
  • —tr
  • ―change
  • ―create corpus 4 (sigma 4)
  • ―delete
  • ―end
  • ―fo
  • ―query
  • ―ru
  • ―run
  • ―sc
  • ―st
  • ―tn
  • ―tr
field:"CommandLine" kind:match
OriginalFileNameeq
  • schtasks.exe corpus 29 (sigma 18, elastic 7, splunk 4)
field:"OriginalFileName" kind:eq value:"schtasks.exe"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematchschtasksexcludes:CommandLine field:"CommandLine" value:"schtasks"
Imageends_with\schtasks.exeexcludes:Image field:"Image" value:"\schtasks.exe"

Run PowerShell Script from Redirected Input Stream

#
Status
test
Severity
high
Author
Moriarty Meng (idea), Anton Kutepov (rule), oscd.community
Source
github.com/SigmaHQ/sigma

Detects PowerShell script execution via input stream redirect

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Run PowerShell Script from Redirected Input Stream
id: c83bf4b5-cdf0-437c-90fa-43d734f7c476
status: test
description: Detects PowerShell script execution via input stream redirect
references:
    - https://github.com/LOLBAS-Project/LOLBAS/blob/4db780e0f0b2e2bb8cb1fa13e09196da9b9f1834/yml/LOLUtilz/OSBinaries/Powershell.yml
    - https://twitter.com/Moriarty_Meng/status/984380793383370752
author: Moriarty Meng (idea), Anton Kutepov (rule), oscd.community
date: 2020-10-17
modified: 2021-11-27
tags:
    - attack.execution
    - attack.t1059
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        CommandLine|re: '\s-\s*<'
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'
    CommandLine|re: '\s-\s*<'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLineregex_match
  • \s-\s*<
field:"CommandLine" kind:regex_match value:"\s-\s*<"
Imageends_with
  • \powershell.exe corpus 181 (sigma 180, splunk 1)
  • \pwsh.exe corpus 166 (sigma 166)
field:"Image" kind:ends_with

Shell Process Spawned by Java.EXE

#
Status
test
Severity
medium
Author
Andreas Hunkeler (@Karneades), Nasreddine Bencherchali
Source
github.com/SigmaHQ/sigma

Detects shell spawned from Java host process, which could be a sign of exploitation (e.g. log4j exploitation)

Known False Positives

  • Legitimate calls to system binaries
  • Company specific internal usage

MITRE ATT&CK Coverage

TacticTechniques
Initial AccessNo specific technique
PersistenceNo specific technique
Privilege EscalationNo specific technique

Telemetry Coverage

Rule Body

title: Shell Process Spawned by Java.EXE
id: dff1e1cc-d3fd-47c8-bfc2-aeb878a754c0
related:
    - id: 0d34ed8b-1c12-4ff2-828c-16fc860b766d
      type: similar
status: test
description: Detects shell spawned from Java host process, which could be a sign of exploitation (e.g. log4j exploitation)
references:
    - https://web.archive.org/web/20231230220738/https://www.lunasec.io/docs/blog/log4j-zero-day/
author: Andreas Hunkeler (@Karneades), Nasreddine Bencherchali
date: 2021-12-17
modified: 2024-01-18
tags:
    - attack.initial-access
    - attack.persistence
    - attack.privilege-escalation
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        ParentImage|endswith: '\java.exe'
        Image|endswith:
            - '\bash.exe'
            - '\cmd.exe'
            - '\powershell.exe'
            - '\pwsh.exe'
    filter_main_build:
        ParentImage|contains: 'build'  # excluding CI build agents
        CommandLine|contains: 'build'  # excluding CI build agents
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Legitimate calls to system binaries
    - Company specific internal usage
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    ParentImage|endswith: '\java.exe'
    Image|endswith:
        - '\bash.exe'
        - '\cmd.exe'
        - '\powershell.exe'
        - '\pwsh.exe'

Stage 2: not filter_main_build

filter_main_build:
    ParentImage|contains: 'build'
    CommandLine|contains: 'build'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \bash.exe corpus 21 (sigma 21)
  • \cmd.exe corpus 132 (sigma 130, splunk 2)
  • \powershell.exe corpus 181 (sigma 180, splunk 1)
  • \pwsh.exe corpus 166 (sigma 166)
field:"Image" kind:ends_with
ParentImageends_with
  • \java.exe corpus 8 (sigma 8)
field:"ParentImage" kind:ends_with value:"\java.exe"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematchbuildexcludes:CommandLine field:"CommandLine" value:"build"
ParentImagematchbuildexcludes:ParentImage field:"ParentImage" value:"build"

SMB Create Remote File Admin Share

#
Status
test
Severity
high
Author
Jose Rodriguez (@Cyb3rPandaH), OTR (Open Threat Research)
Source
github.com/SigmaHQ/sigma

Look for non-system accounts SMB accessing a file with write (0x2) access mask via administrative share (i.e C$).

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: SMB Create Remote File Admin Share
id: b210394c-ba12-4f89-9117-44a2464b9511
status: test
description: Look for non-system accounts SMB accessing a file with write (0x2) access mask via administrative share (i.e C$).
references:
    - https://github.com/OTRF/ThreatHunter-Playbook/blob/f7a58156dbfc9b019f17f638b8c62d22e557d350/playbooks/WIN-201012004336.yaml
    - https://securitydatasets.com/notebooks/atomic/windows/lateral_movement/SDWIN-200806015757.html?highlight=create%20file
author: Jose Rodriguez (@Cyb3rPandaH), OTR (Open Threat Research)
date: 2020-08-06
modified: 2025-10-17
tags:
    - attack.lateral-movement
    - attack.t1021.002
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 5145
        ShareName|endswith: 'C$'
        AccessMask: '0x2'
    filter_main_subjectusername:
        SubjectUserName|endswith: '$'
    filter_optional_local_ip:
        IpAddress: '::1'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection

selection:
    EventID: 5145
    ShareName|endswith: 'C$'
    AccessMask: '0x2'

Stage 2: not filter_main_subjectusername

filter_main_subjectusername:
    SubjectUserName|endswith: '$'

Stage 3: not filter_optional_local_ip

filter_optional_local_ip:
    IpAddress: '::1'

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
SubjectUserNameends_with$excludes:SubjectUserName field:"SubjectUserName" value:"$"
IpAddresseq::1excludes:IpAddress field:"IpAddress" value:"::1"

Special File Creation via Mknod Syscall

#
Status
experimental
Severity
low
Author
Milad Cheraghi
Source
github.com/SigmaHQ/sigma

Detects usage of the mknod syscall to create special files (e.g., character or block devices). Attackers or malware might use mknod to create fake devices, interact with kernel interfaces, or establish covert channels in Linux systems. Monitoring the use of mknod is important because this syscall is rarely used by legitimate applications, and it can be abused to bypass file system restrictions or create backdoors.

Known False Positives

  • Device creation by legitimate scripts or init systems (udevadm, MAKEDEV)
  • Container runtimes or security tools during initialization

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Special File Creation via Mknod Syscall
id: 710bdbce-495d-491d-9a8f-7d0d88d2b41e
status: experimental
description: |
    Detects usage of the `mknod` syscall to create special files (e.g., character or block devices).
    Attackers or malware might use `mknod` to create fake devices, interact with kernel interfaces,
    or establish covert channels in Linux systems.
    Monitoring the use of `mknod` is important because this syscall is rarely used by legitimate applications,
    and it can be abused to bypass file system restrictions or create backdoors.
references:
    - https://man7.org/linux/man-pages/man2/mknod.2.html
    - https://hopeness.medium.com/master-the-linux-mknod-command-a-comprehensive-guide-1c150a546aa8
author: Milad Cheraghi
date: 2025-05-31
modified: 2025-12-05
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1543.003
logsource:
    product: linux
    service: auditd
detection:
    selection:
        type: 'SYSCALL'
        SYSCALL: 'mknod'
    condition: selection
falsepositives:
    - Device creation by legitimate scripts or init systems (udevadm, MAKEDEV)
    - Container runtimes or security tools during initialization
level: low

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    type: 'SYSCALL'
    SYSCALL: 'mknod'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
SYSCALLeq
  • mknod
field:"SYSCALL" kind:eq value:"mknod"
typeeq
  • SYSCALL corpus 27 (splunk 15, sigma 12)
field:"type" kind:eq value:"SYSCALL"

Suspicious GPO Discovery With Get-GPO

#
Status
test
Severity
low
Author
frack113
Source
github.com/SigmaHQ/sigma

Detect use of Get-GPO to get one GPO or all the GPOs in a domain.

Known False Positives

  • Legitimate PowerShell scripts

MITRE ATT&CK Coverage

TacticTechniques
Discovery

Telemetry Coverage

Rule Body

title: Suspicious GPO Discovery With Get-GPO
id: eb2fd349-ec67-4caa-9143-d79c7fb34441
status: test
description: Detect use of Get-GPO to get one GPO or all the GPOs in a domain.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1615/T1615.md
    - https://learn.microsoft.com/en-us/powershell/module/grouppolicy/get-gpo?view=windowsserver2022-ps
author: frack113
date: 2022-06-04
tags:
    - attack.discovery
    - attack.t1615
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains: Get-GPO
    condition: selection
falsepositives:
    - Legitimate PowerShell scripts
level: low

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    ScriptBlockText|contains: Get-GPO

Indicators

These rows show field, operator, and value matches.

Suspicious MsiExec Embedding Parent

#
Status
test
Severity
medium
Author
frack113
Source
github.com/SigmaHQ/sigma

Adversaries may abuse msiexec.exe to proxy the execution of malicious payloads

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Suspicious MsiExec Embedding Parent
id: 4a2a2c3e-209f-4d01-b513-4155a540b469
status: test
description: Adversaries may abuse msiexec.exe to proxy the execution of malicious payloads
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1218.007/T1218.007.md
author: frack113
date: 2022-04-16
modified: 2022-07-14
tags:
    - attack.stealth
    - attack.t1218.007
logsource:
    product: windows
    category: process_creation
detection:
    selection:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\cmd.exe'
        ParentCommandLine|contains|all:
            - 'MsiExec.exe'
            - '-Embedding '
    filter_splunk_ufw:
        Image|endswith: ':\Windows\System32\cmd.exe'
        CommandLine|contains: 'C:\Program Files\SplunkUniversalForwarder\bin\'
    filter_vs:
        - CommandLine|contains: '\DismFoDInstall.cmd'
        - ParentCommandLine|contains|all:
              - '\MsiExec.exe -Embedding '
              - 'Global\MSI0000'
    condition: selection and not 1 of filter*
falsepositives:
    - Unknown
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_msiexec_embedding/info.yml

Stages and Predicates

Stage 0: condition

selection and not 1 of filter*

Stage 1: selection

selection:
    Image|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'
        - '\cmd.exe'
    ParentCommandLine|contains|all:
        - 'MsiExec.exe'
        - '-Embedding '

Stage 2: not filter*

filter_splunk_ufw:
    Image|endswith: ':\Windows\System32\cmd.exe'
    CommandLine|contains: 'C:\Program Files\SplunkUniversalForwarder\bin\'
filter_vs:
    - CommandLine|contains: '\DismFoDInstall.cmd'
    - ParentCommandLine|contains|all:
          - '\MsiExec.exe -Embedding '
          - 'Global\MSI0000'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \cmd.exe corpus 132 (sigma 130, splunk 2)
  • \powershell.exe corpus 181 (sigma 180, splunk 1)
  • \pwsh.exe corpus 166 (sigma 166)
field:"Image" kind:ends_with
ParentCommandLinematch
  • -Embedding
  • MsiExec.exe
field:"ParentCommandLine" kind:match

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematchC:\Program Files\SplunkUniversalForwarder\bin\excludes:CommandLine field:"CommandLine" value:"C:\Program Files\SplunkUniversalForwarder\bin\"
Imageends_with:\Windows\System32\cmd.exeexcludes:Image field:"Image" value:":\Windows\System32\cmd.exe"
ParentCommandLinematchGlobal\MSI0000excludes:ParentCommandLine field:"ParentCommandLine" value:"Global\MSI0000"
ParentCommandLinematch\MsiExec.exe -Embedding excludes:ParentCommandLine field:"ParentCommandLine" value:"\MsiExec.exe -Embedding "
CommandLinematch\DismFoDInstall.cmdexcludes:CommandLine field:"CommandLine" value:"\DismFoDInstall.cmd"

Suspicious SPN enumeration previous to Kerberoasting attack (PowerShell)

#
Status
experimental
Severity
high
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker attempts to retrieve SPN using PowerShell and native tools.

Known False Positives

  • Administrators

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Suspicious SPN enumeration previous to Kerberoasting attack (PowerShell)
description: Detects scenarios where an attacker attempts to retrieve SPN using PowerShell and native tools.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0007-Discovery/T1087-Account%20discovery
- https://github.com/nidem/kerberoast
- https://github.com/cyberark/RiskySPN
- https://pentestlab.blog/2018/06/04/spn-discovery/
- https://adsecurity.org/?p=3458
- https://redcanary.com/blog/marshmallows-and-kerberoasting/
- https://www.security.com/threat-intelligence/us-china-espionage
tags:
- attack.account_discovery
- attack.t1087.002
- attack.credential_access
- attack.t1558.003
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category:
    - ps_module
    - ps_classic_script
    - ps_script
detection:
  selection1_powershell_native:
    EventID: 800
    EventData|contains:
      - 'System.IdentityModel.Tokens.KerberosRequestorSecurityToken'
      - 'Add-Type -AssemblyName System.IdentityModel'

  selection2_powershell_modern:
    EventID: 4103
    Payload|contains:
      - 'System.IdentityModel.Tokens.KerberosRequestorSecurityToken'
      - 'Add-Type -AssemblyName System.IdentityModel'

  selection3_powershell_block:
    EventID: 4104
    ScriptBlockText|contains:
      - 'System.IdentityModel.Tokens.KerberosRequestorSecurityToken'
      - 'Add-Type -AssemblyName System.IdentityModel'

  condition: 1 of selection*
falsepositives:
- Administrators
level: high

Stages and Predicates

Stage 0: condition

1 of selection*

Stage 1: selection1_powershell_native

selection1_powershell_native:
  EventID: 800
  EventData|contains:
    - 'System.IdentityModel.Tokens.KerberosRequestorSecurityToken'
    - 'Add-Type -AssemblyName System.IdentityModel'

Stage 2: selection2_powershell_modern

selection2_powershell_modern:
  EventID: 4103
  Payload|contains:
    - 'System.IdentityModel.Tokens.KerberosRequestorSecurityToken'
    - 'Add-Type -AssemblyName System.IdentityModel'

Stage 3: selection3_powershell_block

selection3_powershell_block:
  EventID: 4104
  ScriptBlockText|contains:
    - 'System.IdentityModel.Tokens.KerberosRequestorSecurityToken'
    - 'Add-Type -AssemblyName System.IdentityModel'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventDatamatch
  • Add-Type -AssemblyName System.IdentityModel
  • System.IdentityModel.Tokens.KerberosRequestorSecurityToken
field:"EventData" kind:match
Payloadmatch
  • Add-Type -AssemblyName System.IdentityModel
  • System.IdentityModel.Tokens.KerberosRequestorSecurityToken
field:"Payload" kind:match
ScriptBlockTextmatch
  • Add-Type -AssemblyName System.IdentityModel
  • System.IdentityModel.Tokens.KerberosRequestorSecurityToken corpus 2 (sigma 2)
field:"ScriptBlockText" kind:match

Tomcat WebServer Logs Deleted

#
Status
test
Severity
medium
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the deletion of tomcat WebServer logs which may indicate an attempt to destroy forensic evidence

Known False Positives

  • During uninstallation of the tomcat server
  • During log rotation

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Telemetry Coverage

Rule Body

title: Tomcat WebServer Logs Deleted
id: 270185ff-5f50-4d6d-a27f-24c3b8c9fef8
status: test
description: Detects the deletion of tomcat WebServer logs which may indicate an attempt to destroy forensic evidence
references:
    - Internal Research
    - https://linuxhint.com/view-tomcat-logs-windows/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-02-16
tags:
    - attack.stealth
    - attack.t1070
logsource:
    category: file_delete
    product: windows
detection:
    selection:
        TargetFilename|contains|all:
            - '\Tomcat'
            - '\logs\'
        TargetFilename|contains:
            - 'catalina.'
            - '_access_log.'
            - 'localhost.'
    condition: selection
falsepositives:
    - During uninstallation of the tomcat server
    - During log rotation
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    TargetFilename|contains|all:
        - '\Tomcat'
        - '\logs\'
    TargetFilename|contains:
        - 'catalina.'
        - '_access_log.'
        - 'localhost.'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
TargetFilenamematch
  • \Tomcat corpus 2 (sigma 2)
  • \logs\
  • _access_log.
  • catalina.
  • localhost.
field:"TargetFilename" kind:match

Too Many Global Admins

#
Status
test
Severity
high
Author
Mark Morowczynski '@markmorow', Gloria Lee, '@gleeiamglo'
Source
github.com/SigmaHQ/sigma

Identifies an event where there are there are too many accounts assigned the Global Administrator role.

Known False Positives

  • Investigate if threshold setting in PIM is too low.

MITRE ATT&CK Coverage

TacticTechniques
Initial Access
Persistence
Privilege Escalation
Stealth

Rule Body

title: Too Many Global Admins
id: 7bbc309f-e2b1-4eb1-8369-131a367d67d3
status: test
description: Identifies an event where there are there are too many accounts assigned the Global Administrator role.
references:
    - https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/pim-how-to-configure-security-alerts#there-are-too-many-global-administrators
author: Mark Morowczynski '@markmorow', Gloria Lee, '@gleeiamglo'
date: 2023-09-14
tags:
    - attack.initial-access
    - attack.stealth
    - attack.t1078
    - attack.persistence
    - attack.privilege-escalation
logsource:
    product: azure
    service: pim
detection:
    selection:
        riskEventType: 'tooManyGlobalAdminsAssignedToTenantAlertIncident'
    condition: selection
falsepositives:
    - Investigate if threshold setting in PIM is too low.
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    riskEventType: 'tooManyGlobalAdminsAssignedToTenantAlertIncident'

Indicators

These rows show field, operator, and value matches.

Windows Backup Deleted Via Wbadmin.EXE

#
Status
test
Severity
medium
Author
frack113, Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the deletion of backups or system state backups via "wbadmin.exe". This technique is used by numerous ransomware families and actors. This may only be successful on server platforms that have Windows Backup enabled.

Known False Positives

  • Legitimate backup activity from administration scripts and software.

MITRE ATT&CK Coverage

TacticTechniques
Impact

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Windows Backup Deleted Via Wbadmin.EXE
id: 89f75308-5b1b-4390-b2d8-d6b2340efaf8
related:
    - id: 639c9081-f482-47d3-a0bd-ddee3d4ecd76
      type: derived
status: test
description: |
    Detects the deletion of backups or system state backups via "wbadmin.exe".
    This technique is used by numerous ransomware families and actors.
    This may only be successful on server platforms that have Windows Backup enabled.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1490/T1490.md#atomic-test-5---windows---delete-volume-shadow-copies-via-wmi-with-powershell
    - https://github.com/albertzsigovits/malware-notes/blob/558898932c1579ff589290092a2c8febefc3a4c9/Ransomware/Lockbit.md
    - https://www.sentinelone.com/labs/ranzy-ransomware-better-encryption-among-new-features-of-thunderx-derivative/
    - https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/ransomware-report-avaddon-and-new-techniques-emerge-industrial-sector-targeted
    - https://www.trendmicro.com/content/dam/trendmicro/global/en/research/24/b/lockbit-attempts-to-stay-afloat-with-a-new-version/technical-appendix-lockbit-ng-dev-analysis.pdf
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/wbadmin-delete-systemstatebackup
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2021-12-13
modified: 2024-05-10
tags:
    - attack.impact
    - attack.t1490
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\wbadmin.exe'
        - OriginalFileName: 'WBADMIN.EXE'
    selection_cli:
        CommandLine|contains|all:
            - 'delete '
            - 'backup' # Also covers "SYSTEMSTATEBACKUP"
    filter_main_keep_versions:
        # Note: We exclude this to avoid duplicate alerts with 639c9081-f482-47d3-a0bd-ddee3d4ecd76
        CommandLine|contains: 'keepVersions:0'
    condition: all of selection_* and not 1 of filter_main_*
falsepositives:
    - Legitimate backup activity from administration scripts and software.
level: medium

Stages and Predicates

Stage 0: condition

all of selection_* and not 1 of filter_main_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\wbadmin.exe'
    - OriginalFileName: 'WBADMIN.EXE'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - 'delete '
        - 'backup'

Stage 3: not filter_main_keep_versions

filter_main_keep_versions:
    CommandLine|contains: 'keepVersions:0'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • backup corpus 6 (sigma 5, splunk 1)
  • delete corpus 4 (sigma 4)
field:"CommandLine" kind:match
Imageends_with
  • \wbadmin.exe corpus 7 (sigma 7)
field:"Image" kind:ends_with value:"\wbadmin.exe"
OriginalFileNameeq
  • WBADMIN.EXE corpus 16 (elastic 8, sigma 6, splunk 2)
field:"OriginalFileName" kind:eq value:"WBADMIN.EXE"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematchkeepVersions:0excludes:CommandLine field:"CommandLine" value:"keepVersions:0"

Windows Mail App Mailbox Access Via PowerShell Script

#
Status
test
Severity
medium
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects PowerShell scripts that try to access the default Windows MailApp MailBox. This indicates manipulation of or access to the stored emails of a user. E.g. this could be used by an attacker to exfiltrate or delete the content of the emails.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Windows Mail App Mailbox Access Via PowerShell Script
id: 4e485d01-e18a-43f6-a46b-ef20496fa9d3
status: test
description: Detects PowerShell scripts that try to access the default Windows MailApp MailBox. This indicates manipulation of or access to the stored emails of a user. E.g. this could be used by an attacker to exfiltrate or delete the content of the emails.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/02cb591f75064ffe1e0df9ac3ed5972a2e491c97/atomics/T1070.008/T1070.008.md
author: frack113
date: 2023-07-08
tags:
    - attack.stealth
    - attack.t1070.008
    - detection.threat-hunting
logsource:
    product: windows
    category: ps_script
    definition: bade5735-5ab0-4aa7-a642-a11be0e40872
detection:
    selection:
        ScriptBlockText|contains: '\Comms\Unistore\data'
    condition: selection
falsepositives:
    - Unknown
level: medium
regression_tests_path: regression_data/rules-threat-hunting/windows/powershell/powershell_script/posh_ps_mailbox_access/info.yml

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    ScriptBlockText|contains: '\Comms\Unistore\data'

Indicators

These rows show field, operator, and value matches.

WMI Persistence

#
Status
test
Severity
medium
Author
Florian Roth (Nextron Systems), Gleb Sukhodolskiy, Timur Zinniatullin oscd.community
Source
github.com/SigmaHQ/sigma

Detects suspicious WMI event filter and command line event consumer based on WMI and Security Logs.

Known False Positives

  • Unknown (data set is too small; further testing needed)

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: WMI Persistence
id: 0b7889b4-5577-4521-a60a-3376ee7f9f7b
status: test
description: Detects suspicious WMI event filter and command line event consumer based on WMI and Security Logs.
references:
    - https://twitter.com/mattifestation/status/899646620148539397
    - https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/
author: Florian Roth (Nextron Systems), Gleb Sukhodolskiy, Timur Zinniatullin oscd.community
date: 2017-08-22
modified: 2022-02-10
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1546.003
logsource:
    product: windows
    service: wmi
    definition: 'WMI Namespaces Auditing and SACL should be configured, EventID 5861 and 5859 detection requires Windows 10, 2012 and higher'
detection:
    wmi_filter_to_consumer_binding:
        EventID: 5861
    consumer_keywords:
        - 'ActiveScriptEventConsumer'
        - 'CommandLineEventConsumer'
        - 'CommandLineTemplate'
        # - 'Binding EventFilter'  # too many false positive with HP Health Driver
    wmi_filter_registration:
        EventID: 5859
    filter_scmevent:
        Provider: 'SCM Event Provider'
        Query: 'select * from MSFT_SCMEventLogEvent'
        User: 'S-1-5-32-544'
        PossibleCause: 'Permanent'
    condition: ( (wmi_filter_to_consumer_binding and consumer_keywords) or (wmi_filter_registration) ) and not filter_scmevent
falsepositives:
    - Unknown (data set is too small; further testing needed)
level: medium

Stages and Predicates

Stage 0: condition

( (wmi_filter_to_consumer_binding and consumer_keywords) or (wmi_filter_registration) ) and not filter_scmevent

Stage 1: wmi_filter_to_consumer_binding

wmi_filter_to_consumer_binding:
    EventID: 5861

Stage 2: consumer_keywords

consumer_keywords:
    - 'ActiveScriptEventConsumer'
    - 'CommandLineEventConsumer'
    - 'CommandLineTemplate'

Stage 3: wmi_filter_registration

wmi_filter_registration:
    EventID: 5859

Stage 4: not filter_scmevent

filter_scmevent:
    Provider: 'SCM Event Provider'
    Query: 'select * from MSFT_SCMEventLogEvent'
    User: 'S-1-5-32-544'
    PossibleCause: 'Permanent'

Exclusions

The rule actively suppresses these predicates.

Back to all Sigma rules