# OffSet7: Potential CobaltStrike Process Patterns

> 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 CobaltStrike Process Patterns:selection_generic_1 (match)
All test lines must match (AND).
- when **Command** ends with: `cmd.exe /C whoami`
- when **Parent Process Path** starts with: `C:\Temp\`

### BB:OffSet7:Potential CobaltStrike Process Patterns:selection_generic_2 (match)
All test lines must match (AND).
- when **Parent Process Path** ends with: `\runonce.exe`, `\dllhost.exe`
- when **Command** contains: `cmd.exe /c echo`, `> \\\\.\\pipe`

### BB:OffSet7:Potential CobaltStrike Process Patterns:selection_conhost_1 (match)
All test lines must match (AND).
- when **Parent Command** contains: `cmd.exe /C echo`, ` > \\\\.\\pipe`
- when **Command** ends with: `conhost.exe 0xffffffff -ForceV1`

### BB:OffSet7:Potential CobaltStrike Process Patterns:selection_conhost_2 (match)
All test lines must match (AND).
- when **Parent Command** ends with: `/C whoami`
- when **Command** ends with: `conhost.exe 0xffffffff -ForceV1`

## 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: `(ANY of [BB:OffSet7:Potential CobaltStrike Process Patterns:selection_generic_1, BB:OffSet7:Potential CobaltStrike Process Patterns:selection_generic_2, BB:OffSet7:Potential CobaltStrike Process Patterns:selection_conhost_1, BB:OffSet7:Potential CobaltStrike Process Patterns:selection_conhost_2])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND ((LOWER(Command) LIKE '%cmd.exe /c whoami' AND LOWER("Parent Process Path") LIKE 'c:\temp\%') OR ((LOWER("Parent Process Path") LIKE '%\runonce.exe' OR LOWER("Parent Process Path") LIKE '%\dllhost.exe') AND (LOWER(Command) LIKE '%cmd.exe /c echo%' AND LOWER(Command) LIKE '%> \\.\pipe%')) OR ((LOWER("Parent Command") LIKE '%cmd.exe /c echo%' AND LOWER("Parent Command") LIKE '% > \\.\pipe%') AND LOWER(Command) LIKE '%conhost.exe 0xffffffff -forcev1') OR (LOWER("Parent Command") LIKE '%/c whoami' AND LOWER(Command) LIKE '%conhost.exe 0xffffffff -forcev1'))`

## 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 CobaltStrike Process Patterns (f35c5d71-b489-4e22-a115-f003df287317). Author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems). Licence: DRL-1.1.
