Skip to content

Conversation

Copy link

Copilot AI commented Dec 30, 2025

Extends password rule generation with comprehensive leet-speak transformations including real-world pattern matching, multi-character substitutions, and hybrid rule combinations.

Key Changes

Expanded Character Mappings

  • 25+ ASCII-safe single-character substitutions covering a-z and A-Z
  • Added mappings: d→6, f→#, k→X, h→#, c→(<{, y→j, x→%
  • Removed multi-character and Unicode variants for Hashcat compatibility

Real-World Pattern Dictionary

  • 25+ pre-defined leet transformations for common passwords
  • Examples: password→p@55w0rd, admin→4dm!n, dragon→dr@g0n, football→f00tball
  • Highest priority scoring (1M) for pattern matches

Dynamic Multi-Character Substitutions

  • Single, double, and triple simultaneous character substitutions
  • Priority-based scoring: 800k (high), 600k (medium), 400k (low) for singles
  • Double substitutions: 500k for common pairs (a→@ + o→0), 300k standard
  • Triple substitutions: 200k for comprehensive coverage

Hybrid Rule Generation

Combines leet transformations with:

  • Case operations (lowercase, capitalize, uppercase)
  • Common suffixes (from password analysis)
  • Year patterns (2024, 2025, 23-25)
  • Duplication rules

Example output for "password":

sa@ so0           # password → p@ssw0rd
l sa@ ss5 so0     # password → p@55w0rd (lowercase first)
sa@ so0 $2 $4     # password → p@ssw0rd24
sa@ so0 d         # password → p@ssw0rdp@ssw0rd

BFS Leet Exploration

  • Depth-2 BFS combining leet substitutions with case/append/prepend operations
  • Generates ~2,500 dynamic transformation rules from top 100 base words

Unified Wordlist

  • Merges usernames.txt, 00_real_bases.txt, 00_analyzed_bases.txt, 00_trie_bases.txt
  • Deduplicates and sorts by length
  • Output: 00_unified_wordlist.txt

Statistics Tracking

Enhanced stats.txt output:

Advanced Leet Transformation Statistics:
- Basic leet rules generated: 1,695
- Hybrid leet rules generated: 43,986
- BFS leet exploration rules: 2,500
- Real-world pattern matches: 83
- Total leet-based rules: 48,181

Implementation Details

Added scoring constants for maintainability:

LEET_SCORE_PATTERN_MATCH = 1_000_000      # Real-world patterns
LEET_SCORE_HIGH_PRIORITY = 800_000        # Common singles (a→@, e→3, o→0)
LEET_SCORE_DOUBLE_HIGH = 500_000          # Common doubles
LEET_SCORE_TRIPLE = 200_000               # Comprehensive triples

All generated rules are ASCII-safe and Hashcat-compatible.

Original prompt

We want to extend the existing listminer.py script to include advanced leet transformation capabilities to improve its effectiveness for password analysis and rule generation. The script should now include:

  1. Expanded Leet Mapping: Add more comprehensive mappings for leet transformations (e.g., z→2, h→#, y→¥, etc.). Include common upper-case substitutions and Unicode characters.

  2. Dynamic Multi-Character Transformations: Extend support for combinations of leet substitutions across multiple characters within words. For example, transforming p@55w0rd should account for simultaneous substitutions of p→p, a→@, s→5, o→0.

  3. Real-World Pattern Matching: Incorporate more realistic substitutions like passwordp@55w0rd and admin4dm!n. This can be achieved through a dictionary-based approach for known leet words and their replacements.

  4. Rule Prioritization: Assign weights or scores to leet rules based on their probability of success in real-world password cracking. Higher-probability transformations should be prioritized.

  5. Hybrid Rules: Combine leet transformations with prefix/suffix appends, case transformations (lower, upper, capitalize, etc.), and duplication rules.

  6. Advanced Leet-Speak Rule Generation: Utilize BFS to dynamically explore leet-transform combinations while generating applicable rules. Leverage existing trie structures to optimize rule generation.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 6 commits December 30, 2025 06:45
…pings, real-world patterns, hybrid rules, and unified wordlist

Co-authored-by: awillard1 <5957650+awillard1@users.noreply.github.com>
…, add more patterns, track stats

Co-authored-by: awillard1 <5957650+awillard1@users.noreply.github.com>
Co-authored-by: awillard1 <5957650+awillard1@users.noreply.github.com>
Co-authored-by: awillard1 <5957650+awillard1@users.noreply.github.com>
…h, optimize variable reuse, update docs

Co-authored-by: awillard1 <5957650+awillard1@users.noreply.github.com>
Co-authored-by: awillard1 <5957650+awillard1@users.noreply.github.com>
Copilot AI changed the title [WIP] Add advanced leet transformation capabilities for password analysis Add advanced leet transformation capabilities with pattern matching and hybrid rules Dec 30, 2025
Copilot AI requested a review from awillard1 December 30, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants