# OffSet7: Silence.EDA Detection

> 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 collecting Microsoft-Windows-PowerShell/Operational 4104 (Script Block Logging)

## Building blocks

### BB:OffSet7:Silence EDA Detection:empire (match)
All test lines must match (AND).
- when **Message** contains: `System.Diagnostics.Process`, `Stop-Computer`, `Restart-Computer`, `Exception in execution`, `$cmdargs`, `Close-Dnscat2Tunnel`

### BB:OffSet7:Silence EDA Detection:dnscat (match)
All test lines must match (AND).
- when **Message** contains: `set type=$LookupType`nserver`, `$Command | nslookup 2>&1 | Out-String`, `New-RandomDNSField`, `[Convert]::ToString($SYNOptions, 16)`, `$Session.Dead = $True`, `$Session["Driver"] -eq`

## 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 collecting Microsoft-Windows-PowerShell/Operational 4104 (Script Block Logging)`
2. when an event matches the condition built from these building blocks: `BB:OffSet7:Silence EDA Detection:empire AND BB:OffSet7:Silence EDA Detection:dnscat`

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

1. when the event matches this AQL filter query: `devicetype=12 AND (LOWER(Message) LIKE '%system.diagnostics.process%' AND LOWER(Message) LIKE '%stop-computer%' AND LOWER(Message) LIKE '%restart-computer%' AND LOWER(Message) LIKE '%exception in execution%' AND LOWER(Message) LIKE '%$cmdargs%' AND LOWER(Message) LIKE '%close-dnscat2tunnel%') AND (LOWER(Message) LIKE '%set type=$lookuptype`nserver%' AND LOWER(Message) LIKE '%$command | nslookup 2>&1 | out-string%' AND LOWER(Message) LIKE '%new-randomdnsfield%' AND LOWER(Message) LIKE '%[convert]::tostring($synoptions, 16)%' AND LOWER(Message) LIKE '%$session.dead = $true%' AND LOWER(Message) LIKE '%$session["driver"] -eq%')`

## Rule response

- Severity 9, 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: Silence.EDA Detection (3ceb2083-a27f-449a-be33-14ec1b7cc973). Author: Alina Stepchenkova, Group-IB, oscd.community. Licence: DRL-1.1.
