Detection rules › Sigma

Sigma rules: 2o

Bitbucket User Login Failure Via SSH

#
Status
test
Severity
medium
Author
Muhammad Faisal (@faisalusuf)
Source
github.com/SigmaHQ/sigma

Detects SSH user login access failures. Please note that this rule can be noisy and is recommended to use with correlation based on "author.name" field.

Known False Positives

  • Legitimate user wrong password attempts.

MITRE ATT&CK Coverage

TacticTechniques
Credential Access
Lateral Movement

Rule Body

title: Bitbucket User Login Failure Via SSH
id: d3f90469-fb05-42ce-b67d-0fded91bbef3
status: test
description: |
    Detects SSH user login access failures.
    Please note that this rule can be noisy and is recommended to use with correlation based on "author.name" field.
references:
    - https://confluence.atlassian.com/bitbucketserver/view-and-configure-the-audit-log-776640417.html
    - https://confluence.atlassian.com/bitbucketserver/enable-ssh-access-to-git-repositories-776640358.html
author: Muhammad Faisal (@faisalusuf)
date: 2024-02-25
tags:
    - attack.lateral-movement
    - attack.credential-access
    - attack.t1021.004
    - attack.t1110
logsource:
    product: bitbucket
    service: audit
    definition: 'Requirements: "Advance" log level is required to receive these audit events.'
detection:
    selection:
        auditType.category: 'Authentication'
        auditType.action: 'User login failed(SSH)'
    condition: selection
falsepositives:
    - Legitimate user wrong password attempts.
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    auditType.category: 'Authentication'
    auditType.action: 'User login failed(SSH)'

Indicators

These rows show field, operator, and value matches.

Change to Authentication Method

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

Change to authentication method could be an indicator of an attacker adding an auth method to the account so they can have continued access.

MITRE ATT&CK Coverage

Telemetry Coverage

PlatformRecord / event type
AzureUser registered security info

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

title: Change to Authentication Method
id: 4d78a000-ab52-4564-88a5-7ab5242b20c7
status: test
description: Change to authentication method could be an indicator of an attacker adding an auth method to the account so they can have continued access.
references:
    - https://learn.microsoft.com/en-us/entra/architecture/security-operations-privileged-accounts
author: AlertIQ
date: 2021-10-10
modified: 2022-12-25
tags:
    - attack.privilege-escalation
    - attack.credential-access
    - attack.defense-impairment
    - attack.t1556
    - attack.persistence
    - attack.t1098
logsource:
    product: azure
    service: auditlogs
detection:
    selection:
        LoggedByService: 'Authentication Methods'
        Category: 'UserManagement'
        OperationName: 'User registered security info'
    condition: selection
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    LoggedByService: 'Authentication Methods'
    Category: 'UserManagement'
    OperationName: 'User registered security info'

Indicators

These rows show field, operator, and value matches.

CodePage Modification Via MODE.COM

#
Status
test
Severity
low
Author
Nasreddine Bencherchali (Nextron Systems), Joseliyo Sanchez, @Joseliyo_Jstnk
Source
github.com/SigmaHQ/sigma

Detects a CodePage modification using the "mode.com" utility. This behavior has been used by threat actors behind Dharma ransomware.

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: CodePage Modification Via MODE.COM
id: d48c5ffa-3b02-4c0f-9a9e-3c275650dd0e
related:
    - id: 12fbff88-16b5-4b42-9754-cd001a789fb3
      type: derived
status: test
description: |
    Detects a CodePage modification using the "mode.com" utility.
    This behavior has been used by threat actors behind Dharma ransomware.
references:
    - https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/mode
    - https://strontic.github.io/xcyclopedia/library/mode.com-59D1ED51ACB8C3D50F1306FD75F20E99.html
    - https://www.virustotal.com/gui/file/5e75ef02517afd6e8ba6462b19217dc4a5a574abb33d10eb0f2bab49d8d48c22/behavior
author: Nasreddine Bencherchali (Nextron Systems), Joseliyo Sanchez, @Joseliyo_Jstnk
date: 2024-01-19
tags:
    - attack.stealth
    - attack.t1036
    - detection.threat-hunting
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\mode.com'
        - OriginalFileName: 'MODE.COM'
    selection_cli:
        CommandLine|contains|all:
            - ' con '
            - ' cp '
            - ' select='
    condition: all of selection_*
falsepositives:
    - Unknown
level: low

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\mode.com'
    - OriginalFileName: 'MODE.COM'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - ' con '
        - ' cp '
        - ' select='

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • con corpus 2 (sigma 2)
  • cp corpus 7 (sigma 6, elastic 1)
  • select= corpus 2 (sigma 2)
field:"CommandLine" kind:match
Imageends_with
  • \mode.com corpus 2 (sigma 2)
field:"Image" kind:ends_with value:"\mode.com"
OriginalFileNameeq
  • MODE.COM corpus 2 (sigma 2)
field:"OriginalFileName" kind:eq value:"MODE.COM"

Executable from Webdav

#
Status
test
Severity
medium
Author
SOC Prime, Adam Swan
Source
github.com/SigmaHQ/sigma

Detects executable access via webdav6. Can be seen in APT 29 such as from the emulated APT 29 hackathon https://github.com/OTRF/detection-hackathon-apt29/

MITRE ATT&CK Coverage

TacticTechniques
Command & Control

Rule Body

title: Executable from Webdav
id: aac2fd97-bcba-491b-ad66-a6edf89c71bf
status: test
description: 'Detects executable access via webdav6. Can be seen in APT 29 such as from the emulated APT 29 hackathon https://github.com/OTRF/detection-hackathon-apt29/'
references:
    - http://carnal0wnage.attackresearch.com/2012/06/webdav-server-to-download-custom.html
    - https://github.com/OTRF/detection-hackathon-apt29
author: 'SOC Prime, Adam Swan'
date: 2020-05-01
modified: 2021-11-27
tags:
    - attack.command-and-control
    - attack.t1105
logsource:
    product: zeek
    service: http
detection:
    selection_webdav:
        - c-useragent|contains: 'WebDAV'
        - c-uri|contains: 'webdav'
    selection_executable:
        - resp_mime_types|contains: 'dosexec'
        - c-uri|endswith: '.exe'
    condition: selection_webdav and selection_executable
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection_webdav and selection_executable

Stage 1: selection_webdav

selection_webdav:
    - c-useragent|contains: 'WebDAV'
    - c-uri|contains: 'webdav'

Stage 2: selection_executable

selection_executable:
    - resp_mime_types|contains: 'dosexec'
    - c-uri|endswith: '.exe'

Indicators

These rows show field, operator, and value matches.

File with high volume downloaded via BITS

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

Detects scenarios where an attacker downloads a payload by abusing BITS software. For more precise information, inspect "Bits-client" event log and search for ID 59 and 60.

Known False Positives

  • Microsoft updates, WSL ISO download

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: File with high volume downloaded via BITS
description: Detects scenarios where an attacker downloads a payload by abusing BITS software. For more precise information, inspect "Bits-client" event log and search for ID 59 and 60.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0003-Persistence/T1197-BITS%20jobs
- https://medium.com/@threathuntingteam/background-intelligent-transfer-protocol-ab81cd900aa7
- https://docs.microsoft.com/en-us/windows/win32/bits/bitsadmin-tool
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-examples
- https://attack.mitre.org/software/S0190/
- https://www.microsoft.com/security/blog/2019/12/12/multi-stage-downloader-trojan-sload-abuses-bits-almost-exclusively-for-malicious-activities/
- https://medium.com/@threathuntingteam/background-intelligent-transfer-protocol-ab81cd900aa7
- https://www.hackingarticles.in/windows-for-pentester-bitsadmin/
tags:
- attack.exfiltration
- attack.t1048 # Exfiltration Over Alternative Protocol
- attack.lateral_movement
- attack.t1570 # Lateral Tool Transfer
- attack.Command_and_control
- attack.t1105 # Ingress Tool Transfer
- attack.persistence
- attack.t1197 # Bits jobs
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  service: bits
detection:
  selection_baseline:
    EventID: 60   # BITS Task stopped
    hr: 0         # Indicate download completed successfully
  selection_size: # Size is provided in Bytes (524288000 =~ 500Mb)
    - fileLength >= 524288000
    - bytesTotal >= 524288000
  condition: selection_baseline and selection_size
