← Back to SOC feed Coverage →

PSEXEC Remote Execution File Artefact

sigma HIGH SigmaHQ
T1136.002T1543.003T1570
imFileEvent
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-03-25T03:05:59Z · Confidence: medium

Hunt Hypothesis

The PSEXEC Remote Execution File Artefact detects adversaries using PsExec to execute commands remotely by creating a key file on the target system, which is a common indicator of lateral movement and command and control activity. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential compromise and mitigate the risk of persistent, stealthy attacks.

Detection Rule

Sigma (Original)

title: PSEXEC Remote Execution File Artefact
id: 304afd73-55a5-4bb9-8c21-0b1fc84ea9e4
status: test
description: Detects creation of the PSEXEC key file. Which is created anytime a PsExec command is executed. It gets written to the file system and will be recorded in the USN Journal on the target system
references:
    - https://aboutdfir.com/the-key-to-identify-psexec/
    - https://twitter.com/davisrichardg/status/1616518800584704028
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-21
modified: 2023-02-23
tags:
    - attack.lateral-movement
    - attack.privilege-escalation
    - attack.execution
    - attack.persistence
    - attack.t1136.002
    - attack.t1543.003
    - attack.t1570
    - attack.s0029
logsource:
    category: file_event
    product: windows
detection:
    selection:
        TargetFilename|startswith: 'C:\Windows\PSEXEC-'
        TargetFilename|endswith: '.key'
    condition: selection
falsepositives:
    - Unlikely
level: high

KQL (Azure Sentinel)

imFileEvent
| where TargetFileName startswith "C:\\Windows\\PSEXEC-" and TargetFileName endswith ".key"

False Positive Guidance

MITRE ATT&CK Context

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_sysinternals_psexec_service_key.yml