
title: Non-privileged Usage of Reg or Powershell
author: Teymur Kheirkhabarov (idea), Ryan Plas (rule), oscd.community
date: 2020/10/05
description: Search for usage of reg or Powershell by non-priveleged users to modify
  service configuration in registry
detection:
  SELECTION_1:
    EventID: 1
  SELECTION_2:
    IntegrityLevel: Medium
  SELECTION_3:
    CommandLine: '*reg*'
  SELECTION_4:
    CommandLine: '*add*'
  SELECTION_5:
    CommandLine: '*powershell*'
  SELECTION_6:
    CommandLine:
    - '*set-itemproperty*'
    - '* sp *'
    - '*new-itemproperty*'
  SELECTION_7:
    CommandLine: '*ControlSet*'
  SELECTION_8:
    CommandLine: '*Services*'
  SELECTION_9:
    CommandLine:
    - '*ImagePath*'
    - '*FailureCommand*'
    - '*ServiceDLL*'
  condition: (SELECTION_1 and SELECTION_2 and ((SELECTION_3 and SELECTION_4) or (SELECTION_5
    and SELECTION_6)) and SELECTION_7 and SELECTION_8 and SELECTION_9)
falsepositives:
- Unknown
fields:
- EventID
- IntegrityLevel
- CommandLine
id: 8f02c935-effe-45b3-8fc9-ef8696a9e41d
level: high
logsource:
  category: process_creation
  product: windows
references:
- https://image.slidesharecdn.com/kheirkhabarovoffzonefinal-181117201458/95/hunting-for-privilege-escalation-in-windows-environment-20-638.jpg
status: experimental
tags:
- attack.defense_evasion
- attack.t1112
ruletype: SIGMA