falsepositives:
- Microsoft updates, WSL ISO download
level: medium

Stages and Predicates

Stage 0: condition

selection_baseline and selection_size

Stage 1: selection_baseline

selection_baseline:
  EventID: 60
  hr: 0

Stage 2: selection_size

selection_size:
  - fileLength >= 524288000
  - bytesTotal >= 524288000

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
hreq
  • 0
field:"hr" kind:eq value:"0"

HackTool - HandleKatz Duplicating LSASS Handle

#
Status
test
Severity
high
Author
Bhabesh Raj (rule), @thefLinkk
Source
github.com/SigmaHQ/sigma

Detects HandleKatz opening LSASS to duplicate its handle to later dump the memory without opening any new handles

MITRE ATT&CK Coverage

TacticTechniques
Execution
Credential Access

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 10: ProcessAccess

Rule Body

title: HackTool - HandleKatz Duplicating LSASS Handle
id: b1bd3a59-c1fd-4860-9f40-4dd161a7d1f5
status: test
description: Detects HandleKatz opening LSASS to duplicate its handle to later dump the memory without opening any new handles
references:
    - https://github.com/codewhitesec/HandleKatz
author: Bhabesh Raj (rule), @thefLinkk
date: 2022-06-27
modified: 2023-11-28
tags:
    - attack.execution
    - attack.t1106
    - attack.t1003.001
    - attack.credential-access
logsource:
    category: process_access
    product: windows
detection:
    selection:
        TargetImage|endswith: '\lsass.exe' # Theoretically, can be any benign process holding handle to LSASS
        GrantedAccess: '0x1440' # Only PROCESS_DUP_HANDLE, PROCESS_QUERY_LIMITED_INFORMATION, PROCESS_QUERY_INFORMATION
        # Example: C:\Windows\SYSTEM32\ntdll.dll+9d234\|UNKNOWN(00000000001C119B)
        CallTrace|startswith: 'C:\Windows\System32\ntdll.dll+'
        CallTrace|contains: '|UNKNOWN('
        CallTrace|endswith: ')'
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    TargetImage|endswith: '\lsass.exe'
    GrantedAccess: '0x1440'
    CallTrace|startswith: 'C:\Windows\System32\ntdll.dll+'
    CallTrace|contains: '|UNKNOWN('
    CallTrace|endswith: ')'

Indicators

These rows show field, operator, and value matches.

HackTool - PCHunter Execution

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

Detects suspicious use of PCHunter, a tool like Process Hacker to view and manipulate processes, kernel options and other low level stuff

Known False Positives

  • Unlikely

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: HackTool - PCHunter Execution
id: fca949cc-79ca-446e-8064-01aa7e52ece5
status: test
description: Detects suspicious use of PCHunter, a tool like Process Hacker to view and manipulate processes, kernel options and other low level stuff
references:
    - https://web.archive.org/web/20231210115125/http://www.xuetr.com/
    - https://www.crowdstrike.com/blog/falcon-overwatch-report-finds-increase-in-ecrime/
    - https://www.hexacorn.com/blog/2018/04/20/kernel-hacking-tool-you-might-have-never-heard-of-xuetr-pchunter/
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali
date: 2022-10-10
modified: 2024-11-23
tags:
    - attack.execution
    - attack.discovery
    - attack.t1082
    - attack.t1057
    - attack.t1012
    - attack.t1083
    - attack.t1007
logsource:
    category: process_creation
    product: windows
detection:
    selection_image:
        Image|endswith:
            - '\PCHunter64.exe'
            - '\PCHunter32.exe'
    selection_pe:
        - OriginalFileName: 'PCHunter.exe'
        - Description: 'Epoolsoft Windows Information View Tools'
    selection_hashes:
        Hashes|contains:
            - 'SHA1=5F1CBC3D99558307BC1250D084FA968521482025'
            - 'MD5=987B65CD9B9F4E9A1AFD8F8B48CF64A7'
            - 'SHA256=2B214BDDAAB130C274DE6204AF6DBA5AEEC7433DA99AA950022FA306421A6D32'
            - 'IMPHASH=444D210CEA1FF8112F256A4997EED7FF'
            - 'SHA1=3FB89787CB97D902780DA080545584D97FB1C2EB'
            - 'MD5=228DD0C2E6287547E26FFBD973A40F14'
            - 'SHA256=55F041BF4E78E9BFA6D4EE68BE40E496CE3A1353E1CA4306598589E19802522C'
            - 'IMPHASH=0479F44DF47CFA2EF1CCC4416A538663'
    condition: 1 of selection_*
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

1 of selection_*

Stage 1: selection_image

selection_image:
    Image|endswith:
        - '\PCHunter64.exe'
        - '\PCHunter32.exe'

Stage 2: selection_pe

selection_pe:
    - OriginalFileName: 'PCHunter.exe'
    - Description: 'Epoolsoft Windows Information View Tools'

Stage 3: selection_hashes

selection_hashes:
    Hashes|contains:
        - 'SHA1=5F1CBC3D99558307BC1250D084FA968521482025'
        - 'MD5=987B65CD9B9F4E9A1AFD8F8B48CF64A7'
        - 'SHA256=2B214BDDAAB130C274DE6204AF6DBA5AEEC7433DA99AA950022FA306421A6D32'
        - 'IMPHASH=444D210CEA1FF8112F256A4997EED7FF'
        - 'SHA1=3FB89787CB97D902780DA080545584D97FB1C2EB'
        - 'MD5=228DD0C2E6287547E26FFBD973A40F14'
        - 'SHA256=55F041BF4E78E9BFA6D4EE68BE40E496CE3A1353E1CA4306598589E19802522C'
        - 'IMPHASH=0479F44DF47CFA2EF1CCC4416A538663'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Descriptioneq
  • Epoolsoft Windows Information View Tools
field:"Description" kind:eq value:"Epoolsoft Windows Information View Tools"
Hashesmatch
  • IMPHASH=0479F44DF47CFA2EF1CCC4416A538663
  • IMPHASH=444D210CEA1FF8112F256A4997EED7FF
  • MD5=228DD0C2E6287547E26FFBD973A40F14
  • MD5=987B65CD9B9F4E9A1AFD8F8B48CF64A7
  • SHA1=3FB89787CB97D902780DA080545584D97FB1C2EB
  • SHA1=5F1CBC3D99558307BC1250D084FA968521482025
  • SHA256=2B214BDDAAB130C274DE6204AF6DBA5AEEC7433DA99AA950022FA306421A6D32
  • SHA256=55F041BF4E78E9BFA6D4EE68BE40E496CE3A1353E1CA4306598589E19802522C
field:"Hashes" kind:match
Imageends_with
  • \PCHunter32.exe
  • \PCHunter64.exe
field:"Image" kind:ends_with
OriginalFileNameeq
  • PCHunter.exe
field:"OriginalFileName" kind:eq value:"PCHunter.exe"

HackTool - Sliver C2 Implant Activity Pattern

#
Status
test
Severity
critical
Author
Nasreddine Bencherchali (Nextron Systems), Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects process activity patterns as seen being used by Sliver C2 framework implants

Known False Positives

  • Unlikely

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: HackTool - Sliver C2 Implant Activity Pattern
id: 42333b2c-b425-441c-b70e-99404a17170f
status: test
description: Detects process activity patterns as seen being used by Sliver C2 framework implants
references:
    - https://github.com/BishopFox/sliver/blob/79f2d48fcdfc2bee4713b78d431ea4b27f733f30/implant/sliver/shell/shell_windows.go#L36
    - https://www.microsoft.com/security/blog/2022/08/24/looking-for-the-sliver-lining-hunting-for-emerging-command-and-control-frameworks/
author: Nasreddine Bencherchali (Nextron Systems), Florian Roth (Nextron Systems)
date: 2022-08-25
modified: 2023-03-05
tags:
    - attack.execution
    - attack.t1059
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains: '-NoExit -Command [Console]::OutputEncoding=[Text.UTF8Encoding]::UTF8'
    condition: selection
falsepositives:
    - Unlikely
level: critical

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    CommandLine|contains: '-NoExit -Command [Console]::OutputEncoding=[Text.UTF8Encoding]::UTF8'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -NoExit -Command [Console]::OutputEncoding=[Text.UTF8Encoding]::UTF8
field:"CommandLine" kind:match value:"-NoExit -Command [Console]::OutputEncoding=[Text.UTF8Encoding]::UTF8"

Interesting Service Enumeration Via Sc.EXE

#
Status
test
Severity
low
Author
Swachchhanda Shrawan Poudel
Source
github.com/SigmaHQ/sigma

Detects the enumeration and query of interesting and in some cases sensitive services on the system via "sc.exe". Attackers often try to enumerate the services currently running on a system in order to find different attack vectors.

MITRE ATT&CK Coverage

TacticTechniques
Credential Access

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Interesting Service Enumeration Via Sc.EXE
id: e83e8899-c9b2-483b-b355-5decc942b959
status: test
description: |
    Detects the enumeration and query of interesting and in some cases sensitive services on the system via "sc.exe".
    Attackers often try to enumerate the services currently running on a system in order to find different attack vectors.
references:
    - https://www.n00py.io/2021/05/dumping-plaintext-rdp-credentials-from-svchost-exe/
    - https://pentestlab.blog/tag/svchost/
author: Swachchhanda Shrawan Poudel
date: 2024-02-12
tags:
    - attack.t1003
    - attack.credential-access
logsource:
    product: windows
    category: process_creation
detection:
    selection_img:
        - Image|endswith: '\sc.exe'
        - OriginalFileName: 'sc.exe'
    selection_cli:
        CommandLine|contains: 'query'
    selection_cmd:
        # Note: add more interesting services
        CommandLine|contains: 'termservice'
    condition: all of selection_*
falsepositives:
    - Unknown
# Note: can be upgraded to medium after an initial baseline
level: low

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

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

Stage 2: selection_cli

selection_cli:
    CommandLine|contains: 'query'

Stage 3: selection_cmd

selection_cmd:
    CommandLine|contains: 'termservice'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • query corpus 8 (sigma 7, splunk 1)
  • termservice
field:"CommandLine" kind:match
Imageends_with
  • \sc.exe corpus 30 (sigma 30)
field:"Image" kind:ends_with value:"\sc.exe"
OriginalFileNameeq
  • sc.exe corpus 28 (sigma 12, splunk 10, elastic 6)
field:"OriginalFileName" kind:eq value:"sc.exe"

Invoke-Obfuscation COMPRESS OBFUSCATION - PowerShell Module

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

Detects Obfuscated Powershell via COMPRESS OBFUSCATION

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Invoke-Obfuscation COMPRESS OBFUSCATION - PowerShell Module
id: 7034cbbb-cc55-4dc2-8dad-36c0b942e8f1
related:
    - id: 20e5497e-331c-4cd5-8d36-935f6e2a9a07
      type: derived
status: test
description: Detects Obfuscated Powershell via COMPRESS OBFUSCATION
references:
    - https://github.com/SigmaHQ/sigma/issues/1009 # (Task 19)
author: Timur Zinniatullin, oscd.community
date: 2020-10-18
modified: 2022-11-29
tags:
    - attack.stealth
    - attack.t1027
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_module
    definition: 0ad03ef1-f21b-4a79-8ce8-e6900c54b65b
detection:
    selection_4103:
        Payload|contains|all:
            - 'new-object'
            - 'text.encoding]::ascii'
        Payload|contains:
            - 'system.io.compression.deflatestream'
            - 'system.io.streamreader'
        Payload|endswith: 'readtoend'
    condition: selection_4103
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection_4103

Stage 1: selection_4103

selection_4103:
    Payload|contains|all:
        - 'new-object'
        - 'text.encoding]::ascii'
    Payload|contains:
        - 'system.io.compression.deflatestream'
        - 'system.io.streamreader'
    Payload|endswith: 'readtoend'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Payloadends_with
  • readtoend
field:"Payload" kind:ends_with value:"readtoend"
Payloadmatch
  • new-object
  • system.io.compression.deflatestream
  • system.io.streamreader
  • text.encoding]::ascii
field:"Payload" kind:match

JexBoss Command Sequence

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

Detects suspicious command sequence that JexBoss

MITRE ATT&CK Coverage

Rule Body

title: JexBoss Command Sequence
id: 8ec2c8b4-557a-4121-b87c-5dfb3a602fae
status: test
description: Detects suspicious command sequence that JexBoss
references:
    - https://www.us-cert.gov/ncas/analysis-reports/AR18-312A
author: Florian Roth (Nextron Systems)
date: 2017-08-24
modified: 2025-11-22
tags:
    - attack.execution
    - attack.t1059.004
logsource:
    product: linux
detection:
    keywords:
        '|all':
            - 'bash -c /bin/bash'
            - '&/dev/tcp/'
    condition: keywords
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

keywords

Stage 1: keywords

keywords:
    '|all':
        - 'bash -c /bin/bash'
        - '&/dev/tcp/'

Lolbin Unregmp2.exe Use As Proxy

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

Detect usage of the "unregmp2.exe" binary as a proxy to launch a custom version of "wmpnscfg.exe"

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: Lolbin Unregmp2.exe Use As Proxy
id: 727454c0-d851-48b0-8b89-385611ab0704
status: test
description: Detect usage of the "unregmp2.exe" binary as a proxy to launch a custom version of "wmpnscfg.exe"
references:
    - https://lolbas-project.github.io/lolbas/Binaries/Unregmp2/
author: frack113
date: 2022-12-29
modified: 2024-06-04
tags:
    - attack.stealth
    - attack.t1218
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\unregmp2.exe'
        - OriginalFileName: 'unregmp2.exe'
    selection_cmd:
        CommandLine|contains|windash: ' /HideWMP'
    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: '\unregmp2.exe'
    - OriginalFileName: 'unregmp2.exe'

Stage 2: selection_cmd

selection_cmd:
    CommandLine|contains|windash: ' /HideWMP'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -HideWMP
  • /HideWMP
  • –HideWMP
  • —HideWMP
  • ―HideWMP
field:"CommandLine" kind:match
Imageends_with
  • \unregmp2.exe
field:"Image" kind:ends_with value:"\unregmp2.exe"
OriginalFileNameeq
  • unregmp2.exe
field:"OriginalFileName" kind:eq value:"unregmp2.exe"

Microsoft Office Trusted Location Updated

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

Detects changes to the registry keys related to "Trusted Location" of Microsoft Office. Attackers might add additional trusted locations to avoid macro security restrictions.

Known False Positives

  • During office installations or setup, trusted locations are added, which will trigger this rule.

MITRE ATT&CK Coverage

TacticTechniques
Persistence
Defense Impairment

