PT0-001 · Question #61
While trying to maintain persistence on a Windows system with limited privileges, which of the following registry keys should the tester use?
The correct answer is C. HKEY_CURRENT_USER. HKEY_CURRENT_USER is writable by standard users without elevated privileges, making it the correct hive for achieving persistence when administrative rights are unavailable.
Question
While trying to maintain persistence on a Windows system with limited privileges, which of the following registry keys should the tester use?
Options
- AHKEY_CLASSES_ROOT
- BHKEY_LOCAL_MACHINE
- CHKEY_CURRENT_USER
- DHKEY_CURRENT_CONFIG
How the community answered
(21 responses)- B5% (1)
- C90% (19)
- D5% (1)
Why each option
HKEY_CURRENT_USER is writable by standard users without elevated privileges, making it the correct hive for achieving persistence when administrative rights are unavailable.
HKEY_CLASSES_ROOT is a merged view of HKLM and HKCU class registrations, and writing to the system-level portions of HKCR requires administrative privileges that a limited-privilege user does not have.
HKEY_LOCAL_MACHINE contains system-wide configuration and requires administrative privileges to write, making it inaccessible for persistence operations under a limited user account.
HKEY_CURRENT_USER (HKCU) stores per-user configuration data and is fully writable by the currently logged-in user without requiring elevated privileges. The subkey HKCU\Software\Microsoft\Windows\CurrentVersion\Run is a well-known autorun location that executes entries at each user login, providing reliable persistence. This allows an attacker operating with only standard user rights to survive reboots without ever needing administrative access.
HKEY_CURRENT_CONFIG contains hardware profile data for the current boot session and does not provide run-key or autostart persistence mechanisms suitable for surviving reboots.
Concept tested: Windows registry persistence with limited user privileges
Source: https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights
Topics
Community Discussion
No community discussion yet for this question.