# OffSet7: Potential Privilege Escalation To LOCAL SYSTEM

> Design for the QRadar Rule Wizard. Not an importable rule and not tested in QRadar.

- Rule type: Event rule (Local), create disabled
- Log source types: Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1

## Building blocks

### BB:OffSet7:Potential Privilege Escalation To LOCAL SYSTEM:selection (match)
All test lines must match (AND).
- when **Command** contains: ` -s cmd`, ` -s -i cmd`, ` -i -s cmd`, ` -s pwsh`, ` -s -i pwsh`, ` -i -s pwsh`, ` -s powershell`, ` -s -i powershell`, ` -i -s powershell`

### BB:OffSet7:Potential Privilege Escalation To LOCAL SYSTEM:filter_main_exclude_coverage (exclusion)
All test lines must match (AND).
- when **Command** contains: `paexec`, `PsExec`, `accepteula`

## Main rule — option A (building blocks)

1. when the event(s) were detected by one or more of these log source types: `Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1`
2. when an event matches the condition built from these building blocks: `BB:OffSet7:Potential Privilege Escalation To LOCAL SYSTEM:selection AND NOT (ANY of [BB:OffSet7:Potential Privilege Escalation To LOCAL SYSTEM:filter_main_exclude_coverage])`

## Main rule — option B (AQL filter test)