Telemetry Coverage

Rule Body

title: Microsoft Office Trusted Location Updated
id: a0bed973-45fa-4625-adb5-6ecdf9be70ac
related:
    - id: f742bde7-9528-42e5-bd82-84f51a8387d2
      type: similar
status: test
description: Detects changes to the registry keys related to "Trusted Location" of Microsoft Office. Attackers might add additional trusted locations to avoid macro security restrictions.
references:
    - https://admx.help/?Category=Office2016&Policy=excel16.Office.Microsoft.Policies.Windows::L_TrustedLoc01
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-06-21
modified: 2023-08-17
tags:
    - attack.persistence
    - attack.defense-impairment
    - attack.t1112
    - detection.threat-hunting
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: 'Security\Trusted Locations\Location'
        TargetObject|endswith: '\Path'
    filter_main_office_click_to_run:
        Image|contains: ':\Program Files\Common Files\Microsoft Shared\ClickToRun\'
        Image|endswith: '\OfficeClickToRun.exe'
    filter_main_office_apps:
        Image|contains:
            - ':\Program Files\Microsoft Office\'
            - ':\Program Files (x86)\Microsoft Office\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - During office installations or setup, trusted locations are added, which will trigger this rule.
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    TargetObject|contains: 'Security\Trusted Locations\Location'
    TargetObject|endswith: '\Path'

Stage 2: not filter_main_*

filter_main_office_click_to_run:
    Image|contains: ':\Program Files\Common Files\Microsoft Shared\ClickToRun\'
    Image|endswith: '\OfficeClickToRun.exe'
filter_main_office_apps:
    Image|contains:
        - ':\Program Files\Microsoft Office\'
        - ':\Program Files (x86)\Microsoft Office\'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
TargetObjectends_with
  • \Path corpus 2 (sigma 2)
field:"TargetObject" kind:ends_with value:"\Path"
TargetObjectmatch
  • Security\Trusted Locations\Location corpus 2 (sigma 2)
field:"TargetObject" kind:match value:"Security\Trusted Locations\Location"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imageends_with\OfficeClickToRun.exeexcludes:Image field:"Image" value:"\OfficeClickToRun.exe"
Imagematch:\Program Files\Common Files\Microsoft Shared\ClickToRun\excludes:Image field:"Image" value:":\Program Files\Common Files\Microsoft Shared\ClickToRun\"
Imagematch:\Program Files (x86)\Microsoft Office\excludes:Image field:"Image" value:":\Program Files (x86)\Microsoft Office\"
Imagematch:\Program Files\Microsoft Office\excludes:Image field:"Image" value:":\Program Files\Microsoft Office\"

Multi Factor Authentication Disabled For User Account

#
Status
test
Severity
medium
Author
Harjot Singh (@cyb3rjy0t)
Source
github.com/SigmaHQ/sigma

Detects changes to the "StrongAuthenticationRequirement" value, where the state is set to "0" or "Disabled". Threat actors were seen disabling multi factor authentication for users in order to maintain or achieve access to the account. Also see in SIM Swap attacks.

Known False Positives

  • Legitimate authorized activity.

MITRE ATT&CK Coverage

TacticTechniques
PersistenceNo specific technique
Credential AccessNo specific technique

Telemetry Coverage

PlatformRecord / event type
AzureUpdate user

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

title: Multi Factor Authentication Disabled For User Account
id: b18454c8-0be3-41f7-86bc-9c614611b839
status: test
description: |
    Detects changes to the "StrongAuthenticationRequirement" value, where the state is set to "0" or "Disabled".
    Threat actors were seen disabling multi factor authentication for users in order to maintain or achieve access to the account. Also see in SIM Swap attacks.
references:
    - https://www.sans.org/blog/defending-against-scattered-spider-and-the-com-with-cybercrime-intelligence/
author: Harjot Singh (@cyb3rjy0t)
date: 2024-08-21
tags:
    - attack.credential-access
    - attack.persistence
logsource:
    product: azure
    service: auditlogs
    definition: 'Requirements: The TargetResources array needs to be mapped accurately in order for this rule to work'
detection:
    selection:
        LoggedByService: 'Core Directory'
        Category: 'UserManagement'
        OperationName: 'Update user'
        TargetResources.ModifiedProperties.DisplayName: 'StrongAuthenticationRequirement'
        TargetResources.ModifiedProperties.NewValue|contains: "State\":0"
    condition: selection
falsepositives:
    - Legitimate authorized activity.
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    LoggedByService: 'Core Directory'
    Category: 'UserManagement'
    OperationName: 'Update user'
    TargetResources.ModifiedProperties.DisplayName: 'StrongAuthenticationRequirement'
    TargetResources.ModifiedProperties.NewValue|contains: "State\":0"

Indicators

These rows show field, operator, and value matches.

New or Renamed User Account with '$' Character

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

Detects the creation of a user with the "$" character. This can be used by attackers to hide a user or trick detection systems that lack the parsing mechanisms.

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Telemetry Coverage

Rule Body

title: New or Renamed User Account with '$' Character
id: cfeed607-6aa4-4bbd-9627-b637deb723c8
status: test
description: |
    Detects the creation of a user with the "$" character. This can be used by attackers to hide a user or trick detection systems that lack the parsing mechanisms.
references:
    - https://twitter.com/SBousseaden/status/1387743867663958021
author: Ilyas Ochkov, oscd.community
date: 2019-10-25
modified: 2024-01-16
tags:
    - attack.stealth
    - attack.t1036
logsource:
    product: windows
    service: security
detection:
    selection_create:
        EventID: 4720 # create user
        SamAccountName|contains: '$'
    selection_rename:
        EventID: 4781 # rename user
        NewTargetUserName|contains: '$'
    filter_main_homegroup:
        EventID: 4720
        TargetUserName: 'HomeGroupUser$'
    condition: 1 of selection_* and not 1 of filter_main_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

1 of selection_* and not 1 of filter_main_*

Stage 1: selection_create

selection_create:
    EventID: 4720
    SamAccountName|contains: '$'

Stage 2: selection_rename

selection_rename:
    EventID: 4781
    NewTargetUserName|contains: '$'

Stage 3: not filter_main_homegroup

filter_main_homegroup:
    EventID: 4720
    TargetUserName: 'HomeGroupUser$'

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
TargetUserNameeqHomeGroupUser$excludes:TargetUserName field:"TargetUserName" value:"HomeGroupUser$"

New PDQDeploy Service - Server Side

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

Detects a PDQDeploy service installation which indicates that PDQDeploy was installed on the machines. PDQDeploy can be abused by attackers to remotely install packages or execute commands on target machines

Known False Positives

  • Legitimate use of the tool

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: New PDQDeploy Service - Server Side
id: ee9ca27c-9bd7-4cee-9b01-6e906be7cae3
status: test
description: |
    Detects a PDQDeploy service installation which indicates that PDQDeploy was installed on the machines.
    PDQDeploy can be abused by attackers to remotely install packages or execute commands on target machines
references:
    - https://documentation.pdq.com/PDQDeploy/13.0.3.0/index.html?windows-services.htm
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-07-22
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1543.003
logsource:
    product: windows
    service: system
detection:
    selection_root:
        Provider_Name: 'Service Control Manager'
        EventID: 7045
    selection_service:
        - ImagePath|contains: 'PDQDeployService.exe'
        - ServiceName:
              - 'PDQDeploy'
              - 'PDQ Deploy'
    condition: all of selection_*
falsepositives:
    - Legitimate use of the tool
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_root

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

Stage 2: selection_service

selection_service:
    - ImagePath|contains: 'PDQDeployService.exe'
    - ServiceName:
          - 'PDQDeploy'
          - 'PDQ Deploy'

Indicators

These rows show field, operator, and value matches.

Potentially Suspicious Child Process Of VsCode

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

Detects uncommon or suspicious child processes spawning from a VsCode "code.exe" process. This could indicate an attempt of persistence via VsCode tasks or terminal profiles.

Known False Positives

  • In development environment where VsCode is used heavily. False positives may occur when developers use task to compile or execute different types of code. Remove or add processes accordingly

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Potentially Suspicious Child Process Of VsCode
id: 5a3164f2-b373-4152-93cf-090b13c12d27
status: test
description: Detects uncommon or suspicious child processes spawning from a VsCode "code.exe" process. This could indicate an attempt of persistence via VsCode tasks or terminal profiles.
references:
    - https://twitter.com/nas_bench/status/1618021838407495681
    - https://twitter.com/nas_bench/status/1618021415852335105
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-26
modified: 2023-10-25
tags:
    - attack.execution
    - attack.stealth
    - attack.t1218
    - attack.t1202
logsource:
    category: process_creation
    product: windows
detection:
    selection_parent:
        ParentImage|endswith: '\code.exe'
    selection_children_images:
        Image|endswith:
            - '\calc.exe'
            - '\regsvr32.exe'
            - '\rundll32.exe'
            - '\cscript.exe'
            - '\wscript.exe'
    selection_children_cli:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\cmd.exe'
        CommandLine|contains:
            - 'Invoke-Expressions'
            - 'IEX'
            - 'Invoke-Command'
            - 'ICM'
            - 'DownloadString'
            - 'rundll32'
            - 'regsvr32'
            - 'wscript'
            - 'cscript'
    selection_children_paths:
        Image|contains:
            # Add more suspicious locations
            - ':\Users\Public\'
            - ':\Windows\Temp\'
            - ':\Temp\'
    condition: selection_parent and 1 of selection_children_*
falsepositives:
    - In development environment where VsCode is used heavily. False positives may occur when developers use task to compile or execute different types of code. Remove or add processes accordingly
level: medium

Stages and Predicates

Stage 0: condition

selection_parent and 1 of selection_children_*

Stage 1: selection_parent

selection_parent:
    ParentImage|endswith: '\code.exe'

Stage 2: selection_children_images

selection_children_images:
    Image|endswith:
        - '\calc.exe'
        - '\regsvr32.exe'
        - '\rundll32.exe'
        - '\cscript.exe'
        - '\wscript.exe'

Stage 3: selection_children_cli

selection_children_cli:
    Image|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'
        - '\cmd.exe'
    CommandLine|contains:
        - 'Invoke-Expressions'
        - 'IEX'
        - 'Invoke-Command'
        - 'ICM'
        - 'DownloadString'
        - 'rundll32'
        - 'regsvr32'
        - 'wscript'
        - 'cscript'

Stage 4: selection_children_paths

selection_children_paths:
    Image|contains:
        - ':\Users\Public\'
        - ':\Windows\Temp\'
        - ':\Temp\'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • DownloadString corpus 8 (sigma 7, elastic 1)
  • ICM
  • IEX corpus 6 (sigma 5, splunk 1)
  • Invoke-Command corpus 3 (sigma 2, splunk 1)
  • Invoke-Expressions
  • cscript corpus 15 (sigma 15)
  • regsvr32 corpus 15 (sigma 15)
  • rundll32 corpus 23 (sigma 23)
  • wscript corpus 16 (sigma 16)
field:"CommandLine" kind:match
Imageends_with
  • \calc.exe corpus 15 (sigma 14, splunk 1)
  • \cmd.exe corpus 132 (sigma 130, splunk 2)
  • \cscript.exe corpus 72 (sigma 72)
  • \powershell.exe corpus 181 (sigma 180, splunk 1)
  • \pwsh.exe corpus 166 (sigma 166)
  • \regsvr32.exe corpus 64 (sigma 64)
  • \rundll32.exe corpus 94 (sigma 94)
  • \wscript.exe corpus 74 (sigma 74)
field:"Image" kind:ends_with
Imagematch
  • :\Temp\ corpus 11 (sigma 11)
  • :\Users\Public\ corpus 13 (sigma 13)
  • :\Windows\Temp\ corpus 8 (sigma 8)
field:"Image" kind:match
ParentImageends_with
  • \code.exe
field:"ParentImage" kind:ends_with value:"\code.exe"

Powershell Execute Batch Script

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

Adversaries may abuse the Windows command shell for execution. The Windows command shell (cmd) is the primary command prompt on Windows systems. The Windows command prompt can be used to control almost any aspect of a system, with various permission levels required for different subsets of commands. Batch files (ex: .bat or .cmd) also provide the shell with a list of sequential commands to run, as well as normal scripting operations such as conditionals and loops. Common uses of batch files include long or repetitive tasks, or the need to run the same set of commands on multiple system

