← Back to SOC feed Coverage →

PsExec/PAExec Escalation to LOCAL SYSTEM

sigma HIGH SigmaHQ
T1587.001
imProcessCreate
lateral-movement
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-05-22T23:00:00Z · Confidence: medium

Hunt Hypothesis

Detects suspicious commandline flags used by PsExec and PAExec to escalate a command line to LOCAL_SYSTEM rights

Detection Rule

Sigma (Original)

title: PsExec/PAExec Escalation to LOCAL SYSTEM
id: 8834e2f7-6b4b-4f09-8906-d2276470ee23
related:
    - id: 207b0396-3689-42d9-8399-4222658efc99 # Generic rule based on similar cli flags
      type: similar
status: test
description: Detects suspicious commandline flags used by PsExec and PAExec to escalate a command line to LOCAL_SYSTEM rights
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: 2021-11-23
modified: 2024-03-05
tags:
    - attack.resource-development
    - attack.t1587.001
logsource:
    category: process_creation
    product: windows
detection:
    selection_sys: # Escalation to LOCAL_SYSTEM
        CommandLine|contains|windash:
            # Note that you don't need to add the ".exe" part when using psexec/paexec
            # The "-" can also be replaced with "/"
            # The order of args isn't important
            # "cmd" can be replaced by "powershell", "pwsh" or any other console like software
            - ' -s cmd'
            - ' -s -i cmd'
            - ' -i -s cmd'
            # Pwsh (For PowerShell 7)
            - ' -s pwsh'
            - ' -s -i pwsh'
            - ' -i -s pwsh'
            # PowerShell (For PowerShell 5)
            - ' -s powershell'
            - ' -s -i powershell'
            - ' -i -s powershell'
    selection_other:
        CommandLine|contains:
            - 'psexec'
            - 'paexec'
            - 'accepteula'
    condition: all of selection_*
falsepositives:
    - Admins that use PsExec or PAExec to escalate to the SYSTEM account for maintenance purposes (rare)
    - Users that debug Microsoft Intune issues using the commands mentioned in the official documentation; see https://learn.microsoft.com/en-us/mem/intune/apps/intune-management-extension
level: high

KQL (Azure Sentinel)

