title: PowerShell Scripts Installed as Services
id: 2a926e6a-4b81-4011-8a96-e36cc8c04302
related:
    - id: a2e5019d-a658-4c6a-92bf-7197b54e2cae
      type: derived
description: Detects powershell script installed as a Service
status: experimental
author: oscd.community, Natalia Shornikova
date: 2020/10/06
modified: 2021/09/21
references:
    - https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse
tags:
    - attack.execution
    - attack.t1569.002
logsource:
    product: windows
    service: security
detection:
    powershell_as_service:
        EventID: 4697
        ServiceFileName|contains: 
          - 'powershell'
          - 'pwsh'
    condition: powershell_as_service
falsepositives:
    - Unknown
level: high