Detection rules › Sigma

Potential PsExec Remote Execution

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects potential psexec command that initiate execution on a remote systems via common commandline flags used by the utility

MITRE ATT&CK coverage

TacticTechniques
Resource DevelopmentT1587.001 Develop Capabilities: Malware

Event coverage

Rule body yaml

title: Potential PsExec Remote Execution
id: ea011323-7045-460b-b2d7-0f7442ea6b38
status: test
description: Detects potential psexec command that initiate execution on a remote systems via common commandline flags used by the utility
references:
    - https://learn.microsoft.com/en-us/sysinternals/downloads/psexec
    - https://www.poweradmin.com/paexec/
    - https://www.fireeye.com/blog/threat-research/2020/10/kegtap-and-singlemalt-with-a-ransomware-chaser.html
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2023-02-28
modified: 2025-09-01
tags:
    - attack.resource-development
    - attack.t1587.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        # Accepting EULA in commandline - often used in automated attacks
        CommandLine|contains|all:
            - 'accepteula'
            - ' -u '
            - ' -p '
            - ' \\\\'
    filter_main_localhost:
        CommandLine|contains:
            - '\\\\localhost'
            - '\\\\127.'
    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:
    CommandLine|contains|all:
        - 'accepteula'
        - ' -u '
        - ' -p '
        - ' \\\\'

Stage 2: not filter_main_localhost

filter_main_localhost:
    CommandLine|contains:
        - '\\\\localhost'
        - '\\\\127.'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLinematch\\\\127.
CommandLinematch\\\\localhost

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • -p corpus 10 (sigma 7, splunk 3)
  • -u corpus 8 (sigma 5, chronicle 2, splunk 1)
  • \\\\ corpus 8 (sigma 8)
  • accepteula corpus 7 (sigma 3, kusto 3, splunk 1)