Join our Newsletter — 33% off our NHI Course
Home› Guides› T1547 Boot or Logon Autostart Execution Defensive Guide:…
Guide Attack Techniques & Malware

T1547 Boot or Logon Autostart Execution Defensive Guide: Finding Persistence in Run Keys and Startup Paths

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 11 min read
On this page

The cheapest way to survive a reboot is to ask the operating system to start your code for you, and every major platform offers dozens of places to make that request. MITRE ATT&CK T1547 Boot or Logon Autostart Execution covers configuring system settings so a program runs automatically at boot or logon, for persistence and sometimes for higher privileges. In ATT&CK v20 it belongs to both the Persistence (TA0003) and Privilege Escalation (TA0004) tactics and has 14 active sub-techniques, from Registry Run keys and startup folders to LSA authentication packages, print spooler DLLs, Linux XDG autostart entries and macOS login items. T1547.001 alone is recorded for 197 malware families and 59 groups, which makes it one of the most common persistence methods in the knowledge base. This guide explains each autostart location defenders must watch, how to detect changes to them, how to harden the riskiest ones and how to evict entries cleanly. It is for detection engineers, incident responders and endpoint owners. For the full persistence landscape, see the Persistence Techniques Guide.

Key takeaways

  • Monitor the locations, not the malware. Autostart persistence must write to a known, finite set of registry keys, folders and configuration files, so change monitoring on those locations catches unknown tools.
  • Run keys and startup folders dominate. T1547.001 covers most real-world use; a detection on new Run and RunOnce values and new startup-folder files pays off quickly.
  • LSA-loaded DLLs are the dangerous minority. Authentication packages, security support providers and LSASS drivers run inside LSASS, and SSPs can see plaintext credentials; Added LSA protection (RunAsPPL) blocks unsigned plug-ins.
  • Baselines make detection workable. Autoruns or EDR inventories from a gold image let you alert on what is new and unsigned, rather than on every software install.
  • Eviction needs the full list. Removing one Run key while a print monitor or Active Setup entry remains leaves the intruder in place.

How the attack works

ATT&CK describes T1547 as configuring system settings "to automatically execute a program during system boot or logon", through specially designated directories, configuration repositories such as the Registry, or kernel extensions. Programs started this way run with the privileges of the context that loads them: the logged-on user for Run keys, SYSTEM for print spooler and LSA components.

Sub-technique (v20)Location defenders watchRuns asATT&CK detection
.001 Registry Run Keys / Startup FolderHKLM and HKCU ...\CurrentVersion\Run, RunOnce, RunOnceEx, Policies\Explorer\Run; Shell Folders and User Shell Folders values; Session Manager\BootExecute; per-user and all-users Startup foldersLogged-on user (BootExecute: at boot)DET0365
.002 Authentication PackageHKLM\SYSTEM\CurrentControlSet\Control\Lsa\ "Authentication Packages"LSASS (SYSTEM)DET0207
.003 Time ProvidersHKLM\System\CurrentControlSet\Services\W32Time\TimeProviders\W32Time serviceDET0122
.004 Winlogon Helper DLLHKLM and HKCU ...\Windows NT\CurrentVersion\Winlogon\ values such as Shell, Userinit and NotifyWinlogon at logonDET0404
.005 Security Support ProviderLsa\Security Packages and Lsa\OSConfig\Security PackagesLSASS, with access to plaintext and encrypted credentialsDET0542
.008 LSASS DriverLSA plug-ins and drivers loaded by LSASSLSASSDET0225
.009 Shortcut ModificationShortcuts and symbolic links in startup locations or pointing to altered targetsUserDET0180
.010 Port MonitorsHKLM\SYSTEM\CurrentControlSet\Control\Print\Monitorsspoolsv.exe as SYSTEMDET0204
.012 Print ProcessorsPrint processor DLLs registered with the spooler (needs SeLoadDriverPrivilege)spoolsv.exe as SYSTEMDET0026
.014 Active SetupHKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\ StubPath valuesUser, at logonDET0312
.006 Kernel Modules and ExtensionsLinux loadable kernel modules (/lib/modules, insmod, modprobe); macOS kernel extensionsKernelDET0450
.013 XDG Autostart Entries.desktop files in /etc/xdg/autostart and ~/.config/autostartUser, at desktop loginDET0390
.007 Re-opened Applications; .015 Login Items~/Library/Preferences/ByHost/com.apple.loginwindow.[UUID].plist; login items and background tasksUser, at loginDET0125, DET0121

