# OffSet7: Potentially Suspicious NTFS Symlink Behavior Modification

> 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:Potentially Suspicious NTFS Symlink Behavior Mod:selection_img_proxy (match)
Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.
- when **Process Path / Process Name** ends with: `\cmd.exe`, `\powershell.exe`, `\pwsh.exe`
- when **Filename** is equal to (case-insensitive): `Cmd.Exe`, `PowerShell.EXE`, `pwsh.dll`

### BB:OffSet7:Potentially Suspicious NTFS Symlink Behavior Mod:selection_fsutil_cli (match)
All test lines must match (AND).
- when **Command** contains: `fsutil`, `behavior`, `set`, `SymlinkEvaluation`

### BB:OffSet7:Potentially Suspicious NTFS Symlink Behavior Mod:selection_symlink_params (match)
All test lines must match (AND).
- when **Command** contains: `R2L:1`, `R2R:1`, `L2L:1`

## 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:Potentially Suspicious NTFS Symlink Behavior Mod:selection_img_proxy, BB:OffSet7:Potentially Suspicious NTFS Symlink Behavior Mod:selection_fsutil_cli, BB:OffSet7:Potentially Suspicious NTFS Symlink Behavior Mod:selection_symlink_params])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND (((LOWER("Process Path") LIKE '%\cmd.exe' OR LOWER("Process Path") LIKE '%\powershell.exe' OR LOWER("Process Path") LIKE '%\pwsh.exe') OR (LOWER("Process Name") LIKE '%\cmd.exe' OR LOWER("Process Name") LIKE '%\powershell.exe' OR LOWER("Process Name") LIKE '%\pwsh.exe')) OR (Filename IN('Cmd.Exe', 'PowerShell.EXE', 'pwsh.dll'))) AND (LOWER(Command) LIKE '%fsutil%' AND LOWER(Command) LIKE '%behavior%' AND LOWER(Command) LIKE '%set%' AND LOWER(Command) LIKE '%symlinkevaluation%') AND (LOWER(Command) LIKE '%r2l:1%' OR LOWER(Command) LIKE '%r2r:1%' OR LOWER(Command) LIKE '%l2l:1%')`

## Rule response

- Severity 5, 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: Potentially Suspicious NTFS Symlink Behavior Modification (c0b2768a-dd06-4671-8339-b16ca8d1f27f). Author: frack113, The DFIR Report. Licence: DRL-1.1.
