Winsock Providers
Layered service and namespace provider DLLs loaded into programs that use sockets.
Use it to find a provider DLL loaded into programs that use sockets, such as a layered one that can see their traffic.
- SYSTEM
- Persistence
What It Is
Winsock is the Windows interface that network programs use to communicate. Winsock 2 can load layered service providers, DLLs that add processing such as filtering between a program and the base TCP or UDP providers. It can also load namespace providers that resolve names through a service such as DNS. These installed providers form the Winsock catalogue under the WinSock2\Parameters key in HKLM SYSTEM, and layered service providers are deprecated from Windows 8 in favour of the Windows Filtering Platform.
What It Proves
A provider DLL registered in the Winsock catalogues is loaded into processes that use Windows sockets. A layered provider can see or change network traffic and persists across reboots.
What It Does Not Prove
Protocol entries are packed binary, so parse them with a tool, while namespace entries keep their DLL in a plain LibraryPath value. Security and VPN products add genuine providers, so judge by the DLL.
Where It Lives
Winsock Providers lives in the SYSTEM hive, which holds settings for the whole machine. Offline Hive shows the path inside the hive file, as Registry Explorer opens it, and Live System shows the same key as regedit shows it on a running machine. The line under the path is where the hive file sits on disk.
SYSTEM\ ControlSet001\ Services\ WinSock2\ ParametersC:\ Windows\ System32\ config\ SYSTEMWhat It Looks Like
These are three values from this key on ws-042, the fictional machine the wiki follows, decoded into plain English. Each row shows the value as Windows stores it, its name, type and data, then what it tells you.
| Registry Value | What It Tells You |
|---|---|
| The second namespace provider is the genuine mswsock |
| winrnr |
| The first protocol entry begins with the mswsock |
How to Read It
Open Protocol_Catalog9 and NameSpace_Catalog5 under the Winsock Parameters key. Read the DLL path at the start of each PackedCatalogItem, and LibraryPath for each namespace provider. A provider DLL outside System32, or an unexpected one, is the signal.
- When Windows Writes It
- When a provider is installed or removed.
- Which Windows Versions
- Windows XP to 11
- Tools That Parse It
- Autoruns, Registry Explorer, RECmd
Hunt It
Microsoft does not say which keys Defender records, so confirm it records this one first. A hit shows the catalogue changed, so parse it to see which DLL.
// Writes to the Winsock cataloguesDeviceRegistryEvents| where Timestamp > ago( 30d)| where DeviceName startswith "ws-042"| where RegistryKey has_any ( "Protocol_Catalog9", "NameSpace_Catalog5")| project Timestamp, ActionType, RegistryKey, RegistryValueName, RegistryValueData, InitiatingProcessCommandLineConfirm It With
One artefact can mislead on its own. These other records show the same activity, or pin down when it happened, so use them to back up what Winsock Providers shows.
- DLL Load, Sysmon Event 7Not in the RegistryShows the provider DLL loading into programs that use sockets.
Sources
The facts on this page come from these public pages, which say more on each point.