Microsoft's documentation of the Run and RunOnce keys explains some behaviour that matters in investigations: a RunOnce value is deleted before its command runs unless its name starts with !, a * prefix makes it run even in Safe Mode, HKLM RunOnce entries run only when an administrator logs on, the command line is limited to 260 characters, and the order in which entries under one key run is indeterminate. A RunOnce entry may therefore have executed and vanished before you look, which is why registry change telemetry beats point-in-time scans.

Where it shows up

  • Commodity malware and loaders: Run keys and startup-folder shortcuts are the default persistence for most infostealers and remote access trojans. See the Infostealer Threat Guide.
  • State and criminal groups: ATT&CK records APT29 adding Run keys, FIN7 creating Run and RunOnce keys and Startup folder items, Kimsuky placing scripts in the startup folder and modifying HKCU RunOnce, and Lazarus Group using both startup folders and Run keys. See the APT29 (Midnight Blizzard) Threat Actor Profile.
  • Credential capture: malicious security support providers persist and collect passwords at the same time, overlapping with T1556 Modify Authentication Process.
  • SYSTEM-level persistence through the print spooler: port monitors and print processors load at boot under spoolsv.exe.
  • Linux desktops and servers: XDG autostart on workstations and kernel modules on servers, often alongside systemd units covered by T1543.

Impact

Autostart persistence turns a one-time compromise into a durable one: the intruder returns after every reboot, password reset or partial clean-up. LSA and spooler variants also deliver SYSTEM execution or credential access, and kernel modules can hide other activity entirely. During incident response, an unfound autostart entry is a common reason for reinfection after a declared recovery.

Detection

PlatformTelemetryWhat to alert on
Windows registry autostartsSysmon 12, 13 and 14 (registry create, value set, rename) or EDR registry events; Security 4657 with auditing (SACLs) on the keysNew or changed values under the keys in the table above, especially pointing to user-writable paths, scripts, LOLBAS binaries or unsigned files (DET0365, DET0274)
Startup folders and shortcutsSysmon 11 (file create), EDR file eventsNew .lnk, script or executable files in either Startup folder; shortcuts whose target changed (DET0180)
LSA plug-insSysmon 7 (image loaded) into lsass.exe; Security 4657; CodeIntegrity Operational events 3033, 3063, 3065, 3066New entries in Authentication Packages or Security Packages; any non-Microsoft DLL loading into LSASS (DET0542, DET0207, DET0225)
Spooler and time serviceSysmon 7 into spoolsv.exe and svchost hosting W32Time; registry eventsNew monitors, print processors or time provider DLLs, especially on servers that do not print (DET0204, DET0026, DET0122)
Logon behaviourSecurity 4688 or Sysmon 1 with parent processProcesses spawned at logon by explorer.exe, userinit.exe or winlogon.exe that are not in the baseline (DET0404, DET0274)
Linuxauditd watches on /etc/xdg/autostart, ~/.config/autostart, /lib/modules; execve of insmod and modprobeNew .desktop files with unusual Exec paths; unsigned or unexpected module loads (DET0390, DET0450)
macOSEndpoint Security and unified log; sfltool dumpbtm for background task inventoryNew login items and background tasks from unknown team identifiers; changes to loginwindow plists (DET0121, DET0125)

Baselining with Autoruns

Sysinternals Autoruns (v14.3) and its command-line form autorunsc enumerate logon entries, services, scheduled tasks, Winlogon, boot execute, AppInit DLLs, image hijacks, WMI entries, printer monitor DLLs and LSA providers. A practical baseline uses all categories, CSV output, hashes and signature verification across all profiles, for example autorunsc -a * -c -h -s *, collected from a gold image and then regularly from each host. Diff the results and investigate entries that are new, unsigned or point to user-writable paths. Many EDR platforms provide the same inventory natively. For hunting queries, see the KQL for Threat Hunting Guide.

Prevention and hardening

