Skip to main content

Description

While reading BloodHound.py, a Linux alternative to SharpHound, we observed that object collection is performed on a case-by-case basis. Specific conditions are evaluated to determine the most relevant information for each collected object, and tailored actions are taken accordingly.

We sought to follow a similar logic while implementing Soaphound.py, aiming to collect the most valuable information during object enumeration through ADWS. In addition, since user sessions on machines are not collected through LDAP, we reused BloodHound.py's approach to perform this collection.

The tool is currently being improved to cover all specific data collection scenarios. At the time of writing, it is capable of collecting Active Directory objects via the ADWS service and retrieving remote session data similar to what BloodHound.py achieves.

Documentation

Full documentation lives on the Soaphound.py Wiki.

Getting started

Collection

Primitives

Attack playbooks

Defender's corner

Collection methods

Preset Network ports AD coverage Use case
-c Default (default) TCP:9389 (ADWS, including cross-NC referral follow) + TCP:445 (SMB SYSVOL when GPOs are found, plus per-host sessions) Full — all objects, GPO settings, local admins, GPP cpassword, trust risks Standard pentest, AD audit
-c Stealth TCP:9389 only (ADWS + referral follow stays on ADWS) Partial — AD objects only; GPO settings, local admins, cpassword and computer sessions NOT collected Red Team ops where SMB is blocked or monitored
-c ADWSOnly (deprecated alias of Stealth) Same as Stealth Backward compatibility, will be removed in v1.5

Note on referrals. When a cross-naming-context query (for example a trust in another forest partition) returns an ADWSReferralError, Soaphound.py opens a new ADWS session on the referred DC. The target URL is formatted as ldap://<fqdn>/... by the server, but the client connection stays on TCP:9389 — no native LDAP (TCP:389) traffic is generated.

Why two modes? The richest offensive signals (local admins, user rights, GPP cpassword credentials) live in SYSVOL, not in the AD database. A proper reconnaissance requires reading both over ADWS AND over SMB SYSVOL. The Stealth mode exists for the specific case where SMB TCP:445 is unavailable or must stay silent, with the explicit trade-off of a partial output.

More information: you may check out the short blog post

Usage

 .oooooo..o                                oooo                                                .o8                             
d8P'    `Y8                                `888                                               "888                             
Y88bo.       .ooooo.   .oooo.   oo.ooooo.   888 .oo.    .ooooo.  oooo  oooo  ooo. .oo.    .oooo888      oo.ooooo.  oooo    ooo 
 `"Y8888o.  d88' `88b `P  )88b   888' `88b  888P"Y88b  d88' `88b `888  `888  `888P"Y88b  d88' `888       888' `88b  `88.  .8'  
     `"Y88b 888   888  .oP"888   888   888  888   888  888   888  888   888   888   888  888   888       888   888   `88..8'   
