Detection rules › Sigma
Privilege escalation via RunasCS
Detects scenarios where attack attempts to elevate privileges via customize Runas tool.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | T1134.002 Access Token Manipulation: Create Process with Token |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
title: Privilege escalation via RunasCS
description: Detects scenarios where attack attempts to elevate privileges via customize Runas tool.
correlation: correlation with ID 4648 can be done over SubjectLogonId in order to get more context.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0004-Privilege%20Escalation/T1134-Access%20Token%20Manipulation
- https://github.com/antonioCoco/RunasCs
- https://twitter.com/SBousseaden/status/1478373779642400783
tags:
- attack.privilege_escalation
- attack.t1134.002
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: process_creation
detection:
selection_process: # optional parameter with suspicious behavior reported by SBousseaden
EventID: 4688
TargetUserSid: S-1-0-0 # everyone
filter_user_process:
- TargetUserName:
- 'LOCAL SERVICE'
- 'Network Service'
- 'DWM-*'
- 'UMFD-*'
- 'sshd_*'
- '*$'
- 'DefaultAppPool'
- '-'
- TargetDomainName:
- 'NT Service'
- 'NT AUTHORITY'
- 'Font Driver Host'
- 'Window Manager'
- 'IIS APPPOOL'
- 'VIRTUAL USERS'
condition: selection_process and not filter_user_process
falsepositives:
- Administrator activity
level: low
Stages and Predicates
Stage 0: condition
selection_process and not filter_user_processStage 1: selection_process
selection_process:
EventID: 4688
TargetUserSid: S-1-0-0
Stage 2: not filter_user_process
filter_user_process:
- TargetUserName:
- 'LOCAL SERVICE'
- 'Network Service'
- 'DWM-*'
- 'UMFD-*'
- 'sshd_*'
- '*$'
- 'DefaultAppPool'
- '-'
- TargetDomainName:
- 'NT Service'
- 'NT AUTHORITY'
- 'Font Driver Host'
- 'Window Manager'
- 'IIS APPPOOL'
- 'VIRTUAL USERS'
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
TargetDomainName | eq | Font Driver Host |
TargetDomainName | eq | IIS APPPOOL |
TargetDomainName | eq | NT AUTHORITY |
TargetDomainName | eq | NT Service |
TargetDomainName | eq | VIRTUAL USERS |
TargetDomainName | eq | Window Manager |
TargetUserName | eq | *$ |
TargetUserName | eq | - |
TargetUserName | eq | DWM-* |
TargetUserName | eq | DefaultAppPool |
TargetUserName | eq | LOCAL SERVICE |
TargetUserName | eq | Network Service |
TargetUserName | eq | UMFD-* |
TargetUserName | eq | sshd_* |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
TargetUserSid | eq |
|