Overview
The Process DLL Hijack check identifies DLL files loaded by running processes that have weak file permissions. If a DLL used by a privileged process can be modified, an attacker can inject malicious code that executes with the process’s privileges.How It Works
SharpUp performs the following:- Reads known DLLs from
HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls - Enumerates all running processes
- For each process, enumerates loaded DLL modules
- Excludes DLLs in
C:\Windowsdirectory - Excludes KnownDLLs
- Checks if remaining DLLs are writable
- Reports hijackable DLLs with associated process information
Example Output
Exploitation
Method 1: Direct DLL Replacement
Method 2: DLL Proxying
Remediation
1
Identify Writable DLLs
2
Fix DLL Permissions
Detection
Defensive Monitoring
Related Checks
Hijackable Paths
Writable folders in system PATH
Modifiable Service Binaries
Service executables with weak permissions