DSInternals.Win32.RpcFilters 1.1.0

Prefix Reserved
dotnet add package DSInternals.Win32.RpcFilters --version 1.1.0
                    
NuGet\Install-Package DSInternals.Win32.RpcFilters -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DSInternals.Win32.RpcFilters" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DSInternals.Win32.RpcFilters" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="DSInternals.Win32.RpcFilters" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DSInternals.Win32.RpcFilters --version 1.1.0
                    
#r "nuget: DSInternals.Win32.RpcFilters, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DSInternals.Win32.RpcFilters@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DSInternals.Win32.RpcFilters&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=DSInternals.Win32.RpcFilters&version=1.1.0
                    
Install as a Cake Tool

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 = true,
    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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

  • 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.

Version Downloads Last Updated
1.1.0 40 9/26/2025
1.0.0 109 9/25/2025

- Added support for authentication level and security descriptor match operators.