smbexec.py Service Installation

 Original Source: [Sigma source]
Title: smbexec.py Service Installation
Status: test
Description:Detects the use of smbexec.py tool by detecting a specific service installation
References:
  -https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-2-psexec-and-services/
  -https://github.com/fortra/impacket/blob/33058eb2fde6976ea62e04bc7d6b629d64d44712/examples/smbexec.py#L286-L296
  -https://github.com/fortra/impacket/blob/edef71f17bc1240f9f8c957bbda98662951ac3ec/examples/smbexec.py#L60
Author: Omer Faruk Celik
Date: 2018-03-20
modified:2023-11-09
Tags:
  • -'attack.lateral-movement'
  • -'attack.execution'
  • -'attack.t1021.002'
  • -'attack.t1569.002'
Logsource:
  • product: windows
  • service: system
Detection:
  selection_eid:
    Provider_Name: 'Service Control Manager'
    EventID: '7045'
  selection_service_name:
    ServiceName: 'BTOBTO'
  selection_service_image:
    ImagePath|contains:
      -'.bat & del '
      -'__output 2^>^&1 >'

  condition:selection_eid and 1 of selection_service_*
Falsepositives:
  -Unknown
Level: high