This article from a 100-day ethical hacking course teaches four Windows persistence techniques—Registry Run keys, Scheduled Tasks, WMI Event Subscriptions, and Startup Folders—used in post-exploitation to demonstrate how attackers maintain access across reboots and credential changes without re-exploiting the initial vulnerability. It addresses why persistence matters in penetration testing: proving an attacker could maintain indefinite presence transforms a point-in-time vulnerability finding into a timeline risk statement that affects executive-level decision-making. The article covers practical implementation, privilege requirements, detection mechanisms, and MITRE ATT&CK mappings for professional report writing.
- Persistence transforms vulnerability findings into timeline riskThe article argues that demonstrating access plus persistence mechanisms is fundamentally different from demonstrating access alone. A one-time compromise shows the initial path was open; persistence shows an organization would remain compromised for weeks or months while discovering and patching the vulnerability. This distinction directly informs the timeline risk section of executive-level penetration test reports, making persistence demonstrations critical to communicating business impact rather than just technical capability.
- Registry Run keys require no admin for user-level persistenceRegistry Run key persistence (T1547.001) works via HKCU (current user) without administrator privileges, executing at every user login by adding an entry under HKCUSoftwareMicrosoftWindowsCurrentVersionRun. HKLM variants require admin but apply to all users. The article provides exact reg add commands and notes this is the most common technique because it is easiest to implement, though modern EDR solutions detect it via Windows Event ID 4657 when object access auditing is enabled.
- WMI subscriptions are the most detection-evasive techniqueWMI Event Subscriptions (T1546.003) store three linked objects in the WMI repository—an EventFilter (trigger), CommandLineEventConsumer (action), and FilterToConsumerBinding (link)—entirely outside the registry and file system. The payload executes through the WMI subsystem with no suspicious parent process lineage, registry changes, or scheduled task entries. Detection requires Sysmon Events 19/20/21 or dedicated WMI repository monitoring; standard Windows Event Logging generates no entry by default, making this the highest stealth technique covered.
- Scheduled tasks blend with legitimate IT maintenance activityScheduled Task persistence (T1053.005) can be created without admin for current-user tasks and supports multiple trigger types—logon events, startup, or daily schedules at specific times. The article emphasizes trigger flexibility and explains how scheduling tasks to execute during normal IT maintenance windows makes them harder to distinguish from legitimate activity. Detection occurs via Event ID 4698, and process lineage from svchost.exe is visible to blue teams.
- Privilege requirements and password reset survivability differ by techniqueThe article's Exercise 1 scenarios establish that HKCU Run keys, per-user Startup folders, and user-context scheduled tasks require no admin, while services and WMI subscriptions require admin. Critically, user-profile-based mechanisms (HKCU Run, per-user Startup) survive password resets because they are tied to user profiles, not authentication; SYSTEM-level persistence (services) survives resets entirely by running in a separate security context.
- Detection Event IDs enable blue team recommendations in reportsThe article provides a detection reference table mapping each technique to its Windows Event ID: Registry Run generates 4657, Scheduled Tasks generate 4698, Services generate 7045, and WMI subscriptions have no standard Event ID without Sysmon. The article explicitly states this table goes directly into the blue team recommendations section of penetration test reports, making understanding detection artifacts essential for professional credibility and actionable recommendations.
- Cleanup of persistence mechanisms is a professional standard requirementThe article emphasizes that removing all persistence at the end of an authorized assessment is mandatory, not optional. WMI subscriptions persist indefinitely across reboots until explicitly removed via Remove-WmiObject; leaving them constitutes an ongoing security risk to the client and violates professional standards. The article uses a quiz scenario to reinforce that failing to clean up can cause real operational disruption if a payload executes unexpectedly after the assessment ends.
- Complete attack chain demonstrates multi-stage compromise lifecycleThe article positions Day 30 persistence as the final phase of the post-exploitation arc, completing the kill chain: initial access → lateral movement (Day 28) → data collection and exfiltration (Day 29) → persistence (Day 30). This progression demonstrates how a real attacker maintains the ability to return indefinitely, transforming an isolated incident into a sustained compromise that informs incident response and SIEM deployment decisions at the organizational level.
Bottom line: Persistence mechanisms convert one-time vulnerability access into indefinite attacker presence, fundamentally changing how executives understand compromise risk and timeline; demonstrating persistence with proper MITRE ATT&CK mappings and detection artifacts transforms a technical finding into a business-level risk statement that drives security investment decisions. Always clean up all persistence mechanisms at the end of authorized assessments and document creation and removal for professional
FREE
Part of the 100-Day Ethical Hacking Course
🎯 What You’ll Master in Day 30
⏱️ 50 min read · 3 exercises
📋 What You’ll Master — Post-Exploitation Persistence 2026
In Day 29 you exfiltrated data through DNS tunneling and HTTPS channels. Day 30 completes the post-exploitation phase — after collecting and exfiltrating data, persistence ensures the attacker can return. The kill chain is now fully demonstrated: initial access → lateral movement → data collection → exfiltration → persistence. This is the complete story a penetration test tells in the 100-Day Ethical Hacking Course.
Why Persistence Matters in a Penetration Test
A finding of “we achieved Domain Admin” is a point-in-time demonstration. A finding of “we achieved Domain Admin and installed persistence mechanisms that would have maintained access indefinitely without re-exploitation” is a fundamentally different risk statement. The first shows the initial access path was open. The second shows the organisation would have been compromised for weeks or months while the vulnerability was being discovered and patched. Persistence demonstrations directly inform the timeline risk section of executive-level penetration test reports.
⏱️ Time: 8 minutes · No tools required
explain your reasoning. Consider: privilege level, detection
risk, and long-term reliability.
SCENARIO A:
You have compromised a standard user workstation via phishing.
No admin privileges. EDR installed (CrowdStrike).
The user logs in daily at 09:00.
→ Which persistence mechanism? Admin required? Detection risk?
SCENARIO B:
You have compromised a Domain Controller with SYSTEM privileges.
The SOC monitors new registry Run keys via Windows Event Logs.
The target environment has no WMI repository monitoring.
→ Which persistence mechanism? Why WMI over registry?
SCENARIO C:
You need persistence that survives a user account password reset.
The compromised system has no admin access.
The organisation uses MDE (Microsoft Defender for Endpoint).
→ Which mechanism is LEAST likely to survive a password reset?
→ Which mechanism survives regardless of the user account state?
For each: Technique name, MITRE ATT&CK ID, admin required Y/N,
survives reboot Y/N, survives password reset Y/N.
📸 Share your three persistence strategy answers with MITRE IDs in your notes.
Registry Run Keys — T1547.001
Scheduled Tasks — T1053.005
WMI Event Subscriptions — T1546.003
WMI permanent event subscriptions are the most sophisticated Windows persistence technique available without kernel-level access. They use the Windows Management Instrumentation repository — a separate database completely distinct from the registry — to store three linked objects: an EventFilter (the trigger), an EventConsumer (the action), and a binding linking them. The payload executes entirely through the WMI subsystem, generating no new processes from suspicious parent processes, no registry Run key changes, and no scheduled task entries.
⏱️ Time: 25 minutes · Free TryHackMe account
Step 2: Search for “Windows Persistence” room
Open: “Windows Persistence” or “Windows Local Persistence”
room (these change names periodically — search the term)
Step 3: Deploy the machine and connect via VPN or AttackBox
Step 4: The room covers registry persistence — complete:
a) The registry Run key task (HKCU variant)
b) Verify the key persists by checking the registry
c) Note the Windows Event Log ID generated (if shown)
Step 5: Complete the startup folder task:
a) Place a payload in the per-user startup folder
b) Verify execution on next login
Step 6: If scheduled tasks are covered:
a) Create a task with a logon trigger
b) Verify it appears in Task Scheduler GUI
Step 7: For each mechanism, record:
– Exact command used
– Registry path OR file path
– MITRE ATT&CK technique ID
– Windows Event ID generated (if visible)
– How would a blue team analyst detect this?
📸 Screenshot completed persistence mechanisms and the detection Event IDs in your notes.
Startup Folders and Services
⏱️ Time: 12 minutes · Kali + Windows lab target (Metasploit/Evil-WinRM shell)
📸 Screenshot Get-WMIObject output confirming the subscription exists and share in your notes
Detection Artefacts — What Each Technique Leaves Behind
T1547.001
T1053.005
T1546.003
T1543.003
🧠 QUICK CHECK — Day 30
📋 Day 30 Persistence Reference Card
🏆 Mark Day 30 as Complete
You now have four Windows persistence techniques mapped to their MITRE ATT&CK IDs, understand which require admin, know the detection Event IDs for each, and can write professional blue team recommendations for all of them. Day 30 completes the post-exploitation arc: lateral movement (Day 28) → data exfiltration (Day 29) → persistence (Day 30).
❓ Frequently Asked Questions
What is post-exploitation persistence in penetration testing?
What is the most common Windows persistence technique?
What is WMI subscription persistence and why is it harder to detect?
Which persistence techniques work without administrator privileges?
What comes after persistence in the course?
Day 29: Data Exfiltration 2026
Day 31: Linux Privilege Escalation 2026
📚 Further Reading
- Data Exfiltration Techniques 2026 — Day 29 covers DNS tunneling, ICMP exfil, and living-off-the-land exfiltration — the phase immediately before persistence in the complete post-exploitation lifecycle.
- Lateral Movement Techniques 2026 — Day 28 covers PsExec, WMI, and DCOM lateral movement — the techniques that position you on the high-value hosts where persistence has maximum strategic value.
- 100-Day Ethical Hacking Course — The complete course hub — Day 30 persistence sits at the milestone of the post-exploitation phase, completing the attack chain from initial access through data theft to maintained access.
- MITRE ATT&CK — Persistence Tactic — The official MITRE ATT&CK Persistence tactic page listing all 19 technique groups including T1547 (Boot/Logon Autostart), T1053 (Scheduled Tasks), and T1546 (Event-Triggered Execution) with real-world procedure examples.
- PayloadsAllTheThings — Windows Persistence — Community-maintained comprehensive Windows persistence techniques reference — registry keys, startup locations, COM hijacking, DLL side-loading, and 30+ additional methods beyond the four covered today.