Known False Positives

  • Legitimate administration script

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Powershell Execute Batch Script
id: b5522a23-82da-44e5-9c8b-e10ed8955f88
status: test
description: |
    Adversaries may abuse the Windows command shell for execution.
    The Windows command shell ([cmd](https://attack.mitre.org/software/S0106)) is the primary command prompt on Windows systems.
    The Windows command prompt can be used to control almost any aspect of a system, with various permission levels required for different subsets of commands.
    Batch files (ex: .bat or .cmd) also provide the shell with a list of sequential commands to run, as well as normal scripting operations such as conditionals and loops.
    Common uses of batch files include long or repetitive tasks, or the need to run the same set of commands on multiple system
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1059.003/T1059.003.md#atomic-test-1---create-and-execute-batch-script
author: frack113
date: 2022-01-02
tags:
    - attack.execution
    - attack.t1059.003
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_start:
        ScriptBlockText|contains: Start-Process
    selection_batch:
        ScriptBlockText|contains:
            - '.cmd'
            - '.bat'
    condition: all of selection_*
falsepositives:
    - Legitimate administration script
level: medium
regression_tests_path: regression_data/rules/windows/powershell/powershell_script/posh_ps_susp_execute_batch_script/info.yml

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_start

selection_start:
    ScriptBlockText|contains: Start-Process

Stage 2: selection_batch

selection_batch:
    ScriptBlockText|contains:
        - '.cmd'
        - '.bat'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
ScriptBlockTextmatch
  • .bat
  • .cmd
  • Start-Process corpus 2 (sigma 2)
field:"ScriptBlockText" kind:match

PowerShell Script Run in AppData

#
Status
test
Severity
medium
Author
Florian Roth (Nextron Systems), Jonhnathan Ribeiro, oscd.community
Source
github.com/SigmaHQ/sigma

Detects a suspicious command line execution that invokes PowerShell with reference to an AppData folder

Known False Positives

  • Administrative scripts

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: PowerShell Script Run in AppData
id: ac175779-025a-4f12-98b0-acdaeb77ea85
status: test
description: Detects a suspicious command line execution that invokes PowerShell with reference to an AppData folder
references:
    - https://twitter.com/JohnLaTwC/status/1082851155481288706
    - https://app.any.run/tasks/f87f1c4e-47e2-4c46-9cf4-31454c06ce03
author: Florian Roth (Nextron Systems), Jonhnathan Ribeiro, oscd.community
date: 2019-01-09
modified: 2022-07-14
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection1:
        CommandLine|contains:
            - 'powershell.exe'
            - '\powershell'
            - '\pwsh'
            - 'pwsh.exe'
    selection2:
        CommandLine|contains|all:
            - '/c '
            - '\AppData\'
        CommandLine|contains:
            - 'Local\'
            - 'Roaming\'
    condition: all of selection*
falsepositives:
    - Administrative scripts
level: medium

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection1

selection1:
    CommandLine|contains:
        - 'powershell.exe'
        - '\powershell'
        - '\pwsh'
        - 'pwsh.exe'

Stage 2: selection2

selection2:
    CommandLine|contains|all:
        - '/c '
        - '\AppData\'
    CommandLine|contains:
        - 'Local\'
        - 'Roaming\'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • /c corpus 4 (sigma 4)
  • Local\
  • Roaming\
  • \AppData\ corpus 11 (sigma 8, elastic 3)
  • \powershell
  • \pwsh
  • powershell.exe corpus 2 (sigma 2)
  • pwsh.exe corpus 2 (sigma 2)
field:"CommandLine" kind:match

PsExec Service Execution

#
Status
test
Severity
medium
Author
Thomas Patzke, Romaissa Adjailia, Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects launch of the PSEXESVC service, which means that this system was the target of a psexec remote execution

Known False Positives

  • Legitimate administrative tasks

MITRE ATT&CK Coverage

TacticTechniques
ExecutionNo specific technique

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: PsExec Service Execution
id: fdfcbd78-48f1-4a4b-90ac-d82241e368c5
related:
    - id: fa91cc36-24c9-41ce-b3c8-3bbc3f2f67ba
      type: obsolete
status: test
description: Detects launch of the PSEXESVC service, which means that this system was the target of a psexec remote execution
references:
    - https://learn.microsoft.com/en-us/sysinternals/downloads/psexec
    - https://www.youtube.com/watch?v=ro2QuZTIMBM
author: Thomas Patzke, Romaissa Adjailia, Florian Roth (Nextron Systems)
date: 2017-06-12
modified: 2023-02-28
tags:
    - attack.execution
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        - Image: 'C:\Windows\PSEXESVC.exe'
        - OriginalFileName: 'psexesvc.exe'
    condition: selection
falsepositives:
    - Legitimate administrative tasks
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    - Image: 'C:\Windows\PSEXESVC.exe'
    - OriginalFileName: 'psexesvc.exe'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageeq
  • C:\Windows\PSEXESVC.exe
field:"Image" kind:eq value:"C:\Windows\PSEXESVC.exe"
OriginalFileNameeq
  • psexesvc.exe corpus 4 (sigma 3, elastic 1)
field:"OriginalFileName" kind:eq value:"psexesvc.exe"

PUA - Process Hacker Execution

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

Detects the execution of Process Hacker based on binary metadata information (Image, Hash, Imphash, etc). Process Hacker is a tool to view and manipulate processes, kernel options and other low level options. Threat actors abused older vulnerable versions to manipulate system processes.

Known False Positives

  • While sometimes 'Process Hacker is used by legitimate administrators, the execution of Process Hacker must be investigated and allowed on a case by case basis

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule Body

title: PUA - Process Hacker Execution
id: 811e0002-b13b-4a15-9d00-a613fce66e42
related:
    - id: 5722dff1-4bdd-4949-86ab-fbaf707e767a
      type: similar
status: test
description: |
    Detects the execution of Process Hacker based on binary metadata information (Image, Hash, Imphash, etc).
    Process Hacker is a tool to view and manipulate processes, kernel options and other low level options.
    Threat actors abused older vulnerable versions to manipulate system processes.
references:
    - https://processhacker.sourceforge.io/
    - https://www.crowdstrike.com/blog/falcon-overwatch-report-finds-increase-in-ecrime/
author: Florian Roth (Nextron Systems)
date: 2022-10-10
modified: 2024-11-23
tags:
    - attack.discovery
    - attack.persistence
    - attack.privilege-escalation
    - attack.stealth
    - attack.t1622
    - attack.t1564
    - attack.t1543
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        - Image|contains: '\ProcessHacker_'
        - Image|endswith: '\ProcessHacker.exe'
        - OriginalFileName:
              - 'ProcessHacker.exe'
              - 'Process Hacker'
        - Description: 'Process Hacker'
        - Product: 'Process Hacker'
        - Hashes|contains:
              - 'MD5=68F9B52895F4D34E74112F3129B3B00D'
              - 'MD5=B365AF317AE730A67C936F21432B9C71'
              - 'SHA1=A0BDFAC3CE1880B32FF9B696458327CE352E3B1D'
              - 'SHA1=C5E2018BF7C0F314FED4FD7FE7E69FA2E648359E'
              - 'SHA256=D4A0FE56316A2C45B9BA9AC1005363309A3EDC7ACF9E4DF64D326A0FF273E80F'
              - 'SHA256=BD2C2CF0631D881ED382817AFCCE2B093F4E412FFB170A719E2762F250ABFEA4'
              - 'IMPHASH=3695333C60DEDECDCAFF1590409AA462'
              - 'IMPHASH=04DE0AD9C37EB7BD52043D2ECAC958DF'
    condition: selection
falsepositives:
    - While sometimes 'Process Hacker is used by legitimate administrators, the execution of Process Hacker must be investigated and allowed on a case by case basis
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    - Image|contains: '\ProcessHacker_'
    - Image|endswith: '\ProcessHacker.exe'
    - OriginalFileName:
          - 'ProcessHacker.exe'
          - 'Process Hacker'
    - Description: 'Process Hacker'
    - Product: 'Process Hacker'
    - Hashes|contains:
          - 'MD5=68F9B52895F4D34E74112F3129B3B00D'
          - 'MD5=B365AF317AE730A67C936F21432B9C71'
          - 'SHA1=A0BDFAC3CE1880B32FF9B696458327CE352E3B1D'
          - 'SHA1=C5E2018BF7C0F314FED4FD7FE7E69FA2E648359E'
          - 'SHA256=D4A0FE56316A2C45B9BA9AC1005363309A3EDC7ACF9E4DF64D326A0FF273E80F'
          - 'SHA256=BD2C2CF0631D881ED382817AFCCE2B093F4E412FFB170A719E2762F250ABFEA4'
          - 'IMPHASH=3695333C60DEDECDCAFF1590409AA462'
          - 'IMPHASH=04DE0AD9C37EB7BD52043D2ECAC958DF'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Descriptioneq
  • Process Hacker
field:"Description" kind:eq value:"Process Hacker"
Hashesmatch
  • IMPHASH=04DE0AD9C37EB7BD52043D2ECAC958DF
  • IMPHASH=3695333C60DEDECDCAFF1590409AA462
  • MD5=68F9B52895F4D34E74112F3129B3B00D
  • MD5=B365AF317AE730A67C936F21432B9C71
  • SHA1=A0BDFAC3CE1880B32FF9B696458327CE352E3B1D
  • SHA1=C5E2018BF7C0F314FED4FD7FE7E69FA2E648359E
  • SHA256=BD2C2CF0631D881ED382817AFCCE2B093F4E412FFB170A719E2762F250ABFEA4
  • SHA256=D4A0FE56316A2C45B9BA9AC1005363309A3EDC7ACF9E4DF64D326A0FF273E80F
field:"Hashes" kind:match
Imageends_with
  • \ProcessHacker.exe
field:"Image" kind:ends_with value:"\ProcessHacker.exe"
Imagematch
  • \ProcessHacker_
field:"Image" kind:match value:"\ProcessHacker_"
OriginalFileNameeq
  • Process Hacker
  • ProcessHacker.exe
field:"OriginalFileName" kind:eq
Producteq
  • Process Hacker
field:"Product" kind:eq value:"Process Hacker"

Publicly Accessible RDP Service

#
Status
test
Severity
high
Author
Josh Brower @DefensiveDepth
Source
github.com/SigmaHQ/sigma

Detects connections from routable IPs to an RDP listener. Which is indicative of a publicly-accessible RDP service.

Known False Positives

  • Although it is recommended to NOT have RDP exposed to the internet, verify that this is a) allowed b) the server has not already been compromised via some brute force or remote exploit since it has been exposed to the internet. Work to secure the server if you are unable to remove it from being exposed to the internet.

