Huntbook by Predefender

part-5

Windows Registry Hunting

Author: Roger C.B. Johnsen

Registry data is both live configuration and historical evidence. A key’s presence is rarely enough: collect value name, data, hive, user SID, last-write time, writing process, and surrounding activity. Remember 32-bit and 64-bit views, per-user hives, CurrentControlSet resolution, and offline hive paths.

Persistence and execution

PathHunt focus
HKLM/HKCU\Software\Microsoft\Windows\CurrentVersion\Run*New or modified values, user-writable payload paths, script hosts.
HKLM\SYSTEM\CurrentControlSet\ServicesNew services/drivers; inspect ImagePath, Start, account, and failure actions.
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCacheCorrelate with task XML and Task Scheduler logs; do not parse in isolation.
...\Image File Execution Options\<image>Unexpected Debugger, GlobalFlag, or verifier settings.
...\SilentProcessExitPair with IFEO; can trigger monitor processes.
HKLM/HKCU\Software\Classes\CLSIDCOM hijacking; compare user overrides with machine registrations.
HKCU\Software\Classes\mscfile\shell\open\commandUnexpected handler changes and UAC-bypass patterns.
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinlogonChanges to Shell, Userinit, and notification components.
HKLM\SYSTEM\CurrentControlSet\Control\LsaAuthentication packages, security packages, and LSA protection changes.
HKLM\SYSTEM\CurrentControlSet\Control\Session ManagerBootExecute, AppCertDlls, and other early execution settings.
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLsLegacy DLL injection settings; OS protections affect behaviour.
HKLM\SOFTWARE\Microsoft\Active Setup\Installed ComponentsPer-user execution at logon.
HKCU\EnvironmentUser environment and logon execution abuse, including UserInitMprLogonScript.

Security controls and remote access

Path/valueHunt focus
...\Policies\Microsoft\Windows Defender and Defender policy pathsTamper attempts; interpret with Tamper Protection and product events.
...\Policies\Microsoft\Windows\PowerShellScript block/module logging and transcription changes.
HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest\UseLogonCredentialEnabling clear-text credential caching.
HKLM\SYSTEM\CurrentControlSet\Control\Lsa\RunAsPPLLSA protection state and downgrades.
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnectionsRDP enablement; correlate firewall and service changes.
HKLM\SYSTEM\CurrentControlSet\Control\Lsa\DisableRestrictedAdminDespite the name, 0 enables Restricted Admin Mode and 1 disables it; easy to invert when reading quickly.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUAUAC changes; reboot and policy context matter.

Forensic and activity artefacts

PathWhat it can supportCaveat
HKLM\SYSTEM\MountedDevices and ...\Enum\USBSTORVolume and USB-device associationPresence does not prove malicious transfer.
HKCU\Software\Microsoft\Terminal Server Client\ServersRDP destination historyPer-user artefact; deletion and roaming affect completeness.
HKCU\NetworkMapped drive configurationCorrelate with SMB and logon telemetry.
HKCU\...\Explorer\RunMRURun-dialog historyUser interaction evidence, not a complete execution record.
HKCU\...\Explorer\UserAssistGUI program-use artefactsROT13 names and version-specific binary structures.
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatCacheProgram presence and compatibility metadataDo not claim execution solely from Shimcache.
HKLM\SYSTEM\CurrentControlSet\Services\bam\State\UserSettings\<SID>Recent executable activityVersion, shutdown, and retention behaviour matter.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\UninstallInstalled software metadataAlso inspect Wow6432Node and per-user equivalents.

Collection and pivots

Collect Sysmon Events 12-14, Defender DeviceRegistryEvents, Security process creation, and relevant service/task logs. For offline work, preserve SYSTEM, SOFTWARE, SAM, SECURITY, NTUSER.DAT, and UsrClass.dat plus transaction logs.

  1. Resolve the hive and SID.
  2. Capture old and new value data and the writing process.
  3. Expand environment variables and inspect the referenced file.
  4. Correlate process, logon, service, task, file, and network telemetry.
  5. Compare across peers and policy baselines before declaring maliciousness.

Revision

Revised DateComment
2025-03-21Article added
2026-07-22Corrected semantics and added artefacts, caveats, and pivots
2026-07-22Corrected the DisableRestrictedAdmin value semantics after QA