Remotely Started Services via RPC

edit

Identifies remote execution of Windows services over remote procedure call (RPC). This could be indicative of lateral movement, but will be noisy if commonly done by administrators."

Rule type: eql

Rule indices:

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

Severity: medium

Risk score: 47

Runs every: 5 minutes

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

Maximum alerts per execution: 100

Tags:

  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Lateral Movement

Version: 6 (version history)

Added (Elastic Stack release): 7.11.0

Last modified (Elastic Stack release): 8.4.0

Rule authors: Elastic

Rule license: Elastic License v2

Rule query

edit
sequence with maxspan=1s [network where process.name :
"services.exe" and network.direction : ("incoming", "ingress")
and network.transport == "tcp" and source.port >= 49152 and
destination.port >= 49152 and source.ip != "127.0.0.1" and source.ip
!= "::1" ] by host.id, process.entity_id [process where
event.type in ("start", "process_started") and process.parent.name :
"services.exe" and not (process.name : "svchost.exe" and
process.args : "tiledatamodelsvc") and not (process.name :
"msiexec.exe" and process.args : "/V") and not
process.executable :
("?:\\Windows\\ADCR_Agent\\adcrsvc.exe",
"?:\\Windows\\System32\\VSSVC.exe",
"?:\\Windows\\servicing\\TrustedInstaller.exe",
"?:\\Windows\\System32\\svchost.exe", "?:\\Program
Files (x86)\\*.exe", "?:\\Program Files\\*.exe",
"?:\\Windows\\PSEXESVC.EXE",
"?:\\Windows\\System32\\sppsvc.exe",
"?:\\Windows\\System32\\wbem\\WmiApSrv.exe",
"?:\\WINDOWS\\RemoteAuditService.exe",
"?:\\Windows\\VeeamVssSupport\\VeeamGuestHelper.exe",
"?:\\Windows\\VeeamLogShipper\\VeeamLogShipper.exe",
"?:\\Windows\\CAInvokerService.exe",
"?:\\Windows\\System32\\upfc.exe",
"?:\\Windows\\AdminArsenal\\PDQ*.exe",
"?:\\Windows\\System32\\vds.exe",
"?:\\Windows\\Veeam\\Backup\\VeeamDeploymentSvc.exe",
"?:\\Windows\\ProPatches\\Scheduler\\STSchedEx.exe",
"?:\\Windows\\System32\\certsrv.exe",
"?:\\Windows\\eset-remote-install-service.exe",
"?:\\Pella Corporation\\Pella Order Management\\GPAutoSvc.exe",
"?:\\Pella Corporation\\OSCToGPAutoService\\OSCToGPAutoSvc.exe",
"?:\\Pella Corporation\\Pella Order Management\\GPAutoSvc.exe",
"?:\\Windows\\SysWOW64\\NwxExeSvc\\NwxExeSvc.exe",
"?:\\Windows\\System32\\taskhostex.exe") ] by host.id,
process.parent.entity_id

Threat mapping

edit

Framework: MITRE ATT&CKTM

Rule version history

edit
Version 6 (8.4.0 release)
  • Updated query, changed from:

    sequence with maxspan=1s [network where process.name :
    "services.exe" and network.direction : ("incoming", "ingress")
    and network.transport == "tcp" and source.port >= 49152 and
    destination.port >= 49152 and source.ip != "127.0.0.1" and source.ip
    != "::1" ] by host.id, process.entity_id [process where
    event.type in ("start", "process_started") and process.parent.name :
    "services.exe" and not (process.name : "svchost.exe" and
    process.args : "tiledatamodelsvc") and not (process.name :
    "msiexec.exe" and process.args : "/V") /* uncomment if psexec
    is noisy in your environment */ /* and not process.name :
    "PSEXESVC.exe" */ ] by host.id, process.parent.entity_id
Version 4 (8.0.0 release)
  • Updated query, changed from:

    sequence with maxspan=1s [network where process.name :
    "services.exe" and network.direction : ("incoming", "ingress")
    and network.transport == "tcp" and source.port >= 49152 and
    destination.port >= 49152 and source.address not in ("127.0.0.1",
    "::1") ] by host.id, process.entity_id [process where
    event.type in ("start", "process_started") and process.parent.name :
    "services.exe" and not (process.name : "svchost.exe" and
    process.args : "tiledatamodelsvc") and not (process.name :
    "msiexec.exe" and process.args : "/V") /* uncomment if psexec
    is noisy in your environment */ /* and not process.name :
    "PSEXESVC.exe" */ ] by host.id, process.parent.entity_id
Version 3 (7.16.0 release)
  • Updated query, changed from:

    sequence with maxspan=1s [network where process.name :
    "services.exe" and network.direction == "incoming" and
    network.transport == "tcp" and source.port >= 49152 and
    destination.port >= 49152 and source.address not in ("127.0.0.1",
    "::1") ] by host.id, process.entity_id [process where
    event.type in ("start", "process_started") and process.parent.name :
    "services.exe" and not (process.name : "svchost.exe" and
    process.args : "tiledatamodelsvc") and not (process.name :
    "msiexec.exe" and process.args : "/V") /* uncomment if psexec
    is noisy in your environment */ /* and not process.name :
    "PSEXESVC.exe" */ ] by host.id, process.parent.entity_id
Version 2 (7.12.0 release)
  • Formatting only