Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
detect_CVE-2026-25177 — Production-safe scanner that detects CVE-2026-25177 (AD SPN Unicode Collision) exploitation on Active Directory Domain Controllers. Read-only. | Kitploit
Tools/GitHubGitHub/danaug23/detect_cve-2026-25177
Vulnerability ScannersConfiguration Auditing
GitHubdanaug23/detect_cve-2026-25177

detect_CVE-2026-25177

Production-safe scanner that detects CVE-2026-25177 (AD SPN Unicode Collision) exploitation on Active Directory Domain Controllers. Read-only.

View Repository
35 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

detect-CVE-2026-25177

Production-safe scanner that detects exploitation of CVE-2026-25177 — the Active Directory SPN Unicode Collision vulnerability (CVSS 8.8).

This vulnerability allows any authenticated user with write-SPN permissions to escalate privileges to SYSTEM by injecting Unicode characters into Service Principal Names, bypassing AD's duplicate-SPN validation and causing Kerberos ticket mis-issuance.

What It Detects

  • Unicode characters in SPNs — zero-width spaces, homoglyphs, BOM markers, and other invisible/confusable characters that indicate SPN poisoning
  • Duplicate SPNs across accounts — multiple accounts holding the same SPN (case-insensitive), which can cause Kerberos ticket mis-issuance
  • Recent SPN modifications on user accounts — flags SPNs changed within a configurable time window to catch active exploitation

Safe for Production

  • Read-only — the LDAP connection is opened with read_only=True; no modifications are possible
  • Single LDAP query — searches (servicePrincipalName=*), the same lightweight query used by built-in tools like setspn -Q
  • Fast — completes in under a minute even in environments with 15,000+ accounts
  • Low privilege — any authenticated domain user can run it (default AD read permissions are sufficient)
  • Quick Start

    root@kitploit:~
    pip install -r requirements.txt
    
    # On a domain-joined machine — auto-detects DC, domain, and username
    # Prompts for password securely (never shown in terminal or command history)
    python detect_spn_abuse.py
    
    # Auto-detect with CSV report and recent change detection
    python detect_spn_abuse.py --csv report.csv --days 7
    
    # Specify just the username (auto-detect the rest)
    python detect_spn_abuse.py -u svc_scanner
    
    # Fully manual
    python detect_spn_abuse.py -dc dc01.corp.local -d corp.local -u scanner_svc
    
    # Use LDAPS (port 636)
    python detect_spn_abuse.py --use-ssl
    

    Note: If you omit -p, the script prompts for your password securely — it won't appear in your terminal or command history.

    Example Output

    root@kitploit:~
    +==============================================================+
    |  CVE-2026-25177 - SPN Unicode Collision Detector              |
    |  Read-only scan - safe for production                         |
    +==============================================================+
    
    [+] Connected via NTLM:389 (read-only)
    [*] Scanning all accounts with SPNs...
    [+] Scanned 247 accounts, 1,042 SPNs
    
    ======================================================================
      SCAN RESULTS: 1 finding(s)
      CRITICAL: 1  |  HIGH: 0  |  INFO: 0
    ======================================================================
    
      [CRITICAL] Finding 1: SPN contains 1 suspicious Unicode character(s)
      ────────────────────────────────────────────────────────────
      Account:  jsmith
      DN:       CN=jsmith,CN=Users,DC=corp,DC=local
      SPN:      HTTP​/webserver.corp.local
      SPN Hex:  48545450e2808b2f7765627365727665722e636f72702e6c6f63616c
      Modified: 2026-03-13 14:22:17+00:00
        Position 4: U+200B - Zero-Width Space [invisible]
    
    ======================================================================
    
      RECOMMENDED ACTIONS:
      1. Investigate accounts with CRITICAL findings immediately
      2. Remove any SPNs containing Unicode characters
      3. Check Event Log for SPN modification events (Event ID 4742)
      4. Review delegation permissions (who can write SPNs)
      5. Apply Microsoft patch for CVE-2026-25177
    

    Run as a Scheduled Task

    To scan daily until your DCs are patched, set up a scheduled task (Windows) or cron job (Linux):

    Windows (Task Scheduler):

    root@kitploit:~
    schtasks /create /tn "CVE-2026-25177 Scanner" /tr "python C:\path\to\detect_spn_abuse.py -dc dc01.corp.local -d corp.local -u scanner_svc -p 'password' --csv C:\logs\spn_scan.csv --days 1" /sc daily /st 06:00
    

    Linux (cron):

    root@kitploit:~
    0 6 * * * python3 /opt/detect_spn_abuse.py -dc dc01.corp.local -d corp.local -u scanner_svc -p 'password' --csv /var/log/spn_scan.csv --days 1
    

    Background

    CVE-2026-25177 was disclosed on March 10, 2026 (CVSS 8.8). It affects all versions of Windows Server from 2012 through 2025. The attack requires only standard domain user credentials with delegated write-SPN permissions — a common configuration in enterprise environments.

    Microsoft has released patches. Apply them immediately.

    License

    MIT License — free to use, modify, and distribute. See LICENSE.

    Download Tool