Detection rules › Sigma

ServiceDll Hijack

Severity
medium
Author
frack113
Source
upstream

Detects changes to the "ServiceDLL" value related to a service in the registry. This is often used as a method of persistence.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1543.003 Create or Modify System Process: Windows Service
Privilege EscalationT1543.003 Create or Modify System Process: Windows Service

Event coverage

ProviderEvent IDTitle
Sysmon13RegistryEvent (Value Set)

Stages and Predicates

Stage 1: selection

TargetObject|endswith: '\Parameters\ServiceDll'
TargetObject|contains: ControlSet
TargetObject|contains: '\Services\'
TargetObject|contains: '\System\'

Stage 2: not 1 of filter_main_*

or:
Details: '%%systemroot%%\system32\ntdsa.dll'
Image: 'C:\Windows\system32\lsass.exe'
TargetObject|endswith: '\Services\NTDS\Parameters\ServiceDll'
Details: 'C:\Windows\system32\spool\drivers\x64\3\PrintConfig.dll'
Image: 'C:\Windows\System32\poqexec.exe'

Stage 3: not 1 of filter_optional_safetica

Details: 'C:\Windows\System32\STAgent.dll'
Image|endswith: '\regsvr32.exe'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Detailseq
  • %%systemroot%%\system32\ntdsa.dll corpus 2 (sigma 2)
  • C:\Windows\System32\STAgent.dll
  • C:\Windows\system32\spool\drivers\x64\3\PrintConfig.dll
Imageends_with
  • \regsvr32.exe corpus 57 (sigma 57)
Imageeq
  • C:\Windows\System32\poqexec.exe corpus 7 (sigma 7)
  • C:\Windows\system32\lsass.exe corpus 2 (sigma 2)
TargetObjectends_with
  • \Parameters\ServiceDll
  • \Services\NTDS\Parameters\ServiceDll
TargetObjectmatch
  • ControlSet corpus 2 (sigma 2)
  • \Services\ corpus 3 (sigma 3)
  • \System\