# OffSet7: Suspicious Windows Service Tampering

> 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 Windows Service Tampering:selection_tools_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 **Filename** is equal to (case-insensitive): `net.exe`, `net1.exe`, `PowerShell_ISE.EXE`, `PowerShell.EXE`, `psservice.exe`, `pwsh.dll`, `sc.exe`, `wmic.exe`
- when **Process Path / Process Name** ends with: `\net.exe`, `\net1.exe`, `\PowerShell_ISE.EXE`, `\powershell.exe`, `\PsService.exe`, `\PsService64.exe`, `\pwsh.exe`, `\sc.exe`, `\wmic.exe`

### BB:OffSet7:Suspicious Windows Service Tampering:selection_tools_cli (match)
Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.
- when **Command** contains: ` delete`, `.delete()`, ` pause`, ` stop`, `Stop-Service`, `Remove-Service`
- when **Command** contains: `config`, `start=disabled`

### BB:OffSet7:Suspicious Windows Service Tampering:selection_services (match)
All test lines must match (AND).
- when **Command** contains: `143Svc`, `aakore`, `Acronis VSS Provider`, `AcronisActiveProtectionService`, `AcronisAgent`, `AcronisCyberProtectionService`, `AcrSch2Svc`, `AdobeARMservice`, `AHS Service`, `Antivirus`, `Apache4`, `ARSM`, `aswBcc`, `AteraAgent`, `Avast Business Console Client Antivirus Service`, `avast! Antivirus`, `AVG Antivirus`, `avgAdminClient`, `AvgAdminServer`, `AVP1`, `BackupExec`, `bedbg`, `BITS`, `BrokerInfrastructure`, `CASLicenceServer`, `CASWebServer`, `Client Agent 7.60`, `Core Browsing Protection`, `Core Mail Protection`, `Core Scanning Server`, `DCAgent`, `dwmrcs`, `EhttpSr`, `ekrn`, `Enterprise Client Service`, `epag`, `EPIntegrationService`, `EPProtectedService`, `EPRedline`, `EPSecurityService`

