# OffSet7: User Added to Remote Desktop Users Group

> 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:User Added to Remote Desktop Users Group:selection_main (match)
Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.
- when **Command** contains: `localgroup`, ` /add`
- when **Command** contains: `Add-LocalGroupMember`, ` -Group`

### BB:OffSet7:User Added to Remote Desktop Users Group:selection_group (match)
All test lines must match (AND).
- when **Command** contains: `Remote Desktop Users`, `Utilisateurs du Bureau à distance`, `Usuarios de escritorio remoto`

## 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: `(ALL of [BB:OffSet7:User Added to Remote Desktop Users Group:selection_main, BB:OffSet7:User Added to Remote Desktop Users Group:selection_group])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND ((LOWER(Command) LIKE '%localgroup %' AND LOWER(Command) LIKE '% /add%') OR (LOWER(Command) LIKE '%add-localgroupmember %' AND LOWER(Command) LIKE '% -group %')) AND (LOWER(Command) LIKE '%remote desktop users%' OR LOWER(Command) LIKE '%utilisateurs du bureau à distance%' OR LOWER(Command) LIKE '%usuarios de escritorio remoto%')`

## 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: User Added to Remote Desktop Users Group (ffa28e60-bdb1-46e0-9f82-05f7a61cc06e). Author: Florian Roth (Nextron Systems). Licence: DRL-1.1.
