# OffSet7: Disable Important Scheduled Task

> 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:Disable Important Scheduled Task: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: `\schtasks.exe`
- when **Filename** is equal to (case-insensitive): `schtasks.exe`

### BB:OffSet7:Disable Important Scheduled Task:selection_cli_disable (match)
All test lines must match (AND).
- when **Command** contains: `/disable`

### BB:OffSet7:Disable Important Scheduled Task:selection_cli_task (match)
All test lines must match (AND).
- when **Command** contains: `\Windows\BitLocker`, `\Windows\ExploitGuard`, `\Windows\ExploitGuard\ExploitGuard MDM policy Refresh`, `\Windows\SystemRestore\SR`, `\Windows\UpdateOrchestrator\`, `\Windows\Windows Defender\`, `\Windows\WindowsBackup\`, `\Windows\WindowsUpdate\`

## 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:Disable Important Scheduled Task:selection_img, BB:OffSet7:Disable Important Scheduled Task:selection_cli_disable, BB:OffSet7:Disable Important Scheduled Task:selection_cli_task])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND ((LOWER("Process Path") LIKE '%\schtasks.exe' OR LOWER("Process Name") LIKE '%\schtasks.exe') OR Filename='schtasks.exe') AND (LOWER(Command) LIKE '%-disable%' OR LOWER(Command) LIKE '%/disable%' OR LOWER(Command) LIKE '%–disable%' OR LOWER(Command) LIKE '%—disable%' OR LOWER(Command) LIKE '%―disable%') AND (LOWER(Command) LIKE '%\windows\bitlocker%' OR LOWER(Command) LIKE '%\windows\exploitguard%' OR LOWER(Command) LIKE '%\windows\exploitguard\exploitguard mdm policy refresh%' OR LOWER(Command) LIKE '%\windows\systemrestore\sr%' OR LOWER(Command) LIKE '%\windows\updateorchestrator\%' OR LOWER(Command) LIKE '%\windows\windows defender\%' OR LOWER(Command) LIKE '%\windows\windowsbackup\%' OR LOWER(Command) LIKE '%\windows\windowsupdate\%')`

## 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: Disable Important Scheduled Task (9ac94dc8-9042-493c-ba45-3b5e7c86b980). Author: frack113, Nasreddine Bencherchali (Nextron Systems), X__Junior. Licence: DRL-1.1.