## 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 Windows Service Tampering:selection_tools_img, BB:OffSet7:Suspicious Windows Service Tampering:selection_tools_cli, BB:OffSet7:Suspicious Windows Service Tampering:selection_services])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND ((Filename IN('net.exe', 'net1.exe', 'PowerShell_ISE.EXE', 'PowerShell.EXE', 'psservice.exe', 'pwsh.dll', 'sc.exe', 'wmic.exe')) OR ((LOWER("Process Path") LIKE '%\net.exe' OR LOWER("Process Path") LIKE '%\net1.exe' OR LOWER("Process Path") LIKE '%\powershell_ise.exe' OR LOWER("Process Path") LIKE '%\powershell.exe' OR LOWER("Process Path") LIKE '%\psservice.exe' OR LOWER("Process Path") LIKE '%\psservice64.exe' OR LOWER("Process Path") LIKE '%\pwsh.exe' OR LOWER("Process Path") LIKE '%\sc.exe' OR LOWER("Process Path") LIKE '%\wmic.exe') OR (LOWER("Process Name") LIKE '%\net.exe' OR LOWER("Process Name") LIKE '%\net1.exe' OR LOWER("Process Name") LIKE '%\powershell_ise.exe' OR LOWER("Process Name") LIKE '%\powershell.exe' OR LOWER("Process Name") LIKE '%\psservice.exe' OR LOWER("Process Name") LIKE '%\psservice64.exe' OR LOWER("Process Name") LIKE '%\pwsh.exe' OR LOWER("Process Name") LIKE '%\sc.exe' OR LOWER("Process Name") LIKE '%\wmic.exe'))) AND ((LOWER(Command) LIKE '% delete %' OR LOWER(Command) LIKE '%.delete()%' OR LOWER(Command) LIKE '% pause %' OR LOWER(Command) LIKE '% stop %' OR LOWER(Command) LIKE '%stop-service %' OR LOWER(Command) LIKE '%remove-service %') OR (LOWER(Command) LIKE '%config%' AND LOWER(Command) LIKE '%start=disabled%')) AND (LOWER(Command) LIKE '%143svc%' OR LOWER(Command) LIKE '%aakore%' OR LOWER(Command) LIKE '%acronis vss provider%' OR LOWER(Command) LIKE '%acronisactiveprotectionservice%' OR LOWER(Command) LIKE '%acronisagent%' OR LOWER(Command) LIKE '%acroniscyberprotectionservice%' OR LOWER(Command) LIKE '%acrsch2svc%' OR LOWER(Command) LIKE '%adobearmservice%' OR LOWER(Command) LIKE '%ahs service%' OR LOWER(Command) LIKE '%antivirus%' OR LOWER(Command) LIKE '%apache4%' OR LOWER(Command) LIKE '%arsm%' OR LOWER(Command) LIKE '%aswbcc%' OR LOWER(Command) LIKE '%ateraagent%' OR LOWER(Command) LIKE '%avast business console client antivirus service%' OR LOWER(Command) LIKE '%avast! antivirus%' OR LOWER(Command) LIKE '%avg antivirus%' OR LOWER(Command) LIKE '%avgadminclient%' OR LOWER(Command) LIKE '%avgadminserver%' OR LOWER(Command) LIKE '%avp1%' OR LOWER(Command) LIKE '%backupexec%' OR LOWER(Command) LIKE '%bedbg%' OR LOWER(Command) LIKE '%bits%' OR LOWER(Command) LIKE '%brokerinfrastructure%' OR LOWER(Command) LIKE '%caslicenceserver%' OR LOWER(Command) LIKE '%caswebserver%' OR LOWER(Command) LIKE '%client agent 7.60%' OR LOWER(Command) LIKE '%core browsing protection%' OR LOWER(Command) LIKE '%core mail protection%' OR LOWER(Command) LIKE '%core scanning server%' OR LOWER(Command) LIKE '%dcagent%' OR LOWER(Command) LIKE '%dwmrcs%' OR LOWER(Command) LIKE '%ehttpsr%' OR LOWER(Command) LIKE '%ekrn%' OR LOWER(Command) LIKE '%enterprise client service%' OR LOWER(Command) LIKE '%epag%' OR LOWER(Command) LIKE '%epintegrationservice%' OR LOWER(Command) LIKE '%epprotectedservice%' OR LOWER(Command) LIKE '%epredline%' OR LOWER(Command) LIKE '%epsecurityservice%' OR LOWER(Command) LIKE '%epupdateservice%' OR LOWER(Command) LIKE '%erasersvc11710%' OR LOWER(Command) LIKE '%esgshkernel%' OR LOWER(Command) LIKE '%eshasrv%' OR LOWER(Command) LIKE '%fa_scheduler%' OR LOWER(Command) LIKE '%firebirdguardiandefaultinstance%' OR LOWER(Command) LIKE '%firebirdserverdefaultinstance%' OR LOWER(Command) LIKE '%fontcache3.0.0.0%' OR LOWER(Command) LIKE '%healthtlservice%' OR LOWER(Command) LIKE '%hmpalertsvc%' OR LOWER(Command) LIKE '%hms%' OR LOWER(Command) LIKE '%hostcontrollerservice%' OR LOWER(Command) LIKE '%hvdsvc%' OR LOWER(Command) LIKE '%iastordatamgrsvc%' OR LOWER(Command) LIKE '%ibmhps%' OR LOWER(Command) LIKE '%ibmspsvc%' OR LOWER(Command) LIKE '%iisadmin%' OR LOWER(Command) LIKE '%imansvc%' OR LOWER(Command) LIKE '%imap4svc%' OR LOWER(Command) LIKE '%instance2%' OR LOWER(Command) LIKE '%kavfs%' OR LOWER(Command) LIKE '%kavfsgt%' OR LOWER(Command) LIKE '%kavfsslp%' OR LOWER(Command) LIKE '%keyiso%' OR LOWER(Command) LIKE '%klbackupdisk%' OR LOWER(Command) LIKE '%klbackupflt%' OR LOWER(Com`

## 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 Windows Service Tampering (ce72ef99-22f1-43d4-8695-419dcb5d9330). Author: Nasreddine Bencherchali (Nextron Systems), frack113 , X__Junior (Nextron Systems). Licence: DRL-1.1.
