From 463e63c8aec875652a1f84c84a8672290f264515 Mon Sep 17 00:00:00 2001 From: Lucas Falslev Date: Thu, 26 Mar 2026 10:47:23 -0600 Subject: [PATCH 1/4] consolidate properties in build.props, specify RPC->SHC dependency --- Directory.Build.props | 10 ++++++++++ src/CommonLib/SharpHoundCommonLib.csproj | 9 +-------- src/SharpHoundRPC/SharpHoundRPC.csproj | 7 ------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index d9959b78b..43e28623d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,4 +1,14 @@ + + net472 + library + default + Rohan Vazarkar + SpecterOps + GPL-3.0-only + https://github.com/SpecterOps/SharpHoundCommon + 4.6.1 + <_Parameter1>CommonLibTest diff --git a/src/CommonLib/SharpHoundCommonLib.csproj b/src/CommonLib/SharpHoundCommonLib.csproj index ccef35393..4478b94cc 100644 --- a/src/CommonLib/SharpHoundCommonLib.csproj +++ b/src/CommonLib/SharpHoundCommonLib.csproj @@ -1,15 +1,7 @@  - net472 - library SharpHoundCommon - default - Rohan Vazarkar - SpecterOps Common library for C# BloodHound enumeration tasks - GPL-3.0-only - https://github.com/BloodHoundAD/SharpHoundCommon - 4.6.0 SharpHoundCommonLib SharpHoundCommonLib @@ -21,6 +13,7 @@ + diff --git a/src/SharpHoundRPC/SharpHoundRPC.csproj b/src/SharpHoundRPC/SharpHoundRPC.csproj index 185fb33e5..aade66273 100644 --- a/src/SharpHoundRPC/SharpHoundRPC.csproj +++ b/src/SharpHoundRPC/SharpHoundRPC.csproj @@ -1,14 +1,7 @@  - net472 - library SharpHoundRPC - default - Rohan Vazarkar - SpecterOps SAM/LSA Wrapper for C# BloodHound tasks - GPL-3.0-only - 4.6.0 SharpHoundRPC SharpHoundRPC From a3f3c0f49ddea2970e67b7c24d01d0da2a9bb041 Mon Sep 17 00:00:00 2001 From: Lucas Falslev Date: Thu, 26 Mar 2026 14:08:24 -0600 Subject: [PATCH 2/4] let nuget manage rpc project/package dependency --- src/CommonLib/SharpHoundCommonLib.csproj | 27 ++++++------------------ src/SharpHoundRPC/SharpHoundRPC.csproj | 4 ++++ 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/CommonLib/SharpHoundCommonLib.csproj b/src/CommonLib/SharpHoundCommonLib.csproj index 4478b94cc..4aecf3342 100644 --- a/src/CommonLib/SharpHoundCommonLib.csproj +++ b/src/CommonLib/SharpHoundCommonLib.csproj @@ -2,8 +2,10 @@ SharpHoundCommon Common library for C# BloodHound enumeration tasks + README.md SharpHoundCommonLib SharpHoundCommonLib + True $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb @@ -13,7 +15,6 @@ - @@ -25,25 +26,9 @@ - + + + + - - - $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - True - - - - - <_ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'All'))" /> - - - - - - - - - - diff --git a/src/SharpHoundRPC/SharpHoundRPC.csproj b/src/SharpHoundRPC/SharpHoundRPC.csproj index aade66273..8ee67af67 100644 --- a/src/SharpHoundRPC/SharpHoundRPC.csproj +++ b/src/SharpHoundRPC/SharpHoundRPC.csproj @@ -2,6 +2,7 @@ SharpHoundRPC SAM/LSA Wrapper for C# BloodHound tasks + README.md SharpHoundRPC SharpHoundRPC @@ -15,6 +16,9 @@ + + + From c483c8089a5111a8914f7f64af61d73037f08a4d Mon Sep 17 00:00:00 2001 From: Lucas Falslev Date: Thu, 26 Mar 2026 14:53:42 -0600 Subject: [PATCH 3/4] add readmes --- src/CommonLib/README.md | 46 ++++++++++++++++++++++++ src/CommonLib/SharpHoundCommonLib.csproj | 5 +-- src/SharpHoundRPC/README.md | 33 +++++++++++++++++ src/SharpHoundRPC/SharpHoundRPC.csproj | 5 +-- 4 files changed, 81 insertions(+), 8 deletions(-) create mode 100644 src/CommonLib/README.md create mode 100644 src/SharpHoundRPC/README.md diff --git a/src/CommonLib/README.md b/src/CommonLib/README.md new file mode 100644 index 000000000..831dddbfc --- /dev/null +++ b/src/CommonLib/README.md @@ -0,0 +1,46 @@ +# SharpHoundCommon + +SharpHoundCommon provides the high-level shared components used to build AD enumeration workflows. It includes initialization, caching, LDAP helpers, host and service processors, and registry and user-rights collection logic used by SharpHound collectors. + +## When to use this package + +Use `SharpHoundCommon` if you are building a collector or integration that needs higher-level enumeration behavior. This is the package most consumers should start with. + +## Requirements + +- .NET Framework 4.7.2 +- Windows and Active Directory oriented workloads + +## Install + +```powershell +dotnet add package SharpHoundCommon +``` + +## Getting started + +```csharp +using SharpHoundCommonLib; + +CommonLib.InitializeCommonLib(); +``` + +You may optionally provide an `ILogger` and a pre-created `Cache` instance to `CommonLib.InitializeCommonLib(...)`. + +## Included capabilities + +- Shared initialization and cache management via `CommonLib` and `Cache` +- LDAP querying and identity resolution via `LdapUtils` +- Host availability, SMB, and LDAP service checks via `ComputerAvailability`, `SmbProcessor`, and `DCLdapProcessor` +- Registry collection orchestration via `RegistryProcessor` +- User rights, SPN, and certificate-related processing helpers + +## Relationship to SharpHoundRPC + +`SharpHoundCommon` depends on `SharpHoundRPC` and is intended to be the higher-level entry point. Most consumers should not reference `SharpHoundRPC` directly unless they need its lower-level SAM, LSA, NetAPI, or registry APIs. + +## Source and support + +- Source: https://github.com/SpecterOps/SharpHoundCommon +- Issues: https://github.com/SpecterOps/SharpHoundCommon/issues +- License: GPL-3.0-only \ No newline at end of file diff --git a/src/CommonLib/SharpHoundCommonLib.csproj b/src/CommonLib/SharpHoundCommonLib.csproj index 4aecf3342..f67d50775 100644 --- a/src/CommonLib/SharpHoundCommonLib.csproj +++ b/src/CommonLib/SharpHoundCommonLib.csproj @@ -23,12 +23,9 @@ - + - - - diff --git a/src/SharpHoundRPC/README.md b/src/SharpHoundRPC/README.md new file mode 100644 index 000000000..36c1b1f8b --- /dev/null +++ b/src/SharpHoundRPC/README.md @@ -0,0 +1,33 @@ +# SharpHoundRPC + +SharpHoundRPC exposes low-level Windows RPC, Win32, and remote collection helpers used by SharpHoundCommon and SharpHound collectors. It wraps SAM, LSA, NetAPI, and remote registry operations behind C# interfaces and result types. + +## When to use this package + +Use `SharpHoundRPC` directly only if you need low-level RPC or interop access. If you want higher-level enumeration workflows, install `SharpHoundCommon` instead. + +## Requirements + +- .NET Framework 4.7.2 +- Windows-focused functionality +- Appropriate privileges, network reachability, and RPC availability on target systems + +## Install + +```powershell +dotnet add package SharpHoundRPC +``` + +## Included capabilities + +- SAM access through `ISAMServer`, `ISAMDomain`, `SAMServerAccessor`, and related wrappers +- LSA policy access via `LSAPolicy` for SID lookup and privilege enumeration +- NetAPI helpers for sessions, workstation information, and domain controller discovery +- Remote registry strategies using WMI or Remote Registry +- Shared `Result` and related helper types for error handling + +## Source and support + +- Source: https://github.com/SpecterOps/SharpHoundCommon +- Issues: https://github.com/SpecterOps/SharpHoundCommon/issues +- License: GPL-3.0-only \ No newline at end of file diff --git a/src/SharpHoundRPC/SharpHoundRPC.csproj b/src/SharpHoundRPC/SharpHoundRPC.csproj index 8ee67af67..ca63bca65 100644 --- a/src/SharpHoundRPC/SharpHoundRPC.csproj +++ b/src/SharpHoundRPC/SharpHoundRPC.csproj @@ -14,12 +14,9 @@ - + - - - From 8afe88e01d6fa728b3e429de5a6295d4b04d5027 Mon Sep 17 00:00:00 2001 From: Lucas Falslev Date: Thu, 26 Mar 2026 15:51:24 -0600 Subject: [PATCH 4/4] restore version --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 43e28623d..cc52e5cd2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ SpecterOps GPL-3.0-only https://github.com/SpecterOps/SharpHoundCommon - 4.6.1 + 4.6.0