foyl Concepts / Persistence
Attack Technique

Persistence

Initial access is temporary. Persistence turns one successful intrusion into a reliable way back through a trigger, stored instruction, credential, service, or cloud grant that survives the defender's first interruption.

TA0003 PersistenceT1053 Scheduled TaskT1547 Boot or Logon AutostartDisruption simulator
SecIntel · re-entry survival simulatorSelect a mechanism

Planted
Process kill
Sign-out
Reboot
Control removal
Persistence is a return path
The mechanism is defined by what triggers it and which disruption boundary it survives

Persistence is not one artifact. It is a relationship between a stored instruction, a trigger, and the access it restores. A scheduled task waits for logon. A service waits for boot. An OAuth grant can issue fresh access without touching the endpoint at all.

This is why a password reset, process kill, or host isolation can appear successful while a separate re-entry layer remains intact. Analysts must identify the survival boundary of every mechanism they find.

01 · TriggerLogon, boot, schedule, application launch, or token refresh starts the mechanism.
02 · StorageRegistry, task scheduler, service configuration, account grants, and mailbox rules hold instructions.
03 · BoundaryReboot, credential reset, reimage, or grant removal determines whether access survives.
Endpoint and cloud persistence
The same objective appears in different control planes
MechanismTriggerWhat removes it
Scheduled taskTime, logon, boot, or eventDelete the task and its payload, then validate related triggers.
Run keyUser logonRemove the value and payload, then inspect adjacent autostart locations.
Windows serviceSystem boot or service controlStop and delete the service, remove the binary, and rebuild if trust is lost.
OAuth consent grantToken refresh or application requestRevoke the grant, sessions, and refresh tokens, then review app credentials.
Mailbox ruleMessage arrivalRemove the rule and forwarding target, then scope messages already redirected.
How defenders find it
Look for creation, modification, execution, and survival after containment

Creation events are strongest when they connect to unusual lineage: a document or script host creating an ONLOGON task, a user process writing a service, or a newly replayed cloud session granting offline_access.

Hunting should also compare the artifact with an approved baseline. Attackers often choose names that resemble update agents or collaboration tools, so the name alone is weak. Creator process, signer, path, owner, trigger, scopes, and first-seen time establish meaning.

Eradication is paired work
Remove the trigger and the capability it launches

Deleting a scheduled task while leaving its payload creates a loose end. Deleting a payload while leaving its trigger creates recurring errors and hides whether another copy exists. Both sides need removal, followed by a new search for sibling mechanisms.

For cloud identity persistence, pair credential restoration with session revocation, refresh-token invalidation, malicious grant removal, inbox-rule review, and application credential rotation where applicable.

See it in foyl Learn
FoylGuard EDRInspect scheduled tasks, Run keys, services, payloads, and creator lineage.
IdentityReview session, token, app-consent, and risky sign-in evidence.
Process Tree HuntSeparate initial execution from the mechanism that survives it.
Account Takeover ResponseRemove both cloud and endpoint persistence in SILENT DELEGATE.
Related concepts