Unusual Persistence via Services Registryedit

Identifies processes modifying the services registry key directly, instead of through the expected Windows APIs. This could be an indication of an adversary attempting to stealthily persist through abnormal service creation or modification of an existing service.

Rule type: eql

Rule indices:

  • winlogbeat-*
  • logs-endpoint.events.*
  • logs-windows.*

Severity: low

Risk score: 21

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100


  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Persistence

Version: 3 (version history)

Added (Elastic Stack release): 7.11.0

Last modified (Elastic Stack release): 7.12.0

Rule authors: Elastic

Rule license: Elastic License v2

Rule queryedit

registry where registry.path :
"HKLM\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath") and not
registry.data.strings : ("C:\\windows\\system32\\Drivers\\*.sys",
"system32\\DRIVERS\\USBSTOR") and not (process.name :
"procexp??.exe" and registry.data.strings : "C:\\*\\procexp*.sys") and
not process.executable : ("C:\\Program Files*\\*.exe",

Threat mappingedit


Rule version historyedit

Version 3 (7.12.0 release)
  • Formatting only
Version 2 (7.11.2 release)
  • Formatting only