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.5 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 (--opsec)
tanuki auth Unprivileged userspace TGT acquisition with clock skew healing and FAST armoring (--fast)
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 keytab Inspect binary keytab files, principals, KVNOs, and encryption types
tanuki kcm Extract and triage SSSD KCM credential cache streams from local databases
tanuki pac Decode and audit MS-PAC authorization data, group SIDs, and privilege flags
tanuki shadow Dissect Active Directory Shadow Credentials (msDS-KeyCredentialLink, [MS-ADTS] 2.2.20)
tanuki config Zero-DNS unprivileged krb5.conf generator (--enforce-aes, --fast, --stdout)
tanuki fix Idempotent closed-loop remediation (--dry-run to preview)
tanuki purge NIST SP 800-88 cryptographic memory and credential-cache zeroization
tanuki triage Kerberos and SSSD protocol error resolution dictionary with Blue Team telemetry
tanuki ladder Display the 5-rung Tactical Decision Ladder and OPSEC contract
tanuki token Parse and validate workload identity JWTs ([RFC 7519])
tanuki nhi Non-Human Identity operations: inspect, exchange ([RFC 8693]), mesh, and scan
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
1 LOCAL PASSIVE TRIAGE Inspect /etc/krb5.conf, /var/lib/sss/secrets/, and /etc/krb5.keytab with zero network noise
2 ZERO-NOISE OPSEC FILTER Enforce AES-256 or PKINIT and reject legacy RC4-HMAC and broad spraying
3 MACHINE IDENTITY REUSE Leverage the local host account (HOST$) before seeking human credentials
4 SURGICAL PATHFINDING Evaluate Shadow Credentials, AD CS ESC1/ESC8, and RBCD paths
5 DETERMINISTIC ONE-LINER Emit target, prerequisite, tactical command, telemetry, and OPSEC rationale

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 49 Rust tests (library, binary CLI, and 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 6113]: Kerberos Pre-Authentication and Flexible Authentication Secure Tunneling (FAST)
  • [RFC 7519]: JSON Web Token (JWT)
  • [RFC 8693]: OAuth 2.0 Token Exchange
  • [MS-ADTS] 2.2.20: Active Directory Technical Specification: Key Credential Structures (msDS-KeyCredentialLink / Shadow Credentials)
  • [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.5

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.5
File Size Uploaded Provenance Actions
tanuki_ad-2.1.5.tar.gz 185.2 kB With provenance Details for tanuki_ad-2.1.5.tar.gz

Built distribution (wheel)

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

Total release size: 312.0 kB

Release files / tanuki_ad-2.1.5.tar.gz

Download URL tanuki_ad-2.1.5.tar.gz
Size 185.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9fec2f04f6eb16abd49de43aafb93c7add6bfb5bf22d2adb3021f4a2434bc98b
BLAKE2b-256 checksum
How to use checksums
7f933a76bac96ac3a697156c78e5c9f2d46409a40e01ce6db8dd3fc434366036
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 22, 2026.

Transparency log

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

Download URL tanuki_ad-2.1.5-py3-none-any.whl
Size 126.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d34a9a83df33f8c8e6d579d1ddee6900d6646fa89a4799e7216403e69f2c709
BLAKE2b-256 checksum
How to use checksums
aeda4a2fc3ba7b8eb3c2ab69217aa42d3586ddce45157d250d9c6eb12755763c
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 22, 2026.

Transparency log

Security for tanuki-ad 2.1.5

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.5.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 22, 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