imProcessCreate
| where (TargetProcessCommandLine contains " -s cmd" or TargetProcessCommandLine contains " /s cmd" or TargetProcessCommandLine contains " –s cmd" or TargetProcessCommandLine contains " —s cmd" or TargetProcessCommandLine contains " ―s cmd" or TargetProcessCommandLine contains " -s -i cmd" or TargetProcessCommandLine contains " -s /i cmd" or TargetProcessCommandLine contains " -s –i cmd" or TargetProcessCommandLine contains " -s —i cmd" or TargetProcessCommandLine contains " -s ―i cmd" or TargetProcessCommandLine contains " /s -i cmd" or TargetProcessCommandLine contains " /s /i cmd" or TargetProcessCommandLine contains " /s –i cmd" or TargetProcessCommandLine contains " /s —i cmd" or TargetProcessCommandLine contains " /s ―i cmd" or TargetProcessCommandLine contains " –s -i cmd" or TargetProcessCommandLine contains " –s /i cmd" or TargetProcessCommandLine contains " –s –i cmd" or TargetProcessCommandLine contains " –s —i cmd" or TargetProcessCommandLine contains " –s ―i cmd" or TargetProcessCommandLine contains " —s -i cmd" or TargetProcessCommandLine contains " —s /i cmd" or TargetProcessCommandLine contains " —s –i cmd" or TargetProcessCommandLine contains " —s —i cmd" or TargetProcessCommandLine contains " —s ―i cmd" or TargetProcessCommandLine contains " ―s -i cmd" or TargetProcessCommandLine contains " ―s /i cmd" or TargetProcessCommandLine contains " ―s –i cmd" or TargetProcessCommandLine contains " ―s —i cmd" or TargetProcessCommandLine contains " ―s ―i cmd" or TargetProcessCommandLine contains " -i -s cmd" or TargetProcessCommandLine contains " -i /s cmd" or TargetProcessCommandLine contains " -i –s cmd" or TargetProcessCommandLine contains " -i —s cmd" or TargetProcessCommandLine contains " -i ―s cmd" or TargetProcessCommandLine contains " /i -s cmd" or TargetProcessCommandLine contains " /i /s cmd" or TargetProcessCommandLine contains " /i –s cmd" or TargetProcessCommandLine contains " /i —s cmd" or TargetProcessCommandLine contains " /i ―s cmd" or TargetProcessCommandLine contains " –i -s cmd" or TargetProcessCommandLine contains " –i /s cmd" or TargetProcessCommandLine contains " –i –s cmd" or TargetProcessCommandLine contains " –i —s cmd" or TargetProcessCommandLine contains " –i ―s cmd" or TargetProcessCommandLine contains " —i -s cmd" or TargetProcessCommandLine contains " —i /s cmd" or TargetProcessCommandLine contains " —i –s cmd" or TargetProcessCommandLine contains " —i —s cmd" or TargetProcessCommandLine contains " —i ―s cmd" or TargetProcessCommandLine contains " ―i -s cmd" or TargetProcessCommandLine contains " ―i /s cmd" or TargetProcessCommandLine contains " ―i –s cmd" or TargetProcessCommandLine contains " ―i —s cmd" or TargetProcessCommandLine contains " ―i ―s cmd" or TargetProcessCommandLine contains " -s pwsh" or TargetProcessCommandLine contains " /s pwsh" or TargetProcessCommandLine contains " –s pwsh" or TargetProcessCommandLine contains " —s pwsh" or TargetProcessCommandLine contains " ―s pwsh" or TargetProcessCommandLine contains " -s -i pwsh" or TargetProcessCommandLine contains " -s /i pwsh" or TargetProcessCommandLine contains " -s –i pwsh" or TargetProcessCommandLine contains " -s —i pwsh" or TargetProcessCommandLine contains " -s ―i pwsh" or TargetProcessCommandLine contains " /s -i pwsh" or TargetProcessCommandLine contains " /s /i pwsh" or TargetProcessCommandLine contains " /s –i pwsh" or TargetProcessCommandLine contains " /s —i pwsh" or TargetProcessCommandLine contains " /s ―i pwsh" or TargetProcessCommandLine contains " –s -i pwsh" or TargetProcessCommandLine contains " –s /i pwsh" or TargetProcessCommandLine contains " –s –i pwsh" or TargetProcessCommandLine contains " –s —i pwsh" or TargetProcessCommandLine contains " –s ―i pwsh" or TargetProcessCommandLine contains " —s -i pwsh" or TargetProcessCommandLine contains " —s /i pwsh" or TargetProcessCommandLine contains " —s –i pwsh" or TargetProcessCommandLine contains " —s —i pwsh" or TargetProcessCommandLine contains " —s ―i pwsh" or TargetProcessCommandLine contains " ―s -i pwsh" or TargetProcessCommandLine contains " ―s /i pwsh" or TargetProcessCommandLine contains " ―s –i pwsh" or TargetProcessCommandLine contains " ―s —i pwsh" or TargetProcessCommandLine contains " ―s ―i pwsh" or TargetProcessCommandLine contains " -i -s pwsh" or TargetProcessCommandLine contains " -i /s pwsh" or TargetProcessCommandLine contains " -i –s pwsh" or TargetProcessCommandLine contains " -i —s pwsh" or TargetProcessCommandLine contains " -i ―s pwsh" or TargetProcessCommandLine contains " /i -s pwsh" or TargetProcessCommandLine contains " /i /s pwsh" or TargetProcessCommandLine contains " /i –s pwsh" or TargetProcessCommandLine contains " /i —s pwsh" or TargetProcessCommandLine contains " /i ―s pwsh" or TargetProcessCommandLine contains " –i -s pwsh" or TargetProcessCommandLine contains " –i /s pwsh" or TargetProcessCommandLine contains " –i –s pwsh" or TargetProcessCommandLine contains " –i —s pwsh" or TargetProcessCommandLine contains " –i ―s pwsh" or TargetProcessCommandLine contains " —i -s pwsh" or TargetProcessCommandLine contains " —i /s pwsh" or TargetProcessCommandLine contains " —i –s pwsh" or TargetProcessCommandLine contains " —i —s pwsh" or TargetProcessCommandLine contains " —i ―s pwsh" or TargetProcessCommandLine contains " ―i -s pwsh" or TargetProcessCommandLine contains " ―i /s pwsh" or TargetProcessCommandLine contains " ―i –s pwsh" or TargetProcessCommandLine contains " ―i —s pwsh" or TargetProcessCommandLine contains " ―i ―s pwsh" or TargetProcessCommandLine contains " -s powershell" or TargetProcessCommandLine contains " /s powershell" or TargetProcessCommandLine contains " –s powershell" or TargetProcessCommandLine contains " —s powershell" or TargetProcessCommandLine contains " ―s powershell" or TargetProcessCommandLine contains " -s -i powershell" or TargetProcessCommandLine contains " -s /i powershell" or TargetProcessCommandLine contains " -s –i powershell" or TargetProcessCommandLine contains " -s —i powershell" or TargetProcessCommandLine contains " -s ―i powershell" or TargetProcessCommandLine contains " /s -i powershell" or TargetProcessCommandLine contains " /s /i powershell" or TargetProcessCommandLine contains " /s –i powershell" or TargetProcessCommandLine contains " /s —i powershell" or TargetProcessCommandLine contains " /s ―i powershell" or TargetProcessCommandLine contains " –s -i powershell" or TargetProcessCommandLine contains " –s /i powershell" or TargetProcessCommandLine contains " –s –i powershell" or TargetProcessCommandLine contains " –s —i powershell" or TargetProcessCommandLine contains " –s ―i powershell" or TargetProcessCommandLine contains " —s -i powershell" or TargetProcessCommandLine contains " —s /i powershell" or TargetProcessCommandLine contains " —s –i powershell" or TargetProcessCommandLine contains " —s —i powershell" or TargetProcessCommandLine contains " —s ―i powershell" or TargetProcessCommandLine contains " ―s -i powershell" or TargetProcessCommandLine contains " ―s /i powershell" or TargetProcessCommandLine contains " ―s –i powershell" or TargetProcessCommandLine contains " ―s —i powershell" or TargetProcessCommandLine contains " ―s ―i powershell" or TargetProcessCommandLine contains " -i -s powershell" or TargetProcessCommandLine contains " -i /s powershell" or TargetProcessCommandLine contains " -i –s powershell" or TargetProcessCommandLine contains " -i —s powershell" or TargetProcessCommandLine contains " -i ―s powershell" or TargetProcessCommandLine contains " /i -s powershell" or TargetProcessCommandLine contains " /i /s powershell" or TargetProcessCommandLine contains " /i –s powershell" or TargetProcessCommandLine contains " /i —s powershell" or TargetProcessCommandLine contains " /i ―s powershell" or TargetProcessCommandLine contains " –i -s powershell" or TargetProcessCommandLine contains " –i /s powershell" or TargetProcessCommandLine contains " –i –s powershell" or TargetProcessCommandLine contains " –i —s powershell" or TargetProcessCommandLine contains " –i ―s powershell" or TargetProcessCommandLine contains " —i -s powershell" or TargetProcessCommandLine contains " —i /s powershell" or TargetProcessCommandLine contains " —i –s powershell" or TargetProcessCommandLine contains " —i —s powershell" or TargetProcessCommandLine contains " —i ―s powershell" or TargetProcessCommandLine contains " ―i -s powershell" or TargetProcessCommandLine contains " ―i /s powershell" or TargetProcessCommandLine contains " ―i –s powershell" or TargetProcessCommandLine contains " ―i —s powershell" or TargetProcessCommandLine contains " ―i ―s powershell") and (TargetProcessCommandLine contains "psexec" or TargetProcessCommandLine contains "paexec" or TargetProcessCommandLine contains "accepteula")

Required Data Sources

Sentinel TableNotes
imProcessCreateEnsure this data connector is enabled

False Positive Guidance

MITRE ATT&CK Context

References

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_sysinternals_psexec_paexec_escalate_system.yml