Skip to content

hyperpolymath/dicti0nary-attack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

82 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸ” dicti0nary-attack

License: PMPL-1.0

A comprehensive security research utility for testing non-dictionary passwords

Everyone knows that it’s easy to crack a password if it appears in a dictionary. dicti0nary-attack is a humorous inversion of that concept - it’s a powerful tool for generating and testing passwords that are NOT in traditional dictionaries, focusing on the creative variations users think make their passwords "secure."

License: PMPL-1.0 ![Chapel](https://chapel-lang.org/) ![Rust](https://www.rust-lang.org/) ![ReScript](https://rescript-lang.org/) ![RSR Compliance-yellow.svg)](RSR_COMPLIANCE.md) ![Offline-First](RSR_COMPLIANCE.md#5-offline-first—​compliant)

This tool is for authorized security testing only.

Authorized use includes: - βœ… Penetration testing with explicit written permission - βœ… Security audits of systems you own - βœ… CTF (Capture The Flag) competitions - βœ… Academic research and education - βœ… Password strength analysis on your own data

Unauthorized access to computer systems is illegal and may result in criminal prosecution under computer fraud and abuse laws.

✨ Features

Password Generators

  • Leetspeak Generator: Transforms words using character substitutions (aβ†’4, eβ†’3, oβ†’0, etc.)

  • Phonetic Generator: Uses phonetic substitutions (forβ†’4, toβ†’2, youβ†’u)

  • Pattern Generator: Creates pattern-based passwords (keyboard walks, sequences, date patterns)

  • Random Generator: Generates truly random non-dictionary passwords

  • Markov Chain Generator: Statistical password generation based on training data

Hash Cracking

  • Multi-Algorithm Support: MD5, SHA1, SHA224, SHA256, SHA384, SHA512, BLAKE2b, BLAKE2s

  • Parallel Processing: Multi-core support for faster cracking

  • Batch Operations: Crack multiple hashes simultaneously

  • Progress Tracking: Real-time statistics and progress monitoring

Additional Features

  • 🎨 Rich CLI Interface: Beautiful terminal UI with progress bars and tables

  • 🌐 Web Interface: Browser-based GUI for easy password generation and cracking

  • πŸ“Š Comprehensive Statistics: Detailed performance metrics and reporting

  • πŸ”§ Flexible Configuration: YAML/JSON configuration files

  • πŸ“ Multiple Output Formats: Text, JSON, CSV, HTML reports

  • 🐳 Docker Support: Containerized deployment

  • πŸ§ͺ Extensive Test Suite: High code coverage with pytest

  • ⚑ Performance Benchmarks: Built-in benchmarking tools

  • πŸ† RSR Framework Compliant: Bronze level (86% compliance)

  • πŸ“΄ Offline-First: Core functionality works without internet

  • πŸ”’ Security-First: RFC 9116 compliant, comprehensive security policy

πŸ“¦ Installation

Prerequisites

From Source

git clone https://github.com/Hyperpolymath/dicti0nary-attack.git
cd dicti0nary-attack

# Initialize development environment
just init

# Build Chapel + Rust CLI
just build

# Build WASM for web interface
just build-wasm

Using Podman/Docker

# Build with Podman (preferred)
podman build -t dicti0nary-attack -f Containerfile .
podman run --rm dicti0nary-attack just info

# Or with Docker
docker build -t dicti0nary-attack .
docker run --rm dicti0nary-attack just info

Using Podman Compose

# Run CLI
podman-compose run dicti0nary-cli just info

# Run web interface (static server)
podman-compose up dicti0nary-static

πŸš€ Quick Start

Generate Passwords

# Generate 1000 leetspeak passwords
dicti0nary generate -g leetspeak -n 1000

# Save to file
dicti0nary generate -g pattern -n 5000 -o passwords.txt

# Custom length constraints
dicti0nary generate -g random -n 100 --min-length 12 --max-length 20

Crack Password Hashes

# Crack a SHA256 hash using pattern generator
dicti0nary crack 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8 -a sha256 -g pattern

# Use parallel processing
dicti0nary crack <hash> -a sha256 -g leetspeak -p --workers 8

# Use custom wordlist
dicti0nary crack <hash> -a md5 -w wordlists/custom.txt

Create Wordlists

# Create leetspeak wordlist
dicti0nary create-wordlist wordlists/leetspeak.txt -g leetspeak -n 50000

# Create phonetic wordlist
dicti0nary create-wordlist wordlists/phonetic.txt -g phonetic -n 10000

Hash Passwords

# Hash with SHA256
dicti0nary hash-password "mypassword"

# Hash with MD5
dicti0nary hash-password "mypassword" -a md5

Run Web Interface

# Serve static web interface
just serve-static

# Or with Deno
deno task serve

Visit http://localhost:8080 in your browser.

πŸ“š Documentation

🎯 Use Cases

Security Audit

Test if users are using common non-dictionary password patterns:

dicti0nary create-wordlist audit.txt -g leetspeak -n 100000
dicti0nary crack <hash> -w audit.txt -a sha256

CTF Competition

Quickly test common patterns:

dicti0nary crack <ctf_hash> -a md5 -g pattern -p

Password Research

Generate datasets for password strength analysis:

dicti0nary create-wordlist data/leetspeak.txt -g leetspeak -n 50000
dicti0nary create-wordlist data/phonetic.txt -g phonetic -n 50000
dicti0nary create-wordlist data/patterns.txt -g pattern -n 50000

πŸ—οΈ Architecture

dicti0nary-attack/
β”œβ”€β”€ src/                          # Main source code
β”‚   β”œβ”€β”€ main.rs                   # Rust CLI entry point
β”‚   β”œβ”€β”€ dicti0nary.chpl           # Chapel main program
β”‚   β”œβ”€β”€ generators/               # Chapel generator modules
β”‚   β”‚   β”œβ”€β”€ Leetspeak.chpl        # Leetspeak transformations
β”‚   β”‚   β”œβ”€β”€ Phonetic.chpl         # Phonetic substitutions
β”‚   β”‚   β”œβ”€β”€ Pattern.chpl          # Pattern-based generation
β”‚   β”‚   β”œβ”€β”€ Random.chpl           # Random generation
β”‚   β”‚   └── Markov.chpl           # Markov chain generation
β”‚   └── crackers/                 # Hash cracking engine
β”‚       └── HashCracker.chpl      # Multi-algorithm cracker
β”œβ”€β”€ crates/                       # Rust workspace crates
β”‚   β”œβ”€β”€ core/                     # Type definitions & traits
β”‚   β”œβ”€β”€ generators/               # Rust generator implementations
β”‚   └── crackers/                 # Rust cracking engine
β”œβ”€β”€ web/                          # Static web interface
β”‚   β”œβ”€β”€ index.html                # Main HTML
β”‚   β”œβ”€β”€ src/                      # ReScript source
β”‚   β”‚   β”œβ”€β”€ App.res               # Application logic
β”‚   β”‚   β”œβ”€β”€ Generators.res        # Password generators
β”‚   β”‚   β”œβ”€β”€ Hash.res              # Hashing utilities
β”‚   β”‚   └── WasmLoader.res        # WASM module loader
β”‚   └── static/                   # Static assets
β”‚       β”œβ”€β”€ css/                  # CSS-first styling
β”‚       β”œβ”€β”€ js/                   # Compiled ReScript output
β”‚       └── wasm/                 # Chapel-compiled WASM
β”œβ”€β”€ config/                       # Configuration files
β”‚   β”œβ”€β”€ dicti0nary.ncl            # Nickel configuration
β”‚   └── *.yaml                    # YAML configs
β”œβ”€β”€ tests/                        # Chapel test suite
β”œβ”€β”€ docs/                         # Documentation
β”œβ”€β”€ wordlists/                    # Example wordlists
β”œβ”€β”€ justfile                      # Task automation
β”œβ”€β”€ Cargo.toml                    # Rust workspace manifest
β”œβ”€β”€ Chapel.toml                   # Chapel config
β”œβ”€β”€ rescript.json                 # ReScript config
└── deno.json                     # Deno config

πŸ”§ Configuration

Create a configuration file (config.yaml):

generators:
  leetspeak:
    max_substitutions: 3
    min_length: 6
    max_length: 16

  pattern:
    min_length: 6
    max_length: 16

cracker:
  algorithm: sha256
  workers: 8
  batch_size: 5000

output:
  format: json
  directory: output
  save_stats: true

Use with commands:

dicti0nary --config config.yaml generate -g leetspeak -n 1000

πŸ§ͺ Testing

Run the test suite:

# Run Chapel tests
just test

# Run with coverage
just test-cov

# Run Rust tests
cargo test

# Watch mode (requires entr)
just test-watch

πŸ“Š Benchmarks

Run performance benchmarks:

# Run Chapel benchmarks
just bench

# Run Rust benchmarks
cargo bench

🐳 Container Usage

Build Image (Podman preferred)

# Podman (preferred)
podman build -t dicti0nary-attack -f Containerfile .

# Docker
docker build -t dicti0nary-attack .

Run CLI

podman run --rm dicti0nary-attack just info

Run Web Interface

podman-compose up dicti0nary-static

πŸ› οΈ Development

Setup Development Environment

# Clone repository
git clone https://github.com/Hyperpolymath/dicti0nary-attack.git
cd dicti0nary-attack

# Initialize (installs deps, sets up directories)
just init

# Install pre-commit hooks
just setup-hooks

# Build ReScript (web interface)
deno task build:rescript

# Watch mode for development
deno task watch:rescript

Available just Commands

just               # List all commands
just build         # Compile Chapel sources
just build-wasm    # Compile to WASM
just build-all     # Build everything
just test          # Run Chapel tests
just test-cov      # Tests with coverage
just bench         # Performance benchmarks
just format        # Format Chapel code
just lint          # Lint Chapel code
just quality       # All quality checks
just clean         # Remove build artifacts
just serve-static  # Serve web interface
just podman-build  # Build container
just validate-rsr  # Check RSR compliance
just nickel-eval   # Evaluate Nickel config
just stats         # Show project statistics

🀝 Contributing

Contributions are welcome! Please ensure:

  1. All tests pass: just test and cargo test

  2. Code is formatted: just format and cargo fmt

  3. No linting errors: just lint and cargo clippy

  4. ReScript compiles: deno task build:rescript

  5. Documentation is updated

πŸ“„ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Inspired by the need for better password security testing tools

  • Built with Chapel, Rust, ReScript, and Nickel

  • Powered by WASM for offline-first browser execution

  • Thanks to the security research community

πŸ“ž Contact & Support

πŸ”’ Security Notice

This tool is designed to help security professionals identify weak passwords. It should never be used:

  • To gain unauthorized access to any system

  • To crack passwords you don’t have permission to test

  • For any illegal or unethical purposes

Always obtain explicit written permission before testing any system you do not own.


Made with ❀️ for the security research community