Persistence in cyber security is the set of techniques attackers use to keep access to a system or network after the initial compromise, so their foothold survives reboots, logoffs, password changes and even removal of the original malware. MITRE ATT&CK catalogs it as tactic TA0003, covering methods from Registry run keys and scheduled tasks to new accounts, web shells and malicious OAuth apps.
Key takeaways
- Persistence is any change that re-activates attacker access automatically — at boot, at logon, on a schedule, or when a web request arrives.
- The most common methods abuse legitimate features: Registry run keys, scheduled tasks, services, new accounts and cloud app integrations.
- Cleaning the malware is not enough: you must also remove every persistence mechanism, or the attacker simply returns.
An attacker who breaks in once has a problem: reboots, password changes and antivirus cleanups can all lock them out again. Persistence is how they solve it — by planting a mechanism that brings their access back automatically, again and again.
What is persistence in cyber security?
Persistence is the set of techniques attackers use to keep access to a compromised system or network across restarts, changed credentials and other interruptions. MITRE ATT&CK catalogs it as tactic TA0003, defined as techniques that let adversaries maintain their foothold.
The core idea is simple: arrange for attacker-controlled code or credentials to be re-activated by an event the system performs anyway — a boot, a logon, a scheduled time, or an incoming web request. The system itself becomes the launcher.
Persistence matters because it turns a one-time intrusion into a long-term presence. Mandiant's M-Trends 2026 report puts the global median dwell time at 14 days, and the longest-running intrusions — espionage in particular — are sustained by robust, redundant footholds. If you only remove the malware and miss the persistence, the attacker returns.
How does persistence work?
Every persistence technique has three parts: a trigger, a pointer and a payload. The trigger is the event, the pointer is the configuration entry that connects the trigger to the payload, and the payload is the malicious code or credential.
Almost every technique abuses a legitimate operating system feature. Windows, Linux and macOS all need a way for software to start automatically, run on a schedule and authenticate users. Attackers insert their payload into those same pathways, alongside legitimate entries, so it blends in.
Privilege decides depth. User-level persistence survives logoff and logon. System-level persistence survives reboots. Firmware-level persistence can survive an operating system reinstall. That is why the first question after a breach is always how deep the attacker got.
What are the most common persistence techniques?
The most common techniques are Registry run keys, scheduled tasks, malicious services, new accounts and web shells. MITRE ATT&CK lists 22 persistence techniques under TA0003, but a small handful accounts for most real intrusions.
| Technique | What the attacker does | MITRE ID | Survives |
|---|---|---|---|
| Registry run keys / startup folder | Adds a program that runs at every logon | T1547.001 | Logoff, reboot |
| Scheduled task | Creates a task that re-runs code on a schedule or trigger | T1053.005 | Reboot, logoff |
| Windows service | Installs a malicious service that starts with the system | T1543.003 | Reboot |
| WMI event subscription | Registers a trigger that fires on an event such as logon | T1546.003 | Reboot |
| Create account | Adds a local or domain account the attacker controls | T1136 | Password resets of other accounts |
| Web shell | Plants a script on a web server for remote access | T1505.003 | Reboot, patching of other flaws |
| Valid accounts | Reuses stolen legitimate credentials as a quiet backdoor | T1078 | Malware removal |
| Cloud app integration | Adds a malicious OAuth app to a cloud tenant | T1671 | Password resets, MFA changes |
Registry run keys and startup folders
This is the classic method and still one of the most common. An entry in a Registry run key or the startup folder causes the referenced program to run when a user logs in, under that user's permissions. It is easy to set up, easy to hide among legitimate entries, and easy to miss if you never compare autostarts against a baseline.
Scheduled tasks and cron jobs
A scheduled task re-runs attacker code on a timer, at logon, or when a specific event happens. On Linux the equivalent is cron or a systemd timer. Tasks are attractive because they look like ordinary maintenance, and because a task that runs once an hour will restore access even if the malware process is killed.
New accounts and credential changes
Instead of running code, the attacker can simply create a new local or domain account, add an SSH key to authorized_keys, or grant an existing account extra permissions. Account-based persistence is quiet: there is no malware to detect, just a login that looks legitimate until you notice the account was never approved.
Web shells and server components
On a compromised web server, attackers plant a small script — a web shell — that gives them remote access whenever they send it a request. Web shells survive reboots and often survive patching of the original vulnerability, which is why servers need to be checked for unexpected files, not just patched.
Cloud persistence: OAuth apps and extra credentials
In cloud environments, attackers add credentials to a cloud account, grant extra roles, or register a malicious OAuth application. This kind of persistence survives password resets and even MFA changes, because the OAuth grant is a separate authorization. Reviewing third-party app permissions in Microsoft 365 and Google Workspace is now a standard part of incident response.
Where does persistence hide beyond the endpoint?
Persistence is not only a laptop problem. Attackers plant it in network devices, email rules, browsers and cloud tenants, where endpoint tools never look.
- Email: inbox rules that forward mail to the attacker, or delegate permissions on a mailbox (T1098.002).
- Network devices: modified firmware or configuration on routers and firewalls, which survive endpoint rebuilds.
- Browsers: malicious extensions that run every time the browser starts.
- Cloud: extra API keys, service accounts and OAuth grants in AWS, Azure or Google Cloud.
- Containers: extra roles bound to a Kubernetes service account (T1098.006).
- Boot and firmware: bootkits and modified UEFI firmware, the deepest and hardest to remove.
This is why a breach investigation that only checks laptops can miss the foothold entirely. The attacker may have left the endpoint long ago and now returns through a mailbox rule or a cloud credential.
How is persistence different from other attack tactics?
Persistence sits between initial access and the attacker's real goal. It is not the break-in, and it is not the theft — it is the insurance that keeps the break-in useful.
MITRE ATT&CK orders tactics roughly by the order attackers use them: reconnaissance, initial access, execution, persistence, privilege escalation, defense evasion, credential access, discovery, lateral movement, collection, exfiltration and impact. Persistence comes early because everything after it depends on reliable access.
It also overlaps with other tactics. Creating an account is both persistence and privilege escalation. Using stolen credentials is persistence, defense evasion and credential access at once. Do not treat the categories as walls; treat them as lenses for asking where the attacker might still be.
How do you detect persistence?
Detection starts with a baseline. You cannot spot a new autostart entry, scheduled task or account unless you know what normal looks like on that system.
On Windows, Sysinternals Autoruns shows nearly every autostart location in one view. Export it from a clean machine, then compare. On Linux, check cron tables, systemd units, shell startup files such as .bashrc and .profile, and SSH authorized_keys files.
EDR tools help at scale by flagging new persistence entries in real time. In the cloud, audit logs show who created accounts, keys and OAuth grants, and when. Alert on creation events rather than only on logins: a new account created at 3 a.m. is a stronger signal than a login from an unusual place.
Watch for the classic signs: a process that reappears minutes after you kill it, a file that returns after deletion, or an account that logs in after its password was reset. Any of these means a persistence mechanism is still active.
How do you remove persistence?
Removing the malware is not the same as removing the persistence. The cleanup is only done when every mechanism is gone, and you can prove it.
- Find every mechanism first. Hunt autostarts, tasks, services, accounts, email rules, cloud grants and web shells before you delete anything, so you have the full list.
- Remove the entries. Delete the Registry keys, tasks, services and rogue accounts, revoke malicious OAuth grants and API keys, and delete web shell files.
- Reset credentials. Change passwords for affected accounts, rotate API keys and SSH keys, and revoke sessions. Account-based persistence survives a malware cleanup, so this step is not optional.
- Patch the original hole. Fix the vulnerability or phishing route that let the attacker in, or they will simply re-establish persistence.
- Rebuild when you cannot prove completeness. If the attacker had admin rights, or the persistence may reach firmware, reimage the machine and reflash firmware rather than trusting a cleanup.
- Monitor after the cleanup. Watch for the same entries reappearing for at least a few weeks. A returning entry means you missed one.
How do you prevent persistence?
Prevention is about shrinking the places an attacker can hide and making new entries visible when they appear.
- Least privilege: users without admin rights cannot write to system autostart locations or install services. This alone blocks the deepest persistence.
- Application allowlisting: only approved software runs, so an attacker's payload cannot start even if the entry exists.
- Patch fast: most persistence starts with an exploited vulnerability or a phished credential. Patching and phishing-resistant MFA cut off the supply.
- Monitor creation events: alert on new scheduled tasks, services, accounts, OAuth grants and email rules. These are rare in normal work and loud in attacks.
- Review cloud permissions regularly: audit third-party app access in Microsoft 365 and Google Workspace, and remove grants nobody recognizes.
- Segment the network: if one machine is compromised, segmentation limits how far the attacker can spread persistence.
For a small business, the highest-value starting point is simple: standard users without admin rights, phishing-resistant MFA, and an EDR tool that alerts on new autostart entries. You can also reduce your exposed surface by checking what your systems expose to the internet — our attack surface management overview explains what that looks like in practice.
What does persistence look like in a real attack?
A typical intrusion follows a pattern. The attacker phishes one employee, lands on a workstation, and within minutes creates a scheduled task and a new local account. The phishing email is deleted, the malware is eventually caught by antivirus — but the scheduled task quietly re-downloads it the next morning.
More advanced groups plant several mechanisms at once: a Registry run key, a WMI subscription and a cloud OAuth app. Removing one leaves the others, which is exactly the point. Redundancy is the attacker's insurance policy.
This is also why dwell time matters. The longer an intruder stays, the more persistence they plant and the harder the cleanup becomes. Finding the first foothold fast — through EDR alerts or a user reporting a suspicious message — is worth more than any single detection rule. MITRE's persistence tactic page lists all 22 techniques defenders should hunt for.
If you want to test your team, our free phishing quiz is a quick starting point.
The spear phishing guide explains the attack that usually delivers the first foothold, and US agencies recommend phishing-resistant MFA in their joint phishing guidance.
The bottom line
Persistence is the attacker's answer to every cleanup: a trigger, a pointer and a payload that bring their access back after reboots, password resets and antivirus scans. The common methods all abuse legitimate features, which is why baselines and creation-event alerts matter more than signature scanning.
When you respond to a breach, hunt for persistence before you declare it over — autostarts, tasks, accounts, cloud grants and email rules. You can start by reducing what attackers can reach in the first place with Cysoro's attack surface management.
Frequently asked questions
What is persistence in cyber security in simple terms?
Persistence is how an attacker stays inside a system after breaking in. They set something up — a startup entry, a scheduled task, a new account — so their access comes back automatically after a reboot, a password change or a cleanup.
What is the difference between persistence and initial access?
Initial access is how the attacker first gets in, for example through phishing or an unpatched vulnerability. Persistence is what they do next to keep that access. Initial access is the break-in; persistence is the spare key they hide.
What is the most common persistence technique?
On Windows, Registry run keys and the startup folder are the classic methods: anything listed there runs at every logon. Scheduled tasks, malicious services and newly created accounts are also very common, and cloud attackers increasingly use OAuth app integrations.
Can persistence survive an operating system reinstall?
Most persistence cannot, because it lives in the operating system, Registry or user accounts. Firmware and bootkit persistence can survive a reinstall, which is why those cases need firmware reflashing or hardware replacement.
How do you detect persistence?
Compare autostart entries, scheduled tasks, services, accounts and cloud app permissions against a known-good baseline, and investigate anything new or unsigned. EDR tools, Sysinternals Autoruns and cloud audit logs are the usual starting points.
Is persistence always malicious?
No. The same mechanisms are used legitimately every day: your antivirus starts at boot, your backup runs on a schedule, and your apps register login items. Persistence is malicious only when an attacker controls the entry and you did not authorize it.
How do you remove persistence from a compromised system?
First identify every persistence mechanism, not just the malware file. Remove the entries, delete rogue accounts and revoke malicious OAuth grants, reset credentials, then rebuild the system if you cannot prove the list is complete. Reimage when in doubt.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against MITRE ATT&CK tactic TA0003 and its persistence techniques, and CISA phishing guidance on stopping the attack cycle.
How we write and fact-check →