MITRE ATT&CK Coverage

Rule Body

title: Publicly Accessible RDP Service
id: 1fc0809e-06bf-4de3-ad52-25e5263b7623
status: test
description: |
    Detects connections from routable IPs to an RDP listener. Which is indicative of a publicly-accessible RDP service.
author: Josh Brower @DefensiveDepth
date: 2020-08-22
modified: 2024-03-13
tags:
    - attack.lateral-movement
    - attack.t1021.001
logsource:
    product: zeek
    service: rdp
detection:
    selection:
        id.orig_h|cidr:
            - '::1/128'  # IPv6 loopback
            - '10.0.0.0/8'
            - '127.0.0.0/8'
            - '172.16.0.0/12'
            - '192.168.0.0/16'
            - '169.254.0.0/16'
            - '2620:83:8000::/48'
            - 'fc00::/7'  # IPv6 private addresses
            - 'fe80::/10'  # IPv6 link-local addresses
    # approved_rdp:
      # dst_ip:
        # - x.x.x.x
    condition: not selection # and not approved_rdp
falsepositives:
    - Although it is recommended to NOT have RDP exposed to the internet, verify that this is a) allowed b) the server has not already been compromised via some brute force or remote exploit since it has been exposed to the internet. Work to secure the server if you are unable to remove it from being exposed to the internet.
level: high

Stages and Predicates

Stage 0: condition

not selection # and not approved_rdp

Stage 1: not selection

selection:
    id.orig_h|cidr:
        - '::1/128'
        - '10.0.0.0/8'
        - '127.0.0.0/8'
        - '172.16.0.0/12'
        - '192.168.0.0/16'
        - '169.254.0.0/16'
        - '2620:83:8000::/48'
        - 'fc00::/7'
        - 'fe80::/10'

Exclusions

The rule actively suppresses these predicates.

Remote DCOM/WMI Lateral Movement

#
Status
test
Severity
high
Author
Sagie Dulce, Dekel Paz
Source
github.com/SigmaHQ/sigma

Detects remote RPC calls that performs remote DCOM operations. These could be abused for lateral movement via DCOM or WMI.

Known False Positives

  • Some administrative tasks on remote host

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Remote DCOM/WMI Lateral Movement
id: 68050b10-e477-4377-a99b-3721b422d6ef
status: test
description: Detects remote RPC calls that performs remote DCOM operations. These could be abused for lateral movement via DCOM or WMI.
references:
    - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-srvs/accf23b0-0f57-441c-9185-43041f1b0ee9
    - 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
    - attack.execution
    - attack.t1021.003
    - attack.t1047
logsource:
    product: rpc_firewall
    category: application
    definition: 'Requirements: install and apply the RPC Firewall to all processes with "audit:true action:block uuid:367abb81-9844-35f1-ad32-98f038001003'
detection:
    selection:
        EventLog: RPCFW
        EventID: 3
        InterfaceUuid:
            - 4d9f4ab8-7d1c-11cf-861e-0020af6e7c57
            - 99fcfec4-5260-101b-bbcb-00aa0021347a
            - 000001a0-0000-0000-c000-000000000046
            - 00000131-0000-0000-c000-000000000046
            - 00000143-0000-0000-c000-000000000046
            - 00000000-0000-0000-c000-000000000046
    condition: selection
falsepositives:
    - Some administrative tasks on remote host
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    EventLog: RPCFW
    EventID: 3
    InterfaceUuid:
        - 4d9f4ab8-7d1c-11cf-861e-0020af6e7c57
        - 99fcfec4-5260-101b-bbcb-00aa0021347a
        - 000001a0-0000-0000-c000-000000000046
        - 00000131-0000-0000-c000-000000000046
        - 00000143-0000-0000-c000-000000000046
        - 00000000-0000-0000-c000-000000000046

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventLogeq
  • RPCFW corpus 17 (sigma 17)
field:"EventLog" kind:eq value:"RPCFW"
InterfaceUuideq
  • 00000000-0000-0000-c000-000000000046
  • 00000131-0000-0000-c000-000000000046
  • 00000143-0000-0000-c000-000000000046
  • 000001a0-0000-0000-c000-000000000046
  • 4d9f4ab8-7d1c-11cf-861e-0020af6e7c57
  • 99fcfec4-5260-101b-bbcb-00aa0021347a
field:"InterfaceUuid" kind:eq

Sdiagnhost Calling Suspicious Child Process

#
Status
test
Severity
high
Author
Nextron Systems, @Kostastsale
Source
github.com/SigmaHQ/sigma

Detects sdiagnhost.exe calling a suspicious child process (e.g. used in exploits for Follina / CVE-2022-30190)

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Sdiagnhost Calling Suspicious Child Process
id: f3d39c45-de1a-4486-a687-ab126124f744
status: test
description: Detects sdiagnhost.exe calling a suspicious child process (e.g. used in exploits for Follina / CVE-2022-30190)
references:
    - https://twitter.com/nao_sec/status/1530196847679401984
    - https://doublepulsar.com/follina-a-microsoft-office-code-execution-vulnerability-1a47fce5629e
    - https://app.any.run/tasks/713f05d2-fe78-4b9d-a744-f7c133e3fafb/
    - https://app.any.run/tasks/f420d295-0457-4e9b-9b9e-6732be227583/
    - https://app.any.run/tasks/c4117d9a-f463-461a-b90f-4cd258746798/
author: Nextron Systems, @Kostastsale
date: 2022-06-01
modified: 2024-08-23
tags:
    - attack.stealth
    - attack.t1036
    - attack.t1218
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        ParentImage|endswith: '\sdiagnhost.exe'
        Image|endswith:
            # Add more suspicious LOLBins
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\cmd.exe'
            - '\mshta.exe'
            - '\cscript.exe'
            - '\wscript.exe'
            - '\taskkill.exe'
            - '\regsvr32.exe'
            - '\rundll32.exe'
            # - '\csc.exe'   # https://app.any.run/tasks/f420d295-0457-4e9b-9b9e-6732be227583/
            - '\calc.exe'  # https://app.any.run/tasks/f420d295-0457-4e9b-9b9e-6732be227583/
    filter_main_cmd_bits:
        Image|endswith: '\cmd.exe'
        CommandLine|contains: 'bits'
    filter_main_powershell_noprofile:
        Image|endswith: '\powershell.exe'
        CommandLine|endswith:
            - '-noprofile -'
            - '-noprofile'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    ParentImage|endswith: '\sdiagnhost.exe'
    Image|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'
        - '\cmd.exe'
        - '\mshta.exe'
        - '\cscript.exe'
        - '\wscript.exe'
        - '\taskkill.exe'
        - '\regsvr32.exe'
        - '\rundll32.exe'
        - '\calc.exe'

Stage 2: not filter_main_*

filter_main_cmd_bits:
    Image|endswith: '\cmd.exe'
    CommandLine|contains: 'bits'
filter_main_powershell_noprofile:
    Image|endswith: '\powershell.exe'
    CommandLine|endswith:
        - '-noprofile -'
        - '-noprofile'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \calc.exe corpus 15 (sigma 14, splunk 1)
  • \cmd.exe corpus 132 (sigma 130, splunk 2)
  • \cscript.exe corpus 72 (sigma 72)
  • \mshta.exe corpus 67 (sigma 66, splunk 1)
  • \powershell.exe corpus 181 (sigma 180, splunk 1)
  • \pwsh.exe corpus 166 (sigma 166)
  • \regsvr32.exe corpus 64 (sigma 64)
  • \rundll32.exe corpus 94 (sigma 94)
  • \taskkill.exe corpus 4 (sigma 4)
  • \wscript.exe corpus 74 (sigma 74)
