RUN KEY
SCHEDULED TASK
RE-INFECTION
SESSIONS
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting Infostealer Persistence and Re-Infection

Most stealers do not persist because they do not need to. The loader does, and the stolen sessions persist on their own.

Scroll

A pure smash-and-grab stealer collects, uploads and deletes itself. But the loader that delivered it often persists, some families do too, and users re-infect themselves by running the same cracked installer again. Meanwhile the stolen cookies and tokens keep working after the host is clean. Detection and response must cover all three.

Signals at a Glance

SignalWhereATT&CK
Run or RunOnce value pointing to AppData, Temp, ProgramData or PublicSysmon 13, EDR registryT1547.001
Scheduled task created at logon or on a short interval running a user-writable binarySecurity 4698, Sysmon 1T1053.005
New Startup-folder item from a script or archive-extracted binarySysmon 11T1547.001
Same family reappearing on the same host after remediationEDR, case historyT1204
Stolen session or token still valid after the host is cleanedIdentity logsT1550.004

Run Keys and Scheduled Tasks

Both mechanisms are well covered by public content. The discriminator for stealer chains is the target path: a value or task that runs a binary from a user-writable directory, particularly one with a random-looking name:

title: Run Key Value Pointing to User-Writable Path
logsource:
  category: registry_set
  product: windows
detection:
  selection:
    TargetObject|contains:
      - '\CurrentVersion\Run\'
      - '\CurrentVersion\RunOnce\'
    Details|contains:
      - '\AppData\'
      - '\Temp\'
      - '\ProgramData\'
      - '\Users\Public\'
  filter_known:
    Details|contains:
      - '\AppData\Local\Microsoft\OneDrive\'
      - '\AppData\Local\Programs\'
  condition: selection and not filter_known
level: medium
# tune/validate: many per-user installers register here; allowlist by signer and path
// Microsoft Defender (KQL) - scheduled task created to run a user-writable binary
DeviceProcessEvents
| where FileName =~ "schtasks.exe" and ProcessCommandLine has "/create"
| where ProcessCommandLine has_any ("\\AppData\\","\\Temp\\","\\ProgramData\\","\\Users\\Public\\")
| where ProcessCommandLine has_any ("onlogon","onstart","minute","/sc daily")
| project Timestamp, DeviceName, AccountName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessFolderPath
// tune/validate: also review tasks created through the COM API, which bypass schtasks.exe

Re-Infection and Stolen Sessions

Vetted sources

Use SigmaHQ Run-key and scheduled-task rules, Elastic persistence detections, Splunk ESCU analytics for scheduled task creation, and the MITRE ATT&CK T1547.001 and T1053.005 pages. Baseline per-user installers in your environment; many legitimate applications register Run keys under AppData.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026