MITRE ATT&CK Enterprise · TA0003
Persistence: how an attacker stays
PersistenceTA0003
Most cleanups do not work. This is why, what it costs to find out late, and the telemetry that catches it.
For the owner
Most cleanups do not work.
When an intruder is removed from a machine, there is often a second reason they come back. They left a way in. An extra account nobody recognises. A service that starts by itself. A small program that runs every time somebody signs in. A change to the way sign-in itself works.
The business meaning is simple and unwelcome. If your incident closed on Tuesday and the same problem is visible on Thursday, you did not have two incidents. You had one incident that survived the cleanup. That is the whole meaning of persistence, and it is the reason it is worth its own conversation with your IT team.
It is also the tactic with the longest reach. Some mechanisms live only on the machine they were installed on, and rebuilding that machine ends them. Others live in your account system, in your identity service, or in the image your computers are built from. Those do not end with a rebuild: every new machine you deploy afterwards arrives already carrying the problem.
From the outside, persistence is invisible. No customer can see it and no colleague can report it. It surfaces weeks later, as a repeat incident, as a question from a regulator about how long the exposure really lasted, or as the awkward discovery that the fix you announced did not hold.
Three questions are worth asking your own team:
- If we rebuilt a machine from scratch last month, would it still let the attacker in? Ask about the build image and the software it bundles, not about the machine. The answer is usually "it depends on the image", and that answer is worth chasing.
- Who reviews the list of administrator accounts, scheduled jobs and services, and when did they last do it? Every estate has such a list. Very few have a date on it.
- When somebody's second factor is replaced or reset, who approves it, and is that written down somewhere you would actually look? This is where an intruder quietly takes over the account your team uses to watch everything else.
None of this is a large project. Most of it is a baseline and a review date. It matters because a cleanup you cannot verify is a claim you are making about your security that you have not checked.
For the analyst
The tactic
MITRE ATT&CK files Persistence under TA0003. It covers the adversary creating or modifying something so that their access survives a reboot, a rebuild, a credential reset or a cleanup. The matrix files 113 techniques under it — the largest tactic in the matrix by a wide margin — and the pinned SigmaHQ corpus carries 547 rules.
The size of that number is the single most useful fact about this tactic. Persistence is not one behaviour; it is a catalogue of the operating system's own auto-start mechanisms, each with its own file, registry key or account class. An adversary picks whichever one their target actually runs, which is why no single detection covers the tactic.
What the corpus detects
| Technique | Name | Rules in the corpus |
|---|---|---|
T1112 | Modify Registry | 81 |
T1078 | Valid Accounts | 51 |
T1543.003 | Create or Modify System Process: Windows Service | 38 |
T1078.004 | Valid Accounts: Cloud Accounts | 37 |
T1053.005 | Scheduled Task/Job: Scheduled Task | 33 |
T1098 | Account Manipulation | 32 |
T1547.001 | Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder | 31 |
T1505.003 | Server Software Component: Web Shell | 23 |
T1133 | External Remote Services | 19 |
T1136.001 | Create Account: Local Account | 16 |
T1197 | BITS Jobs | 15 |
T1556 | Modify Authentication Process | 12 |
T1546.003 | Event Triggered Execution: Windows Management Instrumentation Event Subscription | 11 |
T1053 | Scheduled Task/Job | 9 |
T1543 | Create or Modify System Process | 9 |
T1053.002 | Scheduled Task/Job: At | 8 |
T1137 | Office Application Startup | 8 |
T1546.015 | Event Triggered Execution: Component Object Model Hijacking | 8 |
T1098.003 | Account Manipulation: Additional Cloud Roles | 7 |
T1546 | Event Triggered Execution | 7 |
T1547 | Boot or Logon Autostart Execution | 7 |
T1053.003 | Scheduled Task/Job: Cron | 6 |
T1546.008 | Event Triggered Execution: Accessibility Features | 6 |
T1546.011 | Event Triggered Execution: Application Shimming | 6 |
T1078.002 | Valid Accounts: Domain Accounts | 5 |
T1078.003 | Valid Accounts: Local Accounts | 5 |
T1136.002 | Create Account: Domain Account | 5 |
T1505.004 | Server Software Component: IIS Components | 5 |
T1546.001 | Event Triggered Execution: Change Default File Association | 5 |
T1554 | Compromise Host Software Binary | 5 |
T1137.006 | Office Application Startup: Add-ins | 4 |
T1546.002 | Event Triggered Execution: Screensaver | 4 |
T1546.007 | Event Triggered Execution: Netsh Helper DLL | 4 |
T1547.009 | Boot or Logon Autostart Execution: Shortcut Modification | 4 |
T1547.010 | Boot or Logon Autostart Execution: Port Monitors | 4 |
T1037.001 | Boot or Logon Initialization Scripts: Logon Script (Windows) | 3 |
T1078.001 | Valid Accounts: Default Accounts | 3 |
T1098.001 | Account Manipulation: Additional Cloud Credentials | 3 |
T1136 | Create Account | 3 |
T1136.003 | Create Account: Cloud Account | 3 |
T1505.002 | Server Software Component: Transport Agent | 3 |
T1546.013 | Event Triggered Execution: PowerShell Profile | 3 |
T1547.004 | Boot or Logon Autostart Execution: Winlogon Helper DLL | 3 |
T1556.002 | Modify Authentication Process: Password Filter DLL | 3 |
T1556.006 | Modify Authentication Process: Multi-Factor Authentication | 3 |
T1137.002 | Office Application Startup: Office Test | 2 |
T1176.001 | Software Extensions: Browser Extensions | 2 |
T1542.001 | Pre-OS Boot: System Firmware | 2 |
T1543.001 | Create or Modify System Process: Launch Agent | 2 |
T1543.002 | Create or Modify System Process: Systemd Service | 2 |
T1543.004 | Create or Modify System Process: Launch Daemon | 2 |
T1546.009 | Event Triggered Execution: AppCert DLLs | 2 |
T1546.012 | Event Triggered Execution: Image File Execution Options Injection | 2 |
T1037.005 | Boot or Logon Initialization Scripts: Startup Items | 1 |
T1098.005 | Account Manipulation: Device Registration | 1 |
T1098.007 | Account Manipulation: Additional Local or Domain Groups | 1 |
T1137.003 | Office Application Startup: Outlook Forms | 1 |
T1505 | Server Software Component | 1 |
T1505.001 | Server Software Component: SQL Stored Procedures | 1 |
T1505.005 | Server Software Component: Terminal Services DLL | 1 |
T1525 | Implant Internal Image | 1 |
T1542.003 | Pre-OS Boot: Bootkit | 1 |
T1546.004 | Event Triggered Execution: Unix Shell Configuration Modification | 1 |
T1546.010 | Event Triggered Execution: AppInit DLLs | 1 |
T1546.014 | Event Triggered Execution: Emond | 1 |
T1547.002 | Boot or Logon Autostart Execution: Authentication Package | 1 |
T1547.003 | Boot or Logon Autostart Execution: Time Providers | 1 |
T1547.005 | Boot or Logon Autostart Execution: Security Support Provider | 1 |
T1547.006 | Boot or Logon Autostart Execution: Kernel Modules and Extensions | 1 |
T1547.008 | Boot or Logon Autostart Execution: LSASS Driver | 1 |
T1547.014 | Boot or Logon Autostart Execution: Active Setup | 1 |
T1547.015 | Boot or Logon Autostart Execution: Login Items | 1 |
T1556.004 | Modify Authentication Process: Network Device Authentication | 1 |
T1653 | Power Settings | 1 |
The families
Boot or Logon Autostart Execution (T1547, eleven sub-techniques). The classic. T1547.001 (Registry Run Keys / Startup Folder) alone carries 31 rules. The rest are the less famous relatives — T1547.002 (Authentication Package), .004 (Winlogon Helper DLL), .008 (LSASS Driver), .014 (Active Setup), .015 (Login Items) among them. This is what "starts itself at boot" means, and it is why a clean reboot changes nothing.
Event Triggered Execution (T1546, thirteen sub-techniques). Code that runs when something happens rather than at start-up. T1546.003 (Windows Management Instrumentation Event Subscription) carries 11 rules and is the one to watch on servers; T1546.015 (Component Object Model Hijacking) carries 8; .001, .008 and .011 carry 5 to 6 each.
Create or Modify System Process (T1543, .001 Launch Agent, .002 Systemd Service, .003 Windows Service, .004 Launch Daemon) and Scheduled Task/Job (T1053, .002 At, .003 Cron, .005 Scheduled Task) are the same idea in two places: a service starts at boot and runs as SYSTEM, a task runs on a schedule. T1543.003 carries 38 rules and T1053.005 33. Neither is visible to somebody who only looks at applications.
Server Software Component (T1505, .001 SQL Stored Procedures, .002 Transport Agent, .003 Web Shell, .004 IIS Components, .005 Terminal Services DLL). Persistence inside a running application instead of the operating system. T1505.003 (Web Shell) carries 23 rules: a script in the web root that the application does not ship.
Accounts. T1136 (Create Account) with .001 Local Account (16 rules), .002 Domain Account and .003 Cloud Account; T1098 (Account Manipulation) with .001 Additional Cloud Credentials, .003 Additional Cloud Roles (7 rules), .005 Device Registration and .007 Additional Local or Domain Groups. And T1078 (Valid Accounts) is not a creation at all but a reuse: persistence often means an existing account, adjusted.
Modify Registry (T1112). 81 rules, the largest single row in the table, and the substrate under many of the families above.
Modify Authentication Process (T1556, .002 Password Filter DLL, .004 Network Device Authentication, .006 Multi-Factor Authentication). The adversary changes what a successful sign-in means — the family with the longest reach, because it lives in your identity service rather than on a disk you can wipe.
External Remote Services (T1133). 19 rules, and the mechanism by which persistence survives a rebuild: the way back in is a VPN account, a remote access server, or an appliance nobody has decommissioned.
And the rest: T1137 (Office Application Startup, with .002, .003 and .006 Add-ins), T1197 (BITS Jobs, 15 rules), T1176.001 (Browser Extensions), T1554 (Compromise Host Software Binary), T1525 (Implant Internal Image), T1542.001 (System Firmware) and T1542.003 (Bootkit), T1037.001 (Windows Logon Script) and T1037.005 (Startup Items), and T1653 (Power Settings).
Where the telemetry comes from
| Source type | Signal | Columns that carry it |
|---|---|---|
windows_sysmon | Registry writes, file creation, service and task creation | file_path, command_line, process_name |
linux_auditd | Service units, cron files, shell profile writes | file_path, command_line, user_name |
keycloak | Identity administration events | user_name, event_type |
m365_audit | Role grants, app consents, mailbox rules, credential resets | user_name, event_type |
gworkspace | The Google workspace equivalents | user_name, event_type |
firewall_syslog | The external remote service actually being used | src_ip, dst_port, event_type |
cloud | Object access and egress from a compromised tenant | service_name, event_type |
The normalised row for one scheduled task creation looks like this:
event_type: process_create
source_type: windows_sysmon
host_id: srv-dc-02
user_name: CORP\svc_backup
process_name: schtasks.exe
parent_process: cmd.exe
command_line: schtasks.exe /create /tn OneDriveSync /tr "C:\ProgramData\svc.exe" /sc onlogon /ru SYSTEM
file_path: C:\Windows\System32\schtasks.exe
severity: medium
Nothing in that row is a smoking gun on its own. It is the comparison against what srv-dc-02 should have that carries the signal.
What makes an event rare, and what makes it wrong
Persistence is a state, not an event. The event is "a scheduled task was created"; the state is "this host has fourteen scheduled tasks and last Tuesday it had three". That distinction drives everything below.
Rare, and worth an alert:
- A new local administrator account with no corresponding person.
- A service whose binary path sits in a user-writable directory.
- A Run key pointing at a file under the user's own profile directory.
- A task or service created by an account that has never created one.
- A second authentication factor enrolled on an account that never had one.
- A file in a web root that the application's own release does not contain.
Wrong, and the reason this tactic is where alert fatigue is born:
- Software installers that create a service and a scheduled task as part of installation. Every agent deployment, printer driver and backup agent does this.
- Automatic updaters, which frequently use a scheduled task.
- Office add-ins and browser extensions installed by staff.
Detection engineering notes
- Baseline, do not match. The single most effective pattern for this tactic is to record what a host should contain and alert on the delta. Per host: services, scheduled tasks, autostart entries, local administrators, listening ports. You cannot decide what is wrong until you know what is right — and "right" is per host role, because a domain controller, a file server and a developer laptop legitimately differ.
- Compare running hosts to the image they were built from. The build image is the baseline for a rebuilt machine, and comparing it to what is running is how you find the mechanism that survived the rebuild.
- Give the identity plane its own baseline. Count of roles, count of enrolled factors, count of registered applications, count of forwarding rules.
T1098.003andT1556.006live there, and no endpoint rule will ever see them. - Suppress by deployment window, not by a permanent allowlist. A task created at 3 a.m. during a change window is expected; the same task created at 3 a.m. on a Sunday is not.
- Use the application's own manifest for web roots.
T1505.003is easy to detect when the deployment pipeline knows which files it shipped. - Keep the history. The write that installed the mechanism is often days before the alert that finally fires, and without history you cannot diff anything.
Where analysts get this wrong
The first mistake is treating persistence as an event rather than a state. If you only alert on the moment of creation, you catch the inattentive adversary and miss the one who installs the mechanism during your change window, or dormant, and activates it later.
The second is looking only at endpoints. A large part of this tactic lives in the identity plane — an additional cloud role, an enrolled factor, a reused account (T1078.004, T1098.003, T1556.006) — and none of it shows up on a workstation.
The third is assuming a rebuild fixed it. If the mechanism is in the software you distribute (T1554), in your update channel (T1197), or in a management agent's configuration, then every machine you rebuild comes back already carrying it, and the second incident is not a second attack.
That false negative has a recognisable shape: an intrusion is fully removed, the estate is clean, and a month later the same adversary is back. Nothing was missed in the detection, because there was never an event to miss — the foothold was in the build, visible only in the artifact every machine receives.
Where DetectMonkey fits
Persistence is found late by definition, and the alert that finally fires about it — an outbound connection, a strange sign-in — happens days after the write that installed the mechanism. The evidence that shows when the foothold was established is in the history, not in the alert.
DetectMonkey keeps that history close. The pinned corpus of 3164 rules is evaluated as events arrive rather than after indexing, and the last 72 hours of telemetry stay queryable, so an analyst can walk backwards from the moment a mechanism was installed to the account and process that installed it. It does not isolate, quarantine or block anything on your systems, and it changes no configuration on them. Telemetry is processed and stored on private servers operated by Codein in New Brunswick, Canada, and the analysts work in English and French.
Early access is 90 days at no charge for up to 100 seats, with founder-led onboarding and no card required.
See it on your own telemetry
Early access is 90 days at no charge, for up to 100 seats, founder-led onboarding, no card required.