T1543 Elastic Security · Elastic

Detect Create or Modify System Process in Elastic Security

Adversaries may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. When operating systems boot up, they can start processes that perform background system functions. On Windows and Linux, these system processes are referred to as services. On macOS, launchd processes known as Launch Daemon and Launch Agent are run to finish system initialization and load user specific parameters. Adversaries may install new services, daemons, or agents that can be configured to execute at startup or a repeatable interval in order to establish persistence. Similarly, adversaries may modify existing services, daemons, or agents to achieve the same effect. Services, daemons, or agents may be created with administrator privileges but executed under root/SYSTEM privileges. Adversaries may leverage this functionality to create or modify system processes in order to escalate privileges.

MITRE ATT&CK

Tactic
Persistence Privilege Escalation
Technique
T1543 Create or Modify System Process
Canonical reference
https://attack.mitre.org/techniques/T1543/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=5m
  [any where event.category == "process" and
   (
     (process.name : "sc.exe" and process.args : ("create", "config")) or
     (process.name : ("powershell.exe", "pwsh.exe") and process.args : ("New-Service", "Set-Service", "sc.exe"))
   )
  ] by process.entity_id

sequence by host.name with maxspan=1m
  [process where event.type == "start" and
   process.name : "sc.exe" and process.args : "create" and
   process.parent.name : ("winword.exe", "excel.exe", "powerpnt.exe", "outlook.exe",
                           "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe")
  ]

process where event.type == "start" and
(
  (
    process.name : "sc.exe" and
    process.args : ("create", "config") and
    not process.parent.name : ("services.exe", "svchost.exe", "msiexec.exe")
  ) or
  (
    process.name : ("powershell.exe", "pwsh.exe") and
    process.args : ("New-Service", "Set-Service")
  ) or
  (
    process.name : "sc.exe" and process.args : "create" and
    process.parent.name : ("winword.exe", "excel.exe", "powerpnt.exe", "outlook.exe",
                            "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe")
  )
) or
registry where event.type in ("creation", "change") and
  registry.path : "HKLM\\SYSTEM\\CurrentControlSet\\Services\\*\\ImagePath" and
  (
    registry.data.strings : ("*\\Temp\\*", "*\\AppData\\*", "*\\Downloads\\*",
                              "*\\Public\\*", "%TEMP%*", "%APPDATA%*") or
    registry.data.strings : ("*powershell.exe*", "*cmd.exe*", "*wscript.exe*",
                              "*cscript.exe*", "*mshta.exe*", "*regsvr32.exe*",
                              "*rundll32.exe*", "*certutil.exe*", "*bitsadmin.exe*")
  ) or
registry where event.type in ("creation", "change") and
  registry.path : "HKLM\\SYSTEM\\CurrentControlSet\\Services\\*\\Start" and
  registry.data.strings : ("2", "0") and
  not process.name : ("services.exe", "svchost.exe", "msiexec.exe",
                       "TrustedInstaller.exe", "WmiPrvSE.exe", "MsMpEng.exe")
high severity high confidence

Detects creation or modification of Windows system services via sc.exe, PowerShell New-Service/Set-Service, or direct registry writes to HKLM\SYSTEM\CurrentControlSet\Services. Covers service binaries placed in suspicious paths, LOLBin-based services, services created by Office or script interpreter parents, and autostart service registrations by non-standard processes.

Data Sources

Elastic Endpoint SecurityWinlogbeat with SysmonWindows Security Event Logs

Required Tables

logs-endpoint.events.process-*logs-endpoint.events.registry-*winlogbeat-*

False Positives & Tuning

  • Legitimate software installers (MSI packages, setup.exe) frequently create services during installation — filter by process.parent.name of msiexec.exe or setup-related processes
  • IT administration tools such as SCCM, Ansible, or Puppet may create or modify services as part of configuration management — build allowlists for known admin tool paths and accounts
  • Security products (EDR agents, AV engines) routinely register autostart services during updates — whitelist known security vendor process names and signed binary paths
Download portable Sigma rule (.yml)

Other platforms for T1543


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Create Malicious Windows Service via sc.exe

    Expected signal: Security Event ID 4697 and System Event ID 7045: New service 'ArgusTestSvc' installed with ServiceFileName containing cmd.exe. Sysmon Event ID 1: sc.exe process creation with CommandLine containing 'create ArgusTestSvc'. Sysmon Event ID 13: Registry value set at HKLM\SYSTEM\CurrentControlSet\Services\ArgusTestSvc\ImagePath.

  2. Test 2Create Persistent Service via PowerShell New-Service

    Expected signal: Sysmon Event ID 1: powershell.exe process creation with CommandLine containing 'New-Service'. Security Event ID 4697 and System Event ID 7045: service 'ArgusTestPSSvc' installed with ServiceFileName = powershell.exe. Sysmon Event ID 13: registry modification at HKLM\SYSTEM\CurrentControlSet\Services\ArgusTestPSSvc\.

  3. Test 3Service Installed in User-Writable Path

    Expected signal: Sysmon Event ID 11: file created at %TEMP%\svchost32.exe (copy of cmd.exe). Sysmon Event ID 1: sc.exe execution with TEMP path in command line. Security Event ID 4697 / System Event ID 7045: new service with ServiceFileName in user Temp directory. Sysmon Event ID 13: ImagePath registry value containing \Temp\ path.

  4. Test 4Modify Existing Service Binary Path (Service Hijacking)

    Expected signal: Sysmon Event ID 1: sc.exe with 'config' and 'binPath' in command line targeting 'wuauserv'. Sysmon Event ID 13: registry value modification at HKLM\SYSTEM\CurrentControlSet\Services\wuauserv\ImagePath. Security Event ID 4697 may fire depending on Windows version and audit policy. Note: this test modifies a real service — run only in isolated test environments.

Unlock Pro Content

Get the full detection package for T1543 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections