# OffSet7: Suspicious File Downloaded From Direct IP Via Certutil.EXE

> 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:Suspicious File Downloaded From Direct IP Via Ce:selection_img (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: `\certutil.exe`
- when **Filename** is equal to (case-insensitive): `CertUtil.exe`

### BB:OffSet7:Suspicious File Downloaded From Direct IP Via Ce:selection_flags (match)
All test lines must match (AND).
- when **Command** contains: `urlcache`, `verifyctl`, `URL`

### BB:OffSet7:Suspicious File Downloaded From Direct IP Via Ce:selection_http (match)
All test lines must match (AND).
- when **Command** contains: `://1`, `://2`, `://3`, `://4`, `://5`, `://6`, `://7`, `://8`, `://9`

### BB:OffSet7:Suspicious File Downloaded From Direct IP Via Ce:filter_main_seven_zip (exclusion)
All test lines must match (AND).
- when **Command** contains: `://7-`

## 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:Suspicious File Downloaded From Direct IP Via Ce:selection_img, BB:OffSet7:Suspicious File Downloaded From Direct IP Via Ce:selection_flags, BB:OffSet7:Suspicious File Downloaded From Direct IP Via Ce:selection_http]) AND NOT (ANY of [BB:OffSet7:Suspicious File Downloaded From Direct IP Via Ce:filter_main_seven_zip])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND (((LOWER("Process Path") LIKE '%\certutil.exe' OR LOWER("Process Name") LIKE '%\certutil.exe') OR Filename='CertUtil.exe') AND (LOWER(Command) LIKE '%urlcache %' OR LOWER(Command) LIKE '%verifyctl %' OR LOWER(Command) LIKE '%url %') AND (LOWER(Command) LIKE '%://1%' OR LOWER(Command) LIKE '%://2%' OR LOWER(Command) LIKE '%://3%' OR LOWER(Command) LIKE '%://4%' OR LOWER(Command) LIKE '%://5%' OR LOWER(Command) LIKE '%://6%' OR LOWER(Command) LIKE '%://7%' OR LOWER(Command) LIKE '%://8%' OR LOWER(Command) LIKE '%://9%')) AND (NOT(LOWER(Command) LIKE '%://7-%'))`

## 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: Suspicious File Downloaded From Direct IP Via Certutil.EXE (13e6fe51-d478-4c7e-b0f2-6da9b400a829). Author: Nasreddine Bencherchali (Nextron Systems). Licence: DRL-1.1.
