Course contentsShow
← Security
Lesson 2133 of 3,05242. Penetration Testing and Red TeamingFree lesson

Registry and File System Permission Weaknesses

Identifying and exploiting weak ACLs on registry keys, files, and folders that allow modification of privileged binaries or configurations.

Registry and File System Permission Weaknesses

What you'll learn: How attackers exploit weak Access Control Lists (ACLs) on Windows registry keys and file system objects to modify privileged binaries or configurations, escalating their privileges.

The Vulnerability

Windows uses ACLs to control who can read, write, or execute files, folders, and registry keys. When administrators misconfigure these permissions—often granting "Everyone" or "Users" write access to sensitive locations—attackers can hijack legitimate system processes or configurations.

Think of it like leaving your house keys under a doormat labeled "For Residents Only"—technically restricted, but functionally available to anyone who looks.

Common Exploitation Scenarios

Registry Key Hijacking: If a service reads configuration from a registry key with weak permissions, you can modify values like ImagePath (the executable the service runs) to point to your malicious binary. When the service restarts, your code executes with SYSTEM privileges.

Binary Replacement: When executables or DLLs in trusted locations (C:\Program Files\, etc.) have weak ACLs, attackers can replace them. The next time the legitimate program runs—often as an administrator or SYSTEM—it executes the attacker's code instead.

Configuration File Manipulation: Applications reading .config, .ini, or .xml files with overly permissive ACLs can be exploited by modifying settings to load malicious libraries or execute commands.

Detection Process

During privilege escalation enumeration, you'd check permissions using tools like icacls (file system) or Get-Acl (PowerShell for registry/files), looking for writable locations by unprivileged users that are accessed by privileged processes.

Key Takeaway: Weak ACLs on registry keys, binaries, and configuration files allow unprivileged users to modify resources used by privileged processes, creating a path to privilege escalation—proper ACL configuration is critical for Windows security.