Skip to main content

Tanuki Logo

Tanuki

Non-Human Identity & Hybrid Active Directory Operator for Linux Workloads
Protocol-first, zero root privileges, zero host configuration footprint, zero noise.

Version 2.1.0 Rust Systems Core Python Reference Engine RFC Standards License: MIT OR Apache-2.0

Overview • Quick Start • Commands • Architecture • Validation • Lineage & Credits


Overview

Modern cloud-native and on-premise environments increasingly run Linux workloads (Kubernetes pods, AI coding agents, CI/CD runners, containerized batch workers) that must authenticate to enterprise Active Directory domains without a full domain join, Kerberos daemons (sssd / winbind), or root privileges.

Tanuki is a protocol-first Active Directory operator built for unprivileged Linux userspace. It runs the full Purple Team lifecycle under human-in-the-loop control: pre-flight triage, cryptographic ticket negotiation, quantitative privilege tiering, closed-loop self-healing, and forensic audit telemetry. It is also agent-operable, exposing a structured skill manifest so tools like Claude Code, Cursor, and Google Antigravity can drive it one deterministic step at a time.

Highlights:

  • Living off the domain. The Python engine uses only the 3.10+ standard library. Zero pip dependencies. The Rust core is a 1.8 MB static binary built with #![forbid(unsafe_code)].
  • Strictly unprivileged (UID 1000). No sudo, no root, no CAP_SYS_TIME, and no mutation of /etc/krb5.conf or system files.
  • Quantitative blast radius. Scores identity risk (0-100), classifies Active Directory tiers, and emits deterministic PowerShell remediation recipes.
  • Deterministic and auditable. Military-brief output, semantic exit codes, and in-memory clock skew healing clamped to the Kerberos standard 300 second maximum.

For the full engine comparison and subsystem map, see docs/ARCHITECTURE.md.

Tanuki blast radius and privilege tiering


Quick Start

1-line universal install

# Detects the Rust musl binary or falls back to the Python standard engine
curl -sSfL https://raw.githubusercontent.com/Mafifrizi/tanuki/main/install.sh | bash

Manual installation

# Rust systems core
cargo install --path crates/tanuki-cli

# Python reference engine
pipx install git+https://github.com/Mafifrizi/tanuki.git

Zero-install direct execution

git clone https://github.com/Mafifrizi/tanuki.git
cd tanuki
python3 -m tanuki doctor --json

Commands

Both engines share the same command surface and flags. Full usage, every flag, and verified LDAPS examples are in docs/USAGE.md.

Command Purpose
tanuki doctor Pre-flight diagnostics across domain config, credentials, network, and OPSEC telemetry
tanuki auth Unprivileged userspace TGT acquisition with in-memory clock skew healing
tanuki tgs Kerberos service ticket acquisition for a target SPN
tanuki blast Quantitative blast radius scoring, privilege tiering, and PowerShell remediation recipes
tanuki ldap Unprivileged LDAP recon (--query spn | asreproast | rbcd | shadow | unconstrained | all)
tanuki adcs Passive AD CS template scanner for ESC1 through ESC11
tanuki config Zero-DNS unprivileged krb5.conf generator targeting the KDC by IP
tanuki fix Idempotent closed-loop remediation (--dry-run to preview)
tanuki purge NIST SP 800-88 cryptographic memory and credential-cache zeroization
tanuki skill Export the agent skill manifest (--json for machine-actionable schema)

Add --json to any command for structured output. Run tanuki -i for the interactive wizard.

The decision ladder

Tanuki follows a fixed 5-rung tactical decision ladder to prevent privilege escalation loops, reduce authentication noise, and keep every action forensically defensible. The model is documented in references/tactical_ladder.md.

Rung Action Description
0 DIAGNOSE Pre-flight audit of credentials, enctypes, and network paths
1 AUTHENTICATE Userspace AS-REQ TGT negotiation with clock skew tolerance
2 AUTHORIZE TGS service ticket acquisition for verified SPN endpoints
3 ASSESS Quantitative blast radius calculation and tier scoring
4 PURGE Cryptographic memory zeroization (NIST SP 800-88)

Validation

Tanuki is validated against live hybrid infrastructure: an unprivileged Kali workstation (UID 1000) connecting directly to a Windows Server 2022 Domain Controller (DC01.lab.local), proving each rung end to end through to Blue Team forensic telemetry on the DC. It also ships 500+ Python unit tests and 39 Rust tests (library plus integration), all green.

See the full milestone walkthrough with terminal proofs in docs/VALIDATION.md.


Lineage & Credits

Tanuki is engineered by Muhammad Afif Rizi (@Mafifrizi) and Muhamad Dian Alvito.

Tanuki draws inspiration and tradecraft from two foundational projects:

  • Tim Brown (@timb-machine): Created Linikatz and pioneered Linux Active Directory assessment techniques, keytab analysis, and credential cache harvesting.
  • Dietrich Gebert (@dietrichayala): Created Ponytail and demonstrated how a disciplined decision ladder prevents AI agent hallucination and conversational bloat.

Technical Specifications Implemented

  • [RFC 4120]: The Kerberos Network Authentication Service (V5)
  • [RFC 4511]: Lightweight Directory Access Protocol (LDAP): The Protocol
  • [RFC 8693]: OAuth 2.0 Token Exchange
  • [MS-KILE]: Kerberos Protocol Extensions
  • [MS-PAC]: Privilege Attribute Certificate Data Structure
  • [MS-DTYP]: Windows Data Types & Security Descriptor Structures
  • [NIST SP 800-88]: Guidelines for Media Sanitization (Rev. 1)

Contributing

We welcome contributions from protocol researchers, systems engineers, and toolmakers. Tanuki enforces two hard invariants: zero external dependencies in the Python core, and #![forbid(unsafe_code)] in the Rust core.

  • Developer guide: see CONTRIBUTING.md for local setup, testing commands, and PR guidelines.
  • Good first issues: shell autocompletion (bash / zsh / fish), error dictionary expansion in tanuki triage, and SARIF or Markdown export formatters.
  • Reporting issues: use the structured issue templates.

License

Tanuki is dual-licensed under either:

You may choose either license.

Metadata

Release files for tanuki-ad 2.1.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 tanuki-ad 2.1.0
File Size Uploaded Provenance Actions
tanuki_ad-2.1.0.tar.gz 182.8 kB With provenance Details for tanuki_ad-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tanuki-ad 2.1.0
File Interpreter ABI Platform Actions
tanuki_ad-2.1.0-py3-none-any.whl Python 3 none any Details for tanuki_ad-2.1.0-py3-none-any.whl

Total release size: 307.8 kB

Release files / tanuki_ad-2.1.0.tar.gz

Download URL tanuki_ad-2.1.0.tar.gz
Size 182.8 kB
Tags Source
SHA-256 checksum
How to use checksums
56727fba7942f8aeace31a9b1e03356652a67e90ec93e4a3c7e61de91a641a38
BLAKE2b-256 checksum
How to use checksums
226d57f8e087b3616ba74b23f2af797b4a78c6dfc4000a8c453ab1b3e2a76e95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / tanuki_ad-2.1.0-py3-none-any.whl

Download URL tanuki_ad-2.1.0-py3-none-any.whl
Size 125.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5a71ad5c037349fbd80cc6eba97b620eaefa2c70afc0cd3b7ecc50ecc9b046d
BLAKE2b-256 checksum
How to use checksums
7d86764632e5d3ccd58aed927b27ab707e9c3239b0012f7d9ca9bf5b7f5ecf06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for tanuki-ad 2.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tanuki_ad-2.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

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.

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