Skip to content

Persistence

IFEO and Winlogon persistence

IFEO and Winlogon cheat sheet: Debugger hijacks, GlobalFlag and SilentProcessExit, sticky keys backdoors, Userinit/Shell, Notify and AppInit_DLLs.

Location
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<exe>
Proves
A program launch, process exit or user logon was hijacked to run another binary
Timestamps
IFEO, SilentProcessExit and Winlogon key LastWrite as FILETIME, UTC; replaced accessibility binaries carry NTFS $SI/$FN times
Retention
Values persist until removed; older values in hive transaction logs, shadow copies and unallocated hive space
Access
Administrator; SOFTWARE and NTUSER.DAT locked live: reg query works live, otherwise raw NTFS (KAPE) or VSS
Evidence of
Persistence
Type
Registry
Windows
XPVista / 78 / 8.11011
KAPE target
RegistryHivesSystemRegistryHivesUser
Velociraptor
Windows.Triage.Targets:RegistryHivesSystemRegistryHivesUser

What it is

This page groups registry-based persistence that hijacks built-in Windows behaviour instead of adding an obvious autostart entry. All of it lives in the SOFTWARE hive (plus a per-user Winlogon key) and needs administrative rights to set up.

  • Image File Execution Options (IFEO) is a debugging feature: a Debugger value under IFEO\<name>.exe makes Windows launch the "debugger" instead of the program, with the program's path as an argument. Pointing it at a payload hijacks every launch of that executable.
  • Silent process exit monitoring (Windows 7 and later) launches a MonitorProcess when a monitored program exits.
  • Accessibility backdoors replace or hijack sethc.exe, utilman.exe and similar binaries so that a key combination at the logon screen opens a SYSTEM shell.
  • Winlogon values (Userinit, Shell, and on XP Notify) define what runs at each logon.
  • AppInit_DLLs loads DLLs into every process that loads user32.dll.

Location

MechanismLocationWindows versions
IFEO Debugger / GlobalFlagSOFTWARE: Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<exe> (and WOW6432Node\...)All
Silent process exitSOFTWARE: Microsoft\Windows NT\CurrentVersion\SilentProcessExit\<exe>7 and later
Accessibility binariesC:\Windows\System32\sethc.exe, utilman.exe, osk.exe, Magnify.exe, Narrator.exe, DisplaySwitch.exe, AtBroker.exe (file or IFEO)All
Winlogon (machine)SOFTWARE: Microsoft\Windows NT\CurrentVersion\Winlogon (values Userinit, Shell)All
Winlogon (user)NTUSER.DAT: Software\Microsoft\Windows NT\CurrentVersion\Winlogon (Shell)All
Winlogon notification packagesSOFTWARE: ...\Winlogon\Notify\<name> (DLLName)XP / Server 2003 only
AppInit_DLLsSOFTWARE: Microsoft\Windows NT\CurrentVersion\Windows (AppInit_DLLs, LoadAppInit_DLLs, RequireSignedAppInit_DLLs) and WOW6432Node\...All; disabled by Secure Boot on 8+

What it proves

  • A hijack was configured: the executable targeted and the binary or command that replaces or follows it.
  • Privilege: writing these keys (and replacing System32 binaries) requires administrator or SYSTEM rights, so a hit implies prior privileged access.
  • Pre-logon access for accessibility backdoors: anyone reaching the logon screen, locally or over RDP without Network Level Authentication, gets a SYSTEM process.
  • It does not prove the hijack fired. Look for execution of the payload and, for accessibility abuse, for sethc.exe/utilman.exe spawning cmd.exe.

Key fields

