1200kmSECURITY RESEARCH

1200KM / sigma-rule

Metasploit Or Impacket Service Installation Via SMB PsExec — Sigma Rule

Sigma rule 6fb63b40-e02a-403e-9ffd-3bcc1d749442. Metasploit Or Impacket Service Installation Via SMB PsExec — Sigma Rule. Detects usage of Metasploit SMB PsExec (exploit/windows/smb/psexec) and Impacket psexec.py by triggering on specific service installation

Rule metadata and linked tags

Author: Bartlomiej Czyz, Relativity. Source status: test; severity: high. Source dates: 2021-01-21 / 2022-10-05.

{
  "product": "windows",
  "service": "security",
  "definition": "The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697"
}

Pinned original Sigma rule · Detection Rule License 1.1

Source SHA-256: 5a0e7f3c9b3b887769f3f4d497a15e2af61ec7cbc8c1c2f613ed5175d2b827ca

Detection logic

Original source YAML. Source-tag agreement is not proof of complete semantic coverage. This rule has not been compiled for a SIEM backend or validated against live telemetry here.

title: Metasploit Or Impacket Service Installation Via SMB PsExec
id: 6fb63b40-e02a-403e-9ffd-3bcc1d749442
related:
    - id: 1a17ce75-ff0d-4f02-9709-2b7bb5618cf0
      type: derived
status: test
description: Detects usage of Metasploit SMB PsExec (exploit/windows/smb/psexec) and Impacket psexec.py by triggering on specific service installation
references:
    - https://bczyz1.github.io/2021/01/30/psexec.html
author: Bartlomiej Czyz, Relativity
date: 2021-01-21
modified: 2022-10-05
tags:
    - attack.lateral-movement
    - attack.t1021.002
    - attack.t1570
    - attack.execution
    - attack.t1569.002
logsource:
    product: windows
    service: security
    definition: The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697
detection:
    selection:
        EventID: 4697
        ServiceFileName|re: '^%systemroot%\\[a-zA-Z]{8}\.exe$'
        ServiceName|re: '(^[a-zA-Z]{4}$)|(^[a-zA-Z]{8}$)|(^[a-zA-Z]{16}$)'
        ServiceStartType: 3  # on-demand start, see https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4697
        ServiceType: '0x10'
    filter:
        ServiceName: 'PSEXESVC'
    condition: selection and not filter
falsepositives:
    - Possible, different agents with a 8 character binary and a 4, 8 or 16 character service name
level: high

Original YAML and metadata in JSON

False positives

  • Possible, different agents with a 8 character binary and a 4, 8 or 16 character service name

Source references

Connected ecosystem references

Exact source-tagged techniques

Telemetry review

Read the original logsource above, then inspect the linked detection workspaces for technique-level sensor context. No per-rule telemetry equivalence is inferred.

Pinned research references. No browser attack runner, live simulation result or validated detector is asserted. Source mappings and validation limits are preserved. ATT&CK / Atomic provenance · Detection provenance.