field:"Image" kind:ends_with
ParentImageends_with
  • \sdiagnhost.exe
field:"ParentImage" kind:ends_with value:"\sdiagnhost.exe"

Exclusions

The rule actively suppresses these predicates.

Start of NT Virtual DOS Machine

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

Ntvdm.exe allows the execution of 16-bit Windows applications on 32-bit Windows operating systems, as well as the execution of both 16-bit and 32-bit DOS applications

Known False Positives

  • Legitimate use

MITRE ATT&CK Coverage

TacticTechniques
StealthNo specific technique

Telemetry Coverage

Rule Body

title: Start of NT Virtual DOS Machine
id: 16905e21-66ee-42fe-b256-1318ada2d770
status: test
description: Ntvdm.exe allows the execution of 16-bit Windows applications on 32-bit Windows operating systems, as well as the execution of both 16-bit and 32-bit DOS applications
references:
    - https://learn.microsoft.com/en-us/windows/compatibility/ntvdm-and-16-bit-app-support
    - https://support.microsoft.com/fr-fr/topic/an-ms-dos-based-program-that-uses-the-ms-dos-protected-mode-interface-crashes-on-a-computer-that-is-running-windows-7-5dc739ea-987b-b458-15e4-d28d5cca63c7
    - https://app.any.run/tasks/93fe92fa-8b2b-4d92-8c09-a841aed2e793/
    - https://app.any.run/tasks/214094a7-0abc-4a7b-a564-1b757faed79d/
author: frack113
date: 2022-07-16
tags:
    - attack.stealth
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith:
            - '\ntvdm.exe'
            - '\csrstub.exe'
    condition: selection
falsepositives:
    - Legitimate use
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith:
        - '\ntvdm.exe'
        - '\csrstub.exe'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \csrstub.exe
  • \ntvdm.exe
field:"Image" kind:ends_with

Suspicious Scripting in a WMI Consumer

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

Detects suspicious commands that are related to scripting/powershell in WMI Event Consumers

Known False Positives

  • Legitimate administrative scripts

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: Suspicious Scripting in a WMI Consumer
id: fe21810c-2a8c-478f-8dd3-5a287fb2a0e0
status: test
description: Detects suspicious commands that are related to scripting/powershell in WMI Event Consumers
references:
    - https://in.security/an-intro-into-abusing-and-identifying-wmi-event-subscriptions-for-persistence/
    - https://github.com/Neo23x0/signature-base/blob/615bf1f6bac3c1bdc417025c40c073e6c2771a76/yara/gen_susp_lnk_files.yar#L19
    - https://github.com/RiccardoAncarani/LiquidSnake
author: Florian Roth (Nextron Systems), Jonhnathan Ribeiro
date: 2019-04-15
modified: 2023-09-09
tags:
    - attack.execution
    - attack.t1059.005
logsource:
    product: windows
    category: wmi_event
detection:
    selection_destination:
        - Destination|contains|all:
              - 'new-object'
              - 'net.webclient'
              - '.downloadstring'
        - Destination|contains|all:
              - 'new-object'
              - 'net.webclient'
              - '.downloadfile'
        - Destination|contains:
              - ' iex('
              - ' -nop '
              - ' -noprofile '
              - ' -decode '
              - ' -enc '
              - 'WScript.Shell'
              - 'System.Security.Cryptography.FromBase64Transform'
    condition: selection_destination
falsepositives:
    - Legitimate administrative scripts
level: high

Stages and Predicates

Stage 0: condition

selection_destination

Stage 1: selection_destination

selection_destination:
    - Destination|contains|all:
          - 'new-object'
          - 'net.webclient'
          - '.downloadstring'
    - Destination|contains|all:
          - 'new-object'
          - 'net.webclient'
          - '.downloadfile'
    - Destination|contains:
          - ' iex('
          - ' -nop '
          - ' -noprofile '
          - ' -decode '
          - ' -enc '
          - 'WScript.Shell'
          - 'System.Security.Cryptography.FromBase64Transform'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Destinationmatch
  • -decode
  • -enc
  • -nop
  • -noprofile
  • iex(
  • .downloadfile
  • .downloadstring
  • System.Security.Cryptography.FromBase64Transform
  • WScript.Shell
  • net.webclient
  • new-object
field:"Image" kind:match

WCE wceaux.dll Access

#
Status
test
Severity
critical
Author
Thomas Patzke
Source
github.com/SigmaHQ/sigma

Detects wceaux.dll access while WCE pass-the-hash remote command execution on source host

MITRE ATT&CK Coverage

TacticTechniques
Credential Access

Telemetry Coverage

Rule Body

title: WCE wceaux.dll Access
id: 1de68c67-af5c-4097-9c85-fe5578e09e67
status: test
description: Detects wceaux.dll access while WCE pass-the-hash remote command execution on source host
references:
    - https://www.jpcert.or.jp/english/pub/sr/ir_research.html
    - https://jpcertcc.github.io/ToolAnalysisResultSheet
author: Thomas Patzke
date: 2017-06-14
modified: 2025-01-30
tags:
    - attack.credential-access
    - attack.t1003
    - attack.s0005
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID:
            - 4656
            - 4663
        ObjectName|endswith: '\wceaux.dll'
    condition: selection
falsepositives:
    - Unknown
level: critical

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    EventID:
        - 4656
        - 4663
    ObjectName|endswith: '\wceaux.dll'

Indicators

These rows show field, operator, and value matches.

WinRM listening service reconnaissance (process)

#
Status
experimental
Severity
medium
Time window
15m
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker enumerates different remote WinRM listeners for lateral movement purposes.

Known False Positives

  • Administrator activity, Windows Server Manager, applications using WinRM

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

title: WinRM listening service reconnaissance (process)
description: Detects scenarios where an attacker enumerates different remote WinRM listeners for lateral movement purposes.
correlation: correlate TargetLogonId from event ID 4688 with TargetLogonId from event ID 4624 to identify the source host.
references:
- https://www.rapid7.com/blog/post/2012/11/08/abusing-windows-remote-management-winrm-with-metasploit/
- https://securethelogs.com/2019/08/30/hacking-windows-remote-management-winrm/
- https://www.ired.team/offensive-security/lateral-movement/winrs-for-lateral-movement
- https://www.redcanary.com/blog/lateral-movement-winrm-wmi/
- https://bohops.com/2020/05/12/ws-management-com-another-approach-for-winrm-lateral-movement/
- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190511223310.html
- https://jpcertcc.github.io/ToolAnalysisResultSheet/details/WinRM.htm
- https://github.com/bohops/WSMan-WinRM
- https://github.com/mez-0/CSharpWinRM
- https://github.com/antonioCoco/RogueWinRM
tags:
- attack.lateral_movement
- attack.t1021.006
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category: process_creation
detection:
  selection:
    NewProcessName|endswith: \wsmprovhost.exe
  filter:
    TargetUserName|endswith: '$'
  condition: selection and not filter | count(Computer) > 30
  timeframe: 15m
falsepositives:
- Administrator activity, Windows Server Manager, applications using WinRM
level: medium

Stages and Predicates

Stage 0: condition

selection and not filter | count(Computer) > 30

Stage 1: selection

selection:
  NewProcessName|endswith: \wsmprovhost.exe
Threshold
> 30

Stage 2: not filter

filter:
  TargetUserName|endswith: '$'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
NewProcessNameends_with
  • \wsmprovhost.exe corpus 3 (sigma 3)
field:"Image" kind:ends_with value:"\wsmprovhost.exe"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
TargetUserNameends_with$excludes:TargetUserName field:"TargetUserName" value:"$"

Back to all Sigma rules