ValueMeaning
IFEO\<exe>\DebuggerProgram launched instead of <exe>; a legitimate value is rare outside developer machines
IFEO\<exe>\GlobalFlagBit 0x200 (FLG_MONITOR_SILENT_PROCESS_EXIT) enables silent-exit monitoring
SilentProcessExit\<exe>\ReportingModeBit flags: 0x1 launch monitor process, 0x2 write dumps, 0x4 show notification
SilentProcessExit\<exe>\MonitorProcessCommand line run when <exe> exits
SilentProcessExit\<exe>\LocalDumpFolderWhere dumps go when ReportingMode includes 0x2
Winlogon\UserinitDefault C:\Windows\system32\userinit.exe,; extra comma-separated entries also run
Winlogon\ShellDefault explorer.exe; anything else replaces or adds to the shell
Winlogon\Notify\<name>\DLLNameDLL loaded by Winlogon on XP
AppInit_DLLs / LoadAppInit_DLLsDLL list and on/off switch (1 = load)

Timestamps

TimestampSet whenFormatPitfalls
IFEO\<exe> key LastWriteValues under the key changeFILETIME, UTCMany IFEO subkeys exist legitimately and are touched by updates
SilentProcessExit\<exe> LastWriteMonitor configuredFILETIME, UTCKey is absent on most systems, so its presence is already notable
Winlogon key LastWriteAny Winlogon value changesFILETIME, UTCWindows and installers also update unrelated values in this key
Accessibility binary $SI / $FN timesFile replacedNTFS, UTCCopy tools may preserve source times; compare $FN, size and hash with a clean build

Retention and clearing

  • Registry values stay until removed; old values can survive in hive transaction logs, volume shadow copies and unallocated hive space.
  • A replaced accessibility binary may be restored by Windows File Protection or System File Checker, so a clean file today does not rule out past abuse; check the USN journal for renames and overwrites in System32.
  • When a monitored process exits silently, the Application log records an entry from the Process Exit Monitor source.
  • ReportingMode 0x2 with LocalDumpFolder is also abused to make Windows write a memory dump of lsass.exe; a SilentProcessExit\lsass.exe key is credential-theft evidence.

Collection

  • KAPE target: RegistryHivesSystem (SOFTWARE) and RegistryHivesUser (per-user Winlogon). No dedicated target exists; the accessibility binaries are not collected by these targets, so hash them from the image or add a file collection for System32.
  • Velociraptor (Windows.Triage.Targets): RegistryHivesSystem, RegistryHivesUser. Live: Windows.Persistence.Debug (IFEO Debugger) and Windows.Persistence.SilentProcessExit.
  • Built-in:
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" /s /v Debugger
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit" /s
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Userinit
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" /v AppInit_DLLs
certutil -hashfile C:\Windows\System32\sethc.exe SHA256

Parsing tools

  • Registry Explorer / RECmd (Eric Zimmerman): review the keys and export them with community batch files.
  • RegRipper: imagefile (IFEO Debugger, including WOW6432Node), winlogon_tln (alerts on non-default Userinit and Shell) and appinitdlls.
  • Autoruns (Sysinternals, free): Image Hijacks, Winlogon and AppInit tabs, live or offline. Oddvar Moe showed in 2018 that GlobalFlag/SilentProcessExit persistence was not displayed by Autoruns at the time, so check those keys directly.
  • Velociraptor: Windows.Persistence.Debug, Windows.Persistence.SilentProcessExit.
  • Plaso: winlogon registry plugin.

Investigation tips

  • List every IFEO subkey with a Debugger value; accessibility binaries and security tools are common targets. Process Explorer's "Replace Task Manager" option sets a legitimate Debugger on taskmgr.exe, so check the value's target.
  • Check GlobalFlag values for bit 0x200 and match each one to a SilentProcessExit subkey.
  • Hash sethc.exe, utilman.exe, osk.exe, Magnify.exe, Narrator.exe, DisplaySwitch.exe and AtBroker.exe: a hash equal to cmd.exe or explorer.exe, or a mismatched version resource, is a replaced binary.
  • Look for Userinit with more than one entry and for Shell values other than explorer.exe, in both HKLM and every user's NTUSER.DAT.
  • A LoadAppInit_DLLs of 1 on a Secure Boot machine is inert but still shows intent.
  • Confirm execution with Prefetch of the payload, Security 4688 process creation (if audited), and WER or dump files for silent-exit abuse. Payloads are often LOLBins.

Related artifacts

Glossary terms

All artifacts on one page: cheat sheet