Theory · 9 min · Windows endpoint monitoring
Persistence on Windows
Know where attackers make code survive a reboot, and which event shows it.
Persistence is whatever makes the attacker’s code run again after a reboot or logoff. The common places are few, so you can check them all.
Scheduled tasks: event 4698 (a scheduled task was created, needs object access auditing) and the task XML under C:\Windows\System32\Tasks. Services: event 7045 in the System log when a service is installed.
Run keys: HKCU or HKLM\Software\Microsoft\Windows\CurrentVersion\Run, visible as Sysmon event 13 (registry value set). The Startup folder: Sysmon event 11 (file created).
Look at who created it, where the target lives (AppData, Temp, ProgramData are suspicious for system-wide persistence), and whether its name imitates something real, like a task under the Windows Update folder created by a normal user.
Your turn: match observations. Which event shows each persistence step?
Do the interactive check Free, in the browser.
Sources
- 4698(S): A scheduled task was created Microsoft Learn
- Sysmon (event IDs 1 to 29) Microsoft Learn
- ATT&CK T1053.005: Scheduled Task/Job: Scheduled Task MITRE ATT&CK v20
- ATT&CK T1543.003: Create or Modify System Process: Windows Service MITRE ATT&CK v20