Skip to content
  • Categories
  • Recent
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Slate)
  • No Skin
Collapse
Brand Logo

hashpwn

Home | Donate | GitHub | Matrix Chat | PrivateBin | Rules

  1. Home
  2. Tools
  3. Scripts
  4. rulest - GPU Rules Extractor

rulest - GPU Rules Extractor

Scheduled Pinned Locked Moved Scripts
2 Posts 1 Posters 145 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A1131A Offline
    A1131A Offline
    A1131
    Trusted
    wrote last edited by A1131
    #1

    GPU-Accelerated Rule Mining for Hash Cracking Wordlists (Full Chain Extraction)

    This project implements a highly optimized tool for extracting effective word-transformation rule chains by leveraging PyOpenCL to run the transformation logic on a Graphics Processing Unit (GPU). It uses a Breadth-First Search (BFS) approach to efficiently explore multi-step rule combinations (chains) that convert base dictionary words into target dictionary words.

    Overview
    Rule-based attacks are highly effective against passwords. This utility automates the process of discovering the most successful rule chains (e.g., l $1 T0 - lowercase, append '1', toggle case at position 0) that have high hit rates against a specific target wordlist, accelerating rule-set generation for tools like Hashcat.

    Key Features

    OpenCL Acceleration: Word transformations are processed in parallel on the GPU for massive performance gains.

    Rule Chaining (BFS): Supports exploring rule chains up to a configurable depth (e.g., -d 3).

    Full Chain Extraction: Outputs the complete sequence of rules (R1 R2 ... Rn) responsible for a hit.

    Optimized Data Handling: Uses np.uint8 and np.uint16 buffers for minimal memory overhead and fast GPU transfers.

    Rule Filtering: Allows using an external file to limit the internal rule set, focusing the search space.

    Requirements

    Python 3.x

    numpy

    pyopencl (Requires OpenCL runtime drivers for your GPU vendor: NVIDIA, AMD, or Intel).

    tqdm (For progress bar display)

    pip install numpy pyopencl tqdm
    
    Argument,        Short Description
    --wordlist,      -w,  (Required) Path to the target dictionary (words to match).
    --base-wordlist, -b,  Optional path to the base wordlist (words to apply rules to).
    --chain-depth,   -d,  Number of rules to chain together.
    --batch-size,         Number of words to process per GPU batch.
    --output,        -o,  File to save the extracted rule chains to.
    --rules_file,    -r,  Path to an external file to filter the internal rule set.
    

    Examples

    Extracting Single Rules (Depth 1) Find all single rules that transform a base word into a target word, saving the results to my_rules_d1.txt.

    python rulest.py -w target_passwords.txt -b base_words.txt -d 1 -o my_rules_d1.txt
    

    Extracting Two-Step Rule Chains (Depth 2) Find rule chains of length two (R1 R2) that lead to a hit.

    python rulest.py -w target_passwords.txt -b base_words.txt -d 2 -o my_rules_d2.txt
    

    Using a Filtered Rule Set Only test rules specified in common_leetspeak.rule for a three-step chain.

    python rulest.py -w target.txt -b base.txt -d 3 -r common_leetspeak.rule -o leet_chains_d3.txt
    

    https://github.com/A113L/rulest

    Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
    PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

    1 Reply Last reply
    👍
    0
    • A1131A Offline
      A1131A Offline
      A1131
      Trusted
      wrote last edited by
      #2

      Fyi. The OpenCl kernel used by the script has been updated with all Hashcat rules visible at https://hashcat.net/wiki/doku.php?id=rule_based_attack. This slightly increases the rule chain extraction time, but it can also lead to complex rules.

      Amateur of mycology and hashcracking | 1x3060Ti | 1x1050Ti
      PGP:4B0A386530D789157435DC7489138FB52FDD7FC1

      1 Reply Last reply
      👍
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      Who's Online [Full List]

      8 users active right now (2 members and 6 guests).
      hashpwn-bot, freeroute

      Board Statistics

      Our members have made a total of 5.5k posts in 156 topics.
      We currently have 287 members registered.
      Please welcome our newest member, JohnMcLean493049.
      The most users online at one time was 49 on Thursday, December 26, 2024.

      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent