DSInternals.Win32.RpcFilters
1.2.0
Prefix Reserved
dotnet add package DSInternals.Win32.RpcFilters --version 1.2.0
NuGet\Install-Package DSInternals.Win32.RpcFilters -Version 1.2.0
<PackageReference Include="DSInternals.Win32.RpcFilters" Version="1.2.0" />
<PackageVersion Include="DSInternals.Win32.RpcFilters" Version="1.2.0" />
<PackageReference Include="DSInternals.Win32.RpcFilters" />
paket add DSInternals.Win32.RpcFilters --version 1.2.0
#r "nuget: DSInternals.Win32.RpcFilters, 1.2.0"
#:package DSInternals.Win32.RpcFilters@1.2.0
#addin nuget:?package=DSInternals.Win32.RpcFilters&version=1.2.0
#tool nuget:?package=DSInternals.Win32.RpcFilters&version=1.2.0
About
Library for managing Windows RPC filters.
Main Types
The main types provided by this library are:
RpcFilterManager- Main class for interacting with the Windows Filtering Platform (WFP) to manage RPC filters.RpcFilter- Represents a single RPC filter with all its properties and conditions.WellKnownProtocolTranslator- Translates well-known protocol names to their corresponding UUIDs.
How to Use
The following example shows how RPC filters can be managed using this library. Note that the code is only meant to showcase all the possible parameters, so the resulting filter is not meaningful at all.
using DSInternals.Win32.RpcFilters;
using System.Net;
// Open a Windows Filtering Platform (WFP) session
using var fw = new RpcFilterManager();
// Fetch the effective list of RPC filters
var filters = fw.GetFilters();
// Register a new RPC filter
var filter = new RpcFilter()
{
Name = "TestFilter",
Description = "Test filter description",
Action = RpcFilterAction.Permit,
InterfaceUUID = WellKnownProtocols.RemoteRegistry.ToInterfaceUUID(),
OperationNumber = 25,
Transport = RpcProtocolSequence.ncacn_ip_tcp,
NamedPipe = "\\PIPE\\winreg",
LocalPort = 56345,
DcomAppId = Guid.Parse("10000000-0000-0000-0000-000000000002"),
SDDL = "D:(A;;CC;;;BA)",
SecurityDescriptorNegativeMatch = true,
Audit = RpcFilterAuditOptions.Enabled,
IsPersistent = true,
AuthenticationLevel = RpcAuthenticationLevel.PacketPrivacy,
AuthenticationLevelMatchType = NumericMatchType.LessThan,
AuthenticationType = RpcAuthenticationType.Kerberos,
IsBootTimeEnforced = false,
ImageName = "svchost.exe",
RemoteAddress = IPAddress.Parse("fe80::bf1c:8c8e:f09d:c074"),
LocalAddress = IPAddress.Parse("10.255.255.0"),
LocalAddressMask = 24,
Weight = 3
};
ulong id = fw.AddFilter(filter);
// Delete the freshly registered RPC filter
fw.RemoveFilter(id);
License
DSInternals.Win32.RpcFilters is released as open source under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- System.Memory (>= 4.6.3)
-
net8.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- Added support for auditing RPC parameter buffers in filters. This feature requires Windows 11 25H2 or newer.
- More RPC protocols and operation numbers are now translated to human-readable names.