Skip to content

Kerberos-trace - #1

Closed
eve0805 wants to merge 126 commits into
masterfrom
feature/kerberos-ticket-trace-as-tgs-ap-v1
Closed

Kerberos-trace#1
eve0805 wants to merge 126 commits into
masterfrom
feature/kerberos-ticket-trace-as-tgs-ap-v1

Conversation

@eve0805

@eve0805 eve0805 commented May 15, 2026

Copy link
Copy Markdown
Owner

Overview

This PR introduces KerberosTicketTrace support for Metasploit's Kerberos authentication flows.

The goal is to improve visibility into Kerberos ticket acquisition and service-authentication behavior directly during module execution. The implementation uses a Rex-layer subscriber/logger design.

Perspective

Kerberos authentication is widely used in Active Directory and enterprise environments. When Kerberos authentication fails, it can be difficult to tell whether the issue comes from pre-authentication, encryption type negotiation, ticket selection, service principal selection, delegation behavior, AP exchange handling, or the protocol wrapper carrying the Kerberos blob.

This PR adds operator-readable Kerberos trace output for AS/TGS/AP-related paths while keeping tracing opt-in and disabled by default.

Features Implemented

  • Adds KerberosTicketTrace as an opt-in Boolean trace option

  • Adds KerberosTicketTraceColors for request/response trace coloring

  • Registers Kerberos trace options through the shared kerberos_auth_options helper

  • Traces core Kerberos request and response messages:

    AS-REQAS-REPTGS-REQTGS-REPKRB-ERROR

  • Uses the Rex Kerberos client subscriber path for request/response tracing

  • Adds readable Kerberos trace output through a logger subscriber and presenter

  • Handles credential trace output for TGT, TGS, and delegation-related credential paths

Technical Implementation

  • Adds Kerberos trace subscription through the Rex Kerberos client layer
  • Adds logger/presenter logic for readable Kerberos trace output
  • Reuses shared Kerberos option registration through kerberos_auth_options
  • Integrates trace output with existing Metasploit module logging behavior
  • Keeps tracing disabled unless KerberosTicketTrace is enabled
  • Avoids requiring separate Kerberos trace implementations for HTTP, SMB, LDAP, MSSQL, and WinRM at this stage

Testing & Validation

  • Added/updated specs for the Kerberos logger subscriber
  • Tested disabled tracing behavior
  • Tested request and response trace rendering
  • Tested credential trace rendering
  • Tested color configuration behavior

Example Usage

Enable Kerberos ticket tracing in a Kerberos-enabled module:

set KerberosTicketTrace true

Optionally configure trace colors:

set KerberosTicketTraceColors red/blu

Impact

  • Improves debugging of Kerberos authentication failures
  • Makes Kerberos ticket exchanges easier to inspect during normal module execution
  • Helps developers and operators understand AS/TGS/AP-related behavior without external tooling
  • Provides a shared tracing foundation for future Kerberos trace levels, semantic events, AP/GSS/SPNEGO tracing, delegation tracing, offline artifact inspection, and forged-ticket workflows

Future Work

  • Add KerberosTicketTraceLevel with levels such as meta, ticket, and full
  • Add structured semantic Kerberos workflow events
  • Extend AP exchange and GSS/SPNEGO encapsulation tracing
  • Add explicit S4U2Self/S4U2Proxy delegation context tracing
  • Reuse the same output conventions for offline ticket inspection paths
  • Extend tracing to forged-ticket workflows
  • Add documentation for trace usage and output interpretation

Notes on Usage

The new advanced options can be viewed from a Kerberos-enabled module:

./msfconsole
use auxiliary/admin/kerberos/get_ticket
show advanced

References

dledda-r7 and others added 30 commits January 20, 2026 04:48
Co-authored-by: Simon Janusz <85949464+sjanusz-r7@users.noreply.github.com>
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
Add auxiliary/gather/leakix_search module with 6 actions:
SEARCH, HOST, DOMAIN, SUBDOMAINS, PLUGINS, and BULK streaming.
Includes chunked NDJSON streaming for bulk API, MAXRESULTS
limiting, subdomain enumeration, and database reporting.
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
- Remove IOC_IN_LOGS (payload is in POST body, not logged)
- Remove redundant early filter (regex handles it)
- Use non-capturing groups in static asset regex
- Filter protocol-relative URLs before link resolution
- Clarify relative vs absolute path handling in crawler

Co-Authored-By: jvoisin <325724+jvoisin@users.noreply.github.com>
adfoster-r7 and others added 24 commits March 13, 2026 00:23
…/updates_description

Updates description for BeyondTrust command injection
… FreePBX filestore (CVE-2025-64328)

Add authenticated RCE module for FreePBX filestore (CVE-2025-64328)
- Fix DB permissions (bind mount creates files as www-data instead of mysql)
- Force table creation (cli.php skips it when configuration.php already exists)
- Revert entire Encoder working tree, not just getImage.php (78178d1 patched multiple files)
- Run git checkout from inside the container to avoid safe.directory issues
…-generation-script

Improve payload size generation script
…check

Fix version check in ldap_esc_vulnerable_cert_finder
…e-cmd-injection

Add AVideo Encoder getImage.php command injection (CVE-2026-29058)
@github-actions

Copy link
Copy Markdown

Thanks for your pull request! As part of our landing process, we manually verify that all modules work as expected.

We've added the additional-testing-required label to indicate that additional testing is required before this pull request can be merged.
For maintainers, this means visiting here.

eve0805 pushed a commit that referenced this pull request May 29, 2026
@eve0805
eve0805 deleted the feature/kerberos-ticket-trace-as-tgs-ap-v1 branch May 29, 2026 14:07
eve0805 pushed a commit that referenced this pull request Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.