The persistence/* package tree groups Windows-only mechanisms
that re-launch an implant across reboots and user logons. The
Mechanism interface is the composition
primitive: each sub-package returns a Mechanism, and
InstallAll / VerifyAll /
UninstallAll operate on a flat slice — operators typically
install two or three mechanisms in parallel so failure of any
single one (cleanup sweep, AV remediation, EDR auto-roll-back)
does not lose persistence.
flowchart TB
subgraph trig [Triggers]
LOGON[user logon]
BOOT[boot]
SCHED[schedule / time]
CLICK[user execution]
end
subgraph mechs [persistence/*]
REG[registry<br>HKCU + HKLM<br>Run / RunOnce]
ST[startup<br>StartUp-folder LNK]
SCHEDP[scheduler<br>COM ITaskService]
SVC[service<br>SCM SYSTEM]
ACC[account<br>local user + admin]
LNK[lnk<br>shortcut primitive]
end
subgraph compose [Composition]
IFACE[Mechanism interface]
ALL[InstallAll / VerifyAll / UninstallAll]
end
LOGON --> REG
LOGON --> ST
LOGON --> SCHEDP
BOOT --> SVC
BOOT --> SCHEDP
SCHED --> SCHEDP
CLICK --> LNK
ACC -. companion to .-> SVC
LNK -. underlying primitive of .-> ST
REG --> IFACE
ST --> IFACE
SCHEDP --> IFACE
SVC --> IFACE
IFACE --> ALL
The canonical "redundant persistence" pattern installs two
mechanisms with different telemetry profiles. Loss of one
does not lose persistence; the noisier one provides reach,
the quieter one provides resilience.