1. when the event matches this AQL filter query: `devicetype=12 AND (LOWER(Command) LIKE '% -s cmd%' OR LOWER(Command) LIKE '% /s cmd%' OR LOWER(Command) LIKE '% –s cmd%' OR LOWER(Command) LIKE '% —s cmd%' OR LOWER(Command) LIKE '% ―s cmd%' OR LOWER(Command) LIKE '% -s -i cmd%' OR LOWER(Command) LIKE '% -s /i cmd%' OR LOWER(Command) LIKE '% -s –i cmd%' OR LOWER(Command) LIKE '% -s —i cmd%' OR LOWER(Command) LIKE '% -s ―i cmd%' OR LOWER(Command) LIKE '% /s -i cmd%' OR LOWER(Command) LIKE '% /s /i cmd%' OR LOWER(Command) LIKE '% /s –i cmd%' OR LOWER(Command) LIKE '% /s —i cmd%' OR LOWER(Command) LIKE '% /s ―i cmd%' OR LOWER(Command) LIKE '% –s -i cmd%' OR LOWER(Command) LIKE '% –s /i cmd%' OR LOWER(Command) LIKE '% –s –i cmd%' OR LOWER(Command) LIKE '% –s —i cmd%' OR LOWER(Command) LIKE '% –s ―i cmd%' OR LOWER(Command) LIKE '% —s -i cmd%' OR LOWER(Command) LIKE '% —s /i cmd%' OR LOWER(Command) LIKE '% —s –i cmd%' OR LOWER(Command) LIKE '% —s —i cmd%' OR LOWER(Command) LIKE '% —s ―i cmd%' OR LOWER(Command) LIKE '% ―s -i cmd%' OR LOWER(Command) LIKE '% ―s /i cmd%' OR LOWER(Command) LIKE '% ―s –i cmd%' OR LOWER(Command) LIKE '% ―s —i cmd%' OR LOWER(Command) LIKE '% ―s ―i cmd%' OR LOWER(Command) LIKE '% -i -s cmd%' OR LOWER(Command) LIKE '% -i /s cmd%' OR LOWER(Command) LIKE '% -i –s cmd%' OR LOWER(Command) LIKE '% -i —s cmd%' OR LOWER(Command) LIKE '% -i ―s cmd%' OR LOWER(Command) LIKE '% /i -s cmd%' OR LOWER(Command) LIKE '% /i /s cmd%' OR LOWER(Command) LIKE '% /i –s cmd%' OR LOWER(Command) LIKE '% /i —s cmd%' OR LOWER(Command) LIKE '% /i ―s cmd%' OR LOWER(Command) LIKE '% –i -s cmd%' OR LOWER(Command) LIKE '% –i /s cmd%' OR LOWER(Command) LIKE '% –i –s cmd%' OR LOWER(Command) LIKE '% –i —s cmd%' OR LOWER(Command) LIKE '% –i ―s cmd%' OR LOWER(Command) LIKE '% —i -s cmd%' OR LOWER(Command) LIKE '% —i /s cmd%' OR LOWER(Command) LIKE '% —i –s cmd%' OR LOWER(Command) LIKE '% —i —s cmd%' OR LOWER(Command) LIKE '% —i ―s cmd%' OR LOWER(Command) LIKE '% ―i -s cmd%' OR LOWER(Command) LIKE '% ―i /s cmd%' OR LOWER(Command) LIKE '% ―i –s cmd%' OR LOWER(Command) LIKE '% ―i —s cmd%' OR LOWER(Command) LIKE '% ―i ―s cmd%' OR LOWER(Command) LIKE '% -s pwsh%' OR LOWER(Command) LIKE '% /s pwsh%' OR LOWER(Command) LIKE '% –s pwsh%' OR LOWER(Command) LIKE '% —s pwsh%' OR LOWER(Command) LIKE '% ―s pwsh%' OR LOWER(Command) LIKE '% -s -i pwsh%' OR LOWER(Command) LIKE '% -s /i pwsh%' OR LOWER(Command) LIKE '% -s –i pwsh%' OR LOWER(Command) LIKE '% -s —i pwsh%' OR LOWER(Command) LIKE '% -s ―i pwsh%' OR LOWER(Command) LIKE '% /s -i pwsh%' OR LOWER(Command) LIKE '% /s /i pwsh%' OR LOWER(Command) LIKE '% /s –i pwsh%' OR LOWER(Command) LIKE '% /s —i pwsh%' OR LOWER(Command) LIKE '% /s ―i pwsh%' OR LOWER(Command) LIKE '% –s -i pwsh%' OR LOWER(Command) LIKE '% –s /i pwsh%' OR LOWER(Command) LIKE '% –s –i pwsh%' OR LOWER(Command) LIKE '% –s —i pwsh%' OR LOWER(Command) LIKE '% –s ―i pwsh%' OR LOWER(Command) LIKE '% —s -i pwsh%' OR LOWER(Command) LIKE '% —s /i pwsh%' OR LOWER(Command) LIKE '% —s –i pwsh%' OR LOWER(Command) LIKE '% —s —i pwsh%' OR LOWER(Command) LIKE '% —s ―i pwsh%' OR LOWER(Command) LIKE '% ―s -i pwsh%' OR LOWER(Command) LIKE '% ―s /i pwsh%' OR LOWER(Command) LIKE '% ―s –i pwsh%' OR LOWER(Command) LIKE '% ―s —i pwsh%' OR LOWER(Command) LIKE '% ―s ―i pwsh%' OR LOWER(Command) LIKE '% -i -s pwsh%' OR LOWER(Command) LIKE '% -i /s pwsh%' OR LOWER(Command) LIKE '% -i –s pwsh%' OR LOWER(Command) LIKE '% -i —s pwsh%' OR LOWER(Command) LIKE '% -i ―s pwsh%' OR LOWER(Command) LIKE '% /i -s pwsh%' OR LOWER(Command) LIKE '% /i /s pwsh%' OR LOWER(Command) LIKE '% /i –s pwsh%' OR LOWER(Command) LIKE '% /i —s pwsh%' OR LOWER(Command) LIKE '% /i ―s pwsh%' OR LOWER(Command) LIKE '% –i -s pwsh%' OR LOWER(Command) LIKE '% –i /s pwsh%' OR LOWER(Command) LIKE '% –i –s pwsh%' OR LOWER(Command) LIKE '% –i —s pwsh%' OR LOWER(Command) LIKE '% –i ―s pwsh%' OR LOWER(Command) LIKE '% —i -s pwsh%' OR LOWER(Command) LIKE '% —i /s pwsh%' OR LOWER(Command) LIKE '% —i –s pwsh%' OR LOWER(Command) LIKE '% —i —s pwsh%' OR LOWER(Comm`

## Rule response

- Severity 7, credibility 6, relevance 7
- Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
- Respond no more than once per 30 minutes per Log Source (tune per environment)

## Limitations

- QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.

Source rule: Potential Privilege Escalation To LOCAL SYSTEM (207b0396-3689-42d9-8399-4222658efc99). Author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems). Licence: DRL-1.1.
