
title: Possible Privilege Escalation via Weak Service Permissions
author: Teymur Kheirkhabarov
date: 2019/10/26
description: Detection of sc.exe utility spawning by user with Medium integrity level
  to change service ImagePath or FailureCommand
detection:
  SELECTION_1:
    EventID: 1
  SELECTION_2:
    Image: '*\sc.exe'
  SELECTION_3:
    IntegrityLevel: Medium
  SELECTION_4:
    CommandLine: '*config*'
  SELECTION_5:
    CommandLine: '*binPath*'
  SELECTION_6:
    CommandLine: '*failure*'
  SELECTION_7:
    CommandLine: '*command*'
  condition: (SELECTION_1 and SELECTION_2 and SELECTION_3 and ((SELECTION_4 and SELECTION_5)
    or (SELECTION_6 and SELECTION_7)))
falsepositives:
- Unknown
id: d937b75f-a665-4480-88a5-2f20e9f9b22a
level: high
logsource:
  category: process_creation
  product: windows
modified: 2020/08/29
references:
- https://speakerdeck.com/heirhabarov/hunting-for-privilege-escalation-in-windows-environment
- https://pentestlab.blog/2017/03/30/weak-service-permissions/
status: experimental
tags:
- attack.persistence
- attack.defense_evasion
- attack.privilege_escalation
- attack.t1574.011
ruletype: SIGMA