oo     .d8P 888   888 d8(  888   888   888  888   888  888   888  888   888   888   888  888   888  .o.  888   888    `888'    
8""88888P'  `Y8bod8P' `Y888""8o  888bod8P' o888o o888o `Y8bod8P'  `V88V"V8P' o888o o888o `Y8bod88P" Y8P  888bod8P'     .8'     
                                 888                                                                     888       .o..P'      
                                o888o                                                                   o888o      `Y8P'       
                                                                                                    (made by @belettet1m0ree)


usage: soaphound [-h] [-c COLLECTIONMETHOD] -d DOMAIN [-v] [--ts] -u USERNAME
                 [-p PASSWORD] [--hashes HASHES] [-k] [-aesKey HEXKEY]
                 [-dc-ip HOST] -dc HOST [--zip] [-op PREFIX_NAME]
                 [-wk NUM_WORKERS] [--output-dir OUTPUT_DIR]
                 [--cert-find] [--cert-find-force-epa {auto,enabled,disabled}]
                 [--cert-find-skip-web-probe] [--cert-find-ca-rpc]

Python based ingestor for BloodHound using ADWS

options:
  -h, --help            show this help message and exit
  -c, --collectionmethod {Default,Stealth,ADWSOnly}
                        Collection preset. Default: AD objects via ADWS +
                        GPO via SMB SYSVOL (full output). Stealth: ADWS
                        only, TCP:9389 only, no SMB. ADWSOnly: deprecated
                        alias of Stealth, will be removed in v1.5.
  -d, --domain DOMAIN   Domain to query.
  -v                    Enable verbose output.
  --ts                  Add timestamp to logs.

authentication options:
  NTLM authentication is supported using a username/password or NT hash.
  Kerberos authentication is supported through -k using the ccache pointed to
  by KRB5CCNAME.

  -u, --username USERNAME
                        Username. Format: username[@domain].
                        If the domain is unspecified, the current domain is used.
  -p, --password PASSWORD
                        Password.
  --hashes HASHES       LM:NTLM hashes.
  -k, --kerberos        Use Kerberos authentication through the ticket available
                        in the ccache pointed to by KRB5CCNAME.
  -aesKey, --aes-key HEXKEY
                        AES key, 128 or 256 bits, for Kerberos authentication.
                        Used for SMB collection in Default mode.
  -dc-ip, --kdc-ip HOST
                        KDC IP address or hostname. Useful when the ADWS DC and
                        the KDC differ. Defaults to the value provided with -dc.

collection options:
  -dc, --domain-controller HOST
                        DC to query, hostname or FQDN.
  --zip                 Compress the JSON output files into a zip archive.
  -op, --outputprefix PREFIX_NAME
                        String to prepend to output file names.
  -wk, --worker_num NUM_WORKERS
                        Number of workers, default 100.
  --output-dir OUTPUT_DIR
                        Output folder, default current directory.
  --cert-find           Enumerate AD CS certificate templates and CAs like certipy find.
  --cert-find-force-epa {auto,enabled,disabled}
                        Override HTTPS EPA detection for AD CS Web Enrollment: auto, enabled, or disabled.
  --cert-find-skip-web-probe
                        Do not probe HTTP/HTTPS /certsrv/ endpoints AD CS Web Enrollment and ESC8 will not be evaluated.
  --cert-find-ca-rpc    Enrich CA configuration through Remote Registry/RPC:
                        User Specified SAN, Request Disposition, Enforce
                        Encryption, Active Policy.

Installation

pipx install soaphound-py
soaphound --help

Note on PyPI namespace - The official PyPI distribution is soaphound-py (with the -py suffix). A separate package named soaphound was published on PyPI on 2026-03-29 by an unrelated third party; that package is not maintained by this project. Always install soaphound-py.

To upgrade later:

pipx upgrade soaphound-py

From git (alternative)

pipx install git+https://github.com/j4s0nmo0n/Soaphound.py
soaphound --help

With poetry (development)

git clone https://github.com/j4s0nmo0n/Soaphound.py
cd Soaphound.py
poetry install
poetry run soaphound --help

With pip in a virtualenv

python3 -m venv ~/venvs/soaphound
source ~/venvs/soaphound/bin/activate
pip install git+https://github.com/j4s0nmo0n/Soaphound.py

Example Usage

Perform ADWS collection with session enumeration

soaphound -d corp.local -u alice -p Password123! -dc dc01 --output-dir output

Perform Stealth collection (ADWS only, no SMB — skips SYSVOL, local admins, cpassword, computer sessions)

soaphound -d corp.local -u alice -p Password123! -dc dc01 --output-dir output -c Stealth

Perform ADCS information collection

soaphound -d corp.local -u alice -p Password123! -dc dc01 --cert-find --cert-find-force-epa auto

Kerberos authentication (-k)

Soaphound supports Kerberos authentication through the -k option and the KRB5CCNAME environment variable.

The ccache may contain a valid TGT or a usable service ticket, depending on the collection mode and the operations being performed.

# Load a Kerberos ticket
export KRB5CCNAME=/tmp/alice.ccache

# Run Soaphound with Kerberos
soaphound -d corp.local -u alice -dc dc01.corp.local -k

# Run Stealth collection with Kerberos (ADWS only, no SMB)
soaphound -d corp.local -u alice -dc dc01.corp.local -k -c Stealth

# Let Soaphound extract the username and domain from the ccache
soaphound -dc dc01.corp.local -k -c Stealth

# Use a different KDC
soaphound -d corp.local -u alice -dc adws.corp.local -dc-ip kdc.corp.local -k

References

  • Falcon Force Team for the initial inspiration.
  • BloodHound.py, for this amazing implementation of BloodHound ingestor.
  • SOAPy by @_logangoins, whose Kerberos NNS implementation is the basis of the -k support.
  • Microsoft for the official protocol documentation.
  • ERNW for the initial boost.
  • X-Force Red for their brilliant implementation of NBFX and research insights.
  • Rabobank Red Team for sharing valuable resources and operational insights.

Metadata

Release files for soaphound-py 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for soaphound-py 1.5.0
File Size Uploaded Provenance Actions
soaphound_py-1.5.0.tar.gz 227.7 kB Without provenance Details for soaphound_py-1.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for soaphound-py 1.5.0
File Interpreter ABI Platform Actions
soaphound_py-1.5.0-py3-none-any.whl Python 3 none any Details for soaphound_py-1.5.0-py3-none-any.whl

Total release size: 462.2 kB

Release files / soaphound_py-1.5.0.tar.gz

Download URL soaphound_py-1.5.0.tar.gz
Size 227.7 kB
Tags Source
SHA-256 checksum
How to use checksums
23b446299263819e12d4a05d109886c6b92f2102f3e787144eb6f46975a14535
BLAKE2b-256 checksum
How to use checksums
0009a9c40ff1bac5c6ca3da54dd562abddf46c43fbd779e66e8566af33652002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / soaphound_py-1.5.0-py3-none-any.whl

Download URL soaphound_py-1.5.0-py3-none-any.whl
Size 234.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99a0d095db8ec1987d38b1312a65c3e274812371b85f53780afe2f8122055746
BLAKE2b-256 checksum
How to use checksums
585bf9796b3f8e020d169a45a29161cdd0437e52d9bb9b42ba7b8f0200db0ffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for soaphound-py 1.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page