Credential Dumping via Malicious Network Provider Registration
Adversaries can exploit the Windows Network Provider architecture by registering malicious DLLs to intercept and dump cleartext credentials during user authentication events.
Adversaries may attempt to gain persistent access to cleartext credentials by manipulating the Windows Network Provider (NP) subsystem. By adding a malicious entry to the registry under the NetworkProvider key, an attacker can force Windows to load a rogue DLL whenever a user logs in or authenticates. This technique, notably implemented by the NPPSpy tool, allows the malicious library to act as a man-in-the-middle, capturing credentials as they pass through the provider interface. Because the Network Provider is a core system component, this method facilitates both credential theft and stealthy persistence, as the malicious library is loaded into the context of legitimate system processes like winlogon.exe.
Attack Chain
- Attacker gains elevated (Administrator or SYSTEM) privileges on the target Windows host.
- Attacker prepares a malicious DLL designed to implement the Network Provider interface.
- Attacker drops the malicious DLL to a filesystem location (e.g., C:\Windows\System32).
- Attacker modifies the registry key HKLM\System\CurrentControlSet\Services\ to create a new subkey for the provider.
- Attacker adds a NetworkProvider subkey with a 'ProviderOrder' or similar registration.
- Attacker points the 'Path' or 'DLLName' value within the registry to the malicious library.
- Upon the next user login or network authentication event, the Windows service controller loads the malicious DLL.
- The malicious code hooks the authentication function, captures the cleartext credentials, and exfiltrates them.
Impact
Successful exploitation leads to the compromise of cleartext user credentials, potentially allowing for lateral movement, privilege escalation, and domain-wide compromise within an enterprise network.
Recommendation
- Deploy the Sigma rule below to monitor for registry-based registration of unauthorized network providers using the command line.
- Audit existing keys under HKLM\System\CurrentControlSet\Services\ for unexpected NetworkProvider configurations.
- Establish a baseline of authorized network providers in the environment and alert on any additions.
Immediate actions
Deploy registry monitoring for HKLM\System\CurrentControlSet\Services\*\NetworkProvider
Threat Hunt
Search for existing registry keys under System\CurrentControlSet\Services\ that are not in the standard allowlist
Data: Endpoint registry snapshots
Mitigations
Restrict local administrator rights to prevent registry modifications
Persistence and credential dumping
Detection coverage 1
Detect Potential Credential Dumping via New NetworkProvider Registration
highDetects the creation or modification of a network provider registry path via command line, a technique used by NPPSpy to capture cleartext credentials.
Detection queries are available on the platform. Get full rules →