Windows Fundamentals · beginner · ~10 min
Navigate the registry hives and explain why autorun keys and stored secrets matter.
The registry is Windows' config database, rooted in hives (HKLM machine-wide, HKCU per-user) of keys and values. Autorun keys, stored secrets, and flags like AlwaysInstallElevated make it both a persistence spot and a privesc source.
The registry holds autostart entries (persistence + escalation), plaintext secrets some apps leave behind, and escalation flags. Querying Run keys, autologon creds, and AlwaysInstallElevated is routine Windows enumeration.
Hives. HKLM (machine), HKCU (user). Keys/values. Folders → typed data. Autorun keys. Run keys = persistence and, if writable at HKLM, escalation. Stored secrets. Plaintext creds (e.g. autologon). AlwaysInstallElevated. MSI-as-SYSTEM flag.
The registry is Windows' hierarchical configuration database — settings for the OS, drivers, services, and applications, all in one tree.
Hives are the top-level roots:
HKLM\...\Run, HKCU\...\Run, services keys — programs that launch automatically. Both an attacker persistence spot and a privesc vector (if a normal user can write an HKLM autorun that runs as admin/SYSTEM).winlogon autologon credentials live here in plaintext historically.reg query/reg add (CLI), regedit (GUI). Searching the registry for credentials and writable autorun keys is standard Windows enumeration.
The registry centralises Windows configuration in hives of keys/values; its autorun keys, leftover secrets, and escalation flags make it a recurring target for both persistence and privilege escalation.