ControlSetting or approachSub-techniques addressed
Added LSA protectionRunAsPPL under HKLM\SYSTEM\CurrentControlSet\Control\Lsa (1 with UEFI lock, 2 without on Windows 11 22H2 and later); test first with AuditLevel=8 under Image File Execution Options for LSASS.exe and review CodeIntegrity events. LSA plug-ins and drivers must then be Microsoft-signed.002, .005, .008 (ATT&CK M1025)
Application controlBlock execution from user-writable paths and unsigned code; most Run key and startup-folder payloads then fail to start. See the Application Allowlisting Guide.001, .009, .014 (M1038)
Least privilegeNo local administrator rights for users; HKLM keys, LSA, spooler and Winlogon changes then need admin. For local admin accounts see the Local Administrator Password Solution (LAPS) GuideAll HKLM-based variants (M1018, M1026)
Disable unneeded servicesStop and disable the Print Spooler on servers and domain controllers that do not print.010, .012 (M1042)
Registry permissionsKeep default ACLs on autostart keys; audit changes with SACLs.003 and other HKLM keys (M1024)
Linux module and autostart controlSecure Boot with module signature enforcement where supported, restrict write access to XDG directories, limit software installation.006, .013 (M1022, M1033)
macOS managed login itemsUse the Managed Login Items payload with Label, BundleIdentifier or TeamIdentifier rules to pre-approve known items so unknown ones stand out. See the macOS Security Guide for Enterprises.015, .007

Rollout and eviction

  1. Baseline: collect Autoruns or EDR autostart inventories from gold images and a sample of production hosts per role.
  2. Detect in alert-only mode: enable registry and file monitoring on the locations above and tune out software deployment tools for two to four weeks.
  3. Harden: enable LSA protection in audit mode, review CodeIntegrity events, then enforce; disable the spooler where unneeded; remove local admin rights.
  4. Evict during incidents: export every autostart location from affected hosts, compare against baseline, remove all malicious entries and their files together, then reboot and recheck. See the EDR Guide for remote collection.
  5. Roll back: LSA protection set without a UEFI lock can be reverted by registry change and restart; with a UEFI lock it needs Microsoft's opt-out tool, so pilot before using value 1.

Where identity fits

Most autostart locations that matter need administrator rights to change, so this technique is often a symptom of over-privileged local admin and service accounts. Remove standing local admin, rotate local administrator passwords with LAPS, and monitor service accounts that write to autostart keys. Malicious SSPs and authentication packages are also a credential-theft risk to every account that logs on to the host. See the Service Account Security Guide.

Common failure patterns

  • Watching only Run and RunOnce: intruders who know the common rules use Active Setup, Winlogon values, print monitors or Policies\Explorer\Run instead.
  • Point-in-time scans only: RunOnce entries delete themselves, so a weekly scan may never see them. Stream registry change events.
  • No baseline: every software install generates autostart entries; without a baseline the alerts are ignored.
  • Leaving the spooler running on servers: it provides SYSTEM-level autostart paths with no business value.
  • Partial eviction: deleting the file but not the registry entry, or one entry but not the second persistence method, leads to reinfection.

Framework mapping

FrameworkReferenceRelevance
MITRE ATT&CK v20T1547 and 14 sub-techniques (TA0003, TA0004); related T1543, T1037, T1053, T1546The technique and neighbouring persistence techniques
ATT&CK mitigationsM1025, M1024, M1022, M1018, M1038, M1042, M1026, M1033Official mitigations across sub-techniques
NIST SP 800-53 Rev. 5CM-7(5) Authorized Software; AC-6 Least PrivilegeExecution control and admin rights
NIST SP 800-53 Rev. 5SI-7 Software, Firmware, and Information Integrity; SI-4 System MonitoringIntegrity checks on autostart locations; change monitoring
NIST CSF 2.0PR.PS-01; PR.PS-05; DE.CM-09Configuration management; preventing unauthorised software; monitoring

Practitioner checklist

  • Stream registry and file change telemetry for every T1547 location on Windows, not only Run and RunOnce.
  • Alert on any non-Microsoft DLL loading into LSASS and on changes to LSA package values.
  • Enable Added LSA protection, audit mode first, then enforce on all supported systems.
  • Disable the Print Spooler on servers and domain controllers that do not need it.
  • Baseline autostarts per host role with Autoruns or EDR inventory and diff regularly.
  • Remove standing local admin rights and use LAPS for local administrator accounts.
  • Monitor XDG autostart directories and kernel module loads on Linux, and login items on macOS.
  • During incident response, export and clear every autostart location, then reboot and recheck.

Standards and references

Related NHI Mgmt Group resources: Persistence Techniques Guide · T1543 Create or Modify System Process Defensive Guide · T1546 Event Triggered Execution Defensive Guide · Sysmon Guide · Local Administrator Password Solution (LAPS) Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.