アップデート一覧に戻る
New releaseJul 23, 2026

hate_crack v2.11.2

TrustedSecチームのHashcatを介してクラッキング手法を自動化するツール。

共有
  ___ ___         __             _________                       __
 /   |   \_____ _/  |_  ____     \_   ___ \____________    ____ |  | __
/    ~    \__  \\   __\/ __ \    /    \  \/\_  __ \__  \ _/ ___\|  |/ /
\    Y    // __ \|  | \  ___/    \     \____|  | \// __ \\  \___|    <
 \___|_  /(____  /__|  \___  >____\______  /|__|  (____  /\___  >__|_ \
       \/      \/          \/_____/      \/            \/     \/     \/

インストール

ソースからのインストールのみがサポートされています。hate_crack は PyPI では配布されていません: pip install hate-crack0.0.0 プレースホルダーに解決され、意図的に失敗して ここに誘導します。この名前は、他の誰もその名前で類似品を公開できないようにするためだけに確保されています — 次を参照: packaging/pypi-placeholder/

1. hashcat のインストール

Hashcat をインストールし、PATH に含まれている必要があります:

Ubuntu/Kali:```bash sudo apt-get install -y hashcat

macOS (Homebrew):```bash
brew install hashcat

または、https://hashcat.net/hashcat/ からビルド済みバイナリをダウンロードし、config.json 内の hcatPath をその場所に設定してください。

2. hate_crack のダウンロード

サブモジュール付きでクローンします(hashcat-utils、princeprocessor、pcfg_cracker、およびオプションで omen に必要):```bash git clone --recurse-submodules https://github.com/trustedsec/hate_crack.git cd hate_crack

サブモジュールなしでクローンした場合は、初期化してください:```bash
git submodule update --init --recursive

次に、必要に応じて設定をカスタマイズします。hate_crack は、それぞれが異なる設定群を管理する2つの設定ファイルを使用します:

  • config.json — ワードリストのパス、マスク、ルール、チューニング、ポットファイル、hashcat パス、候補数制限、通知トグル、CLI設定のデフォルト(35設定)。
  • .env — サードパーティ統合設定のみ: Hashview と Hashmob の認証情報、Pushover の認証情報、Ollama と pipal(14設定)。git では追跡されず、モード 0600 で作成されます。

その線引きがそこにある理由はひとつです: .env は秘密情報を保持できるファイルだからです。サードパーティサービスの認証情報と設定は、モード 0600 の追跡されないファイルに入ります。hate_crack がローカルで行うすべては config.json に残り、共有したり、差分を取ったり、自分のノートに記録したりしても安全です。これが、Pushover の 認証情報.env にあり、Pushover のオン/オフ トグルconfig.json にある理由でもあります — トグルはローカル設定であり、秘密情報ではないからです。

各キーには正確に1つの置き場所があります。別のファイルに置かれたキーは無視され、hate_crack はそれが属するファイル名を示す警告を表示します。どのキーでも、その環境変数をエクスポートすることで1回の実行だけ上書きできます。ほとんどのユーザーは、デフォルトのパスがそのまま動作するため、この手順を省略できます。

config.json は恒久的かつ第一級の設定ファイルです — 非推奨でもなく、削除予定もありません。移動されたのは統合設定のみです。

単一の config.json からアップグレードする場合? hate_crack は初回実行時に自動的に移行します: 統合設定がモード 0600 の新しい .env にコピーされ、その後 config.json から削除されるため、2つのファイルが両方ともそれらを所有することはありません。移動されたキー(値は決して表示されません)を表示し、元のファイルを触る前に config.json.pre-split.bak として保存します。config.json のその他すべては、キーの順序を含めて、まったくそのまま残されます。

初回実行: hate_crack は両方のファイルを自動作成するので、何もする必要はありません。代わりに手動で .env をセットアップするには、追跡されているテンプレートをコピーします:```bash cp .env.example .env chmod 600 .env

`.env.example` はコミットされ、すべての資格情報キーが空の状態で配布されます。`.env` 自体は**決して**コミットしてはいけません。これは gitignore されており、通常のバックアップ用の別名も同様です。hate_crack は常にこのファイルをモード `0600`(所有者のみ読み書き可能)で作成します。`.env.example` はスキーマから生成されます。`hate_crack/config_schema.py` を変更した後、`uv run python -m hate_crack.config_writer` で再生成してください。

### 3. 依存関係と hate_crack をインストール

最も簡単な方法は `make`(または `make install`)を実行することです。これにより OS が自動検出され、以下がインストールされます:
- 外部依存関係(p7zip、transmission-daemon / transmission-remote)
- サブモジュールのビルド(hashcat-utils、princeprocessor、pcfg_cracker、およびオプションで omen)
- uv による Python 依存関係と、`~/.local/bin/hate_crack` への CLI シム```bash
make

これは冪等です - 既にインストールされているツールはスキップします。クリーンな再インストールを強制するには:```bash make reinstall

**または、依存関係を手動でインストールします:**

### 外部依存関係
これらは特定のダウンロード/抽出フローに必要です:

- `7z`/`7za` (p7zip) — `.7z` アーカイブの抽出に使用します。
- `transmission-daemon` / `transmission-remote` — Weakpass トレントのダウンロードに使用します。

手動インストールコマンド:

Ubuntu/Kali:```bash
sudo apt-get update
sudo apt-get install -y p7zip-full transmission-daemon

macOS(Homebrew):```bash brew install p7zip transmission-cli # provides transmission-daemon and transmission-remote

次に、Pythonの依存関係とCLI shimをインストールします:```bash
uv sync
mkdir -p ~/.local/bin
printf '#!/usr/bin/env bash\nset -euo pipefail\nexec uv run --directory %s python -m hate_crack "$@"\n' "$(pwd)" > ~/.local/bin/hate_crack
chmod +x ~/.local/bin/hate_crack

プロジェクト構成

コアロジックは現在、hate_crack/ 以下のモジュールに分割されています:

  • hate_crack/cli.py: argparse ヘルパーと設定の上書き。
  • hate_crack/api.py: Hashview、Weakpass、Hashmob の統合(ダウンロード/メニュー/ヘルパー)。
  • hate_crack/attacks.py: メニュー攻撃ハンドラー。
  • hate_crack/hashmob_wordlist.py: Hashmob ワードリストユーティリティ(薄いラッパー。api.py を呼び出す)。
  • hate_crack/corpus_stats.py: コーパス全体のパスワード統計。LLM にコーパスを説明するために使用。
  • hate_crack/plaintext.py: コーパス行からパスワードを復元します(ハッシュプレフィックスの除去、$HEX[...] のデコード)。LLM モード、corpus_stats、rulegen で共有されます。
  • hate_crack/llm.py: Atomic Agents による構造化(JSON)LLM 候補生成。
  • hate_crack/menu.py: 共有メニューレンダラー。オプションの矢印キーナビゲーションを含む。
  • hate_crack/noninteractive.py: スクリプト化された攻撃サブコマンドのディスパッチャー。
  • hate_crack/notify/: 通知パッケージ(Pushover バックエンド、クラックごとのテイラー)。
  • hate_crack/username_detect.py: username:hash 入力ファイルを検出して、hashcat の --username を決定します。
  • hate_crack/formatting.py, hate_crack/progress.py: 出力フォーマットとプログレス表示のヘルパー。
  • hate_crack/main.py: メイン CLI 実装。

トップレベルの hate_crack.py は引き続きメインエントリポイントであり、これらのモジュールを統括します。


参考と謝辞

このプロジェクトは、多くの外部プロジェクトやサービスに依存しており、それらから影響を受けています。以下に感謝します:


使い方

make でインストールした後、どこからでも hate_crack を実行できます:```bash hate_crack

or with arguments:

hate_crack <hash_file> <hash_type> [options]

あるいは、`uv` 経由で実行する:```bash
uv run hate_crack.py <hash_file> <hash_type>

ツールとして実行する(推奨)

リポジトリのルートから make を使用してインストールします。これによりサブモジュールがビルドされ、アセットがバンドルされます:```bash cd /path/to/hate_crack make hate_crack

`make install` コマンドは、リポジトリディレクトリから実行される bash シムを `~/.local/bin/hate_crack` に作成します。そのため、現在の作業ディレクトリに関係なく、設定とアセットは常に見つかります。

設定は次の場所でも検索されます:
- リポジトリルートとパッケージディレクトリ
- `~/.hate_crack`

**注:** `config.json` の `hcatPath` は hashcat バイナリの場所のみを対象としています(hashcat が PATH にある場合は任意です)。Hate_crack のアセット(hashcat-utils、princeprocessor、pcfg_cracker、omen)はリポジトリディレクトリから読み込まれ、`make install` によって自動的にバンドルされます。

### スクリプトとして実行する
このスクリプトは `uv` シバンを使用します。実行可能にして実行してください:```bash
chmod +x hate_crack.py
./hate_crack.py

Python を直接使用することもできます:```bash python hate_crack.py

### 非対話モード / スクリプトでの使用

自動化のために、メニューを介さずに単一の攻撃を直接起動できます。攻撃名が最初の引数、続いてハッシュファイルとhashcatハッシュタイプを指定します。前処理プロンプト(コンピューターアカウントのフィルタリング、LM優先のブルートフォース、重複アカウントの重複排除)は、このモードではデフォルト値を自動的に受け入れます。プロセスは成功時に `0` で終了し、エラー時(ハッシュファイルの欠落、数値でないハッシュタイプ、ワードリストの欠落、または不明なルールファイル名)は非ゼロで終了します。```bash
# Quick crack: one wordlist + optional rule(s) from the rules directory
hate_crack quick hashes.txt 1000 --wordlist rockyou.txt --rules best64.rule

# Chain two rules in a single run
hate_crack quick hashes.txt 1000 --wordlist rockyou.txt --rules best64.rule+d3ad0ne.rule

# Run two rules as two separate passes
hate_crack quick hashes.txt 1000 --wordlist rockyou.txt --rules best64.rule d3ad0ne.rule

# Canned dictionary methodology (uses your configured wordlists)
hate_crack dict hashes.txt 1000

# Brute force lengths 1-8
hate_crack brute hashes.txt 1000 --min 1 --max 8

# Top-mask attack targeting ~4 hours
hate_crack topmask hashes.txt 1000 --target-time 4

トラブルシューティング

エラー: 更新時に "would clobber existing tag"

古いクローンは更新を拒否し、次のような長い行のリストを出力することがあります:``` ! [rejected] v2.5.0 -> v2.5.0 (would clobber existing tag)

これは2026年7月より前に作成されたクローンに影響します。公開履歴はその時点で書き換えられ、コミットされるべきではなかった一部のファイルが削除されたため、すべてのコミットに新しいIDが付与されました。そのため、古いクローンのタグは、このリポジトリがもはや保持していないオブジェクトを指すことになり、gitは既に保持しているタグを移動することを拒否します。チェックアウトに問題はなく、クラッキングデータが危険にさらされることもありません。

一度だけリセットして復旧してください。これにより、チェックアウト内のローカルコミットと編集は破棄されます。gitで追跡されているもの(追跡されていない`config.json`は除く)をカスタマイズしている場合は、先にブランチにコミットしてください:```bash
cd /path/to/hate_crack
git fetch --tags --force origin
git checkout -B main origin/main
make install

--forceはここではタグの更新のみを行い、コミットには触れません。その後、 内蔵アップデーターは正常に動作します。2.18より前のバージョンでは、この リカバリを自分で行うことができなかったため、一度だけ手動で行う必要があります。

エラー: ビルドディレクトリが存在しません

次のようなエラーが表示された場合:``` Error: Build directory /opt/hashcat/hashcat-utils does not exist. Expected to find expander at /opt/hashcat/hashcat-utils/bin/expander.

つまり、`hate_crack` のアセットはインストールパッケージに同梱されていません。

**パスの理解:**
- `config.json` の `hcatPath` → **hashcat バイナリの場所**を指します(任意。PATH に含めることも可能)
- `hashcat-utils/` と `princeprocessor/` → `make install` によってパッケージに同梱されます

**解決策:**
Makefile を使用して再インストールしてください。これによりサブモジュールがビルドされ、ツールがインストールされます。```bash
cd /path/to/hate_crack  # the repository checkout
make install

デフォルト設定(config.json.example):

ほとんどのユーザーはカスタマイズなしでデフォルトを使用できます:

  • hcatWordlists./wordlists(リポジトリルートまたはHOME/.hate_crackからの相対パス)
  • hcatOptimizedWordlists./optimized_wordlists(Quick Crackが使用するディレクトリ。見つからない場合は hcatWordlists にフォールバック)
  • rules_directory./hashcat/rules(サブモジュールのルールを含む)
  • hcatTuning: ``(空文字列 - デフォルトのチューニングフラグなし)

config.jsonカスタマイズ例:```json { "hcatPath": "/usr/local/bin", # Location of hashcat binary (optional, auto-detected from PATH) "hcatBin": "hashcat", # Hashcat binary name "hcatWordlists": "./wordlists", # Dictionary wordlist directory (relative or absolute) "rules_directory": "./hashcat/rules", # Rules directory (relative or absolute) "hcatTuning": "", # Additional hashcat flags (empty by default) ... }

**設定の読み込み:**
- 各キーの優先順位: `os.environ` > そのキー自身のホームファイル (`.env` または `config.json`) > 組み込みデフォルト
- 欠落したキーは組み込みデフォルトにフォールバックします; `config.json.example` にはすべての `config.json` キーが記載されています。
- 両方のファイルは互いに独立して、次の順序で検索されます: **リポジトリルート**、次に**インストール済みパッケージディレクトリ**、その次に**`~/.hate_crack`**。最初に一致したものが採用されます; 2つのファイルが異なるディレクトリから来るのは正常です。
- 初回実行時には両方が作成されます — `config.json` は `config.json.example` から、`.env` は組み込みデフォルトから。古い `config.json` に統合キーがまだ残っている場合、それらは新しい `.env` にコピーされ、hate_crack は `config.json` からどのキーを削除すべきかを通知します; そのファイル自体を編集することはありません。
- 実行のたびに、hate_crack は実際にロードした2つのファイルを表示します:  ```
  [*] config.json: /home/you/.hate_crack/config.json
  [*] .env:        /home/you/.hate_crack/.env

設定が「反映されない」場合、デバッグする前にこの2行を読んでください。この2行があるのは、検索順序に2つの落とし穴があるからです。

  • チェックアウトはホームディレクトリより優先されます。 リポジトリルートが最初に検索されるため、ツールを実行する任意のチェックアウト内にある .env または config.json は、~/.hate_crack 内のものより優先されます。そして、チェックアウトからツールを実行することが、そもそもそれらのファイルをそこに作成する原因そのものです。
  • 現在の作業ディレクトリは決して検索されません。 自分が現在いるディレクトリ内の .env は意図的に無視されます。エンゲージメントディレクトリには、設定として意図されたものではないファイルが多数あるからです。リポジトリルートか ~/.hate_crack に置いてください。

Error: merge with ref 'refs/heads/master' but no such ref was fetched

次のようなエラーが表示された場合:``` Your configuration specifies to merge with the ref 'refs/heads/master' from the remote, but no such ref was fetched.

デフォルトブランチは `master` から `main` に名前が変更されました。修正方法:```bash
git remote set-head origin -a
git branch -m master main
git branch --set-upstream-to=origin/main main
git pull

Makefile ターゲット

デフォルト(フルインストール) - サブモジュールをビルドし、依存関係をインストールして、ツールをインストールします:```bash make

or explicitly:

make install

これは冪等です - 既にインストールされているツールはスキップされます。

**クリーン再インストールの強制:**```bash
make reinstall

クイックアップデート - サブモジュールを再ビルドし、ツールを再インストールします(変更をプルした後):```bash make update

**アンインストール** - OS の依存関係とツールを削除します:```bash
make uninstall

hashcat-utils のみをビルドする:```bash make hashcat-utils

**テストの実行** - 必要に応じて HATE_CRACK_SKIP_INIT を自動的に処理します:```bash
make test

カバレッジレポート:```bash make coverage

**ビルド/テスト成果物のクリーンアップ:**```bash
make clean

開発

開発環境のセットアップ

オプションの開発依存関係(リンターやテストツールを含む)を指定してプロジェクトをインストールします:```bash make dev-install

### リンターと型チェックの実行

変更をプッシュする前に、これらのチェックをローカルで実行してください。すべてのチェックには `make lint` を使用するか、個別のチェックを実行します:

**Ruff (リンティングとフォーマット):**```bash
make ruff
# or manually:
uv run ruff check hate_crack tests tools packaging hate_crack.py

問題を自動修正:```bash uv run ruff format hate_crack tests tools packaging hate_crack.py uv run ruff check --fix hate_crack tests tools packaging hate_crack.py

**ty (型チェック):**```bash
make ty
# or manually:
uv run ty check hate_crack

すべてのチェックをまとめて実行:```bash make lint

### テストの実行

テストはサブモジュールがビルドされていないことを自動検出し、`HATE_CRACK_SKIP_INIT=1`を自動的に設定します。```bash
make test

またはpytestを直接実行してください:```bash uv run pytest -v

カバレッジあり:```bash
make coverage

またはpytestで:```bash uv run pytest --cov=hate_crack

### Git フック (prek)

Git フックは [prek](https://github.com/j178/prek)(v0.3.3+)によって管理されています。フックをインストールするには:```bash
prek install --hook-type pre-push --hook-type pre-commit

これは、pre-commit local-repo TOML スキーマを使用して prek.toml で定義されたフックをインストールします:

  • pre-push (ローカルフック): ruff、ruff-format、ty、pytest、pytest-lima、bandit
  • pre-commit (pre-commit/pre-commit-hooks から): trailing-whitespace、 end-of-file-fixer、check-yaml、check-merge-conflict、check-added-large-files、 detect-private-key

pre-commit の自動修正ツールはファイルをその場で書き換えるため、実行後にもう一度ステージングして コミットしてください。

注: prek 0.3.3 はトップレベルで repos = [...] を想定しています。以前の [hooks.<stage>] commands = [...] 形式はサポートされていません。

矢印キーによるメニュー操作

メニューはデフォルトで、従来の番号付き print() + input() による選択を使用します。 この方式は複数桁のキーもそのまま受け付けます。

simple-term-menu による矢印キーナビゲーションを有効にするには、 HATE_CRACK_ARROW_MENU=1 を設定します。このモードでは1桁のショートカットキーだけが機能します。 10以上の番号のオプションには矢印キーで到達する必要があります。 矢印キーモードはTTYも必要とするため、出力がパイプされる場合はオフのままです。

開発依存関係

任意の [dev] グループには以下が含まれます:

  • ty - 静的型チェッカー
  • ruff - 高速なPythonリンター兼フォーマッター
  • pytest - テストフレームワーク
  • pytest-cov - カバレッジレポート

共通オプション:

  • --download-hashview: クラッキング前にHashviewからハッシュをダウンロードします。
  • --hashview: ハッシュ、ワードリスト、ジョブを管理するための対話式Hashviewメニュー。
  • --hashview --help: Hashviewのコマンドラインオプションを表示します。
  • --weakpass: Weakpassからワードリストをダウンロードします。
  • --hashmob: Hashmob.netからワードリストをダウンロードします。
  • --download-torrent <FILENAME>: 特定のWeakpassトレントファイルをダウンロードします。
  • --download-all-torrents: キャッシュから利用可能なすべてのWeakpassトレントをダウンロードします。
  • --wordlists-dir <PATH> / --optimized-wordlists-dir <PATH>: ワードリストディレクトリを上書きします。
  • --pipal-path <PATH>: pipalのパスを上書きします。
  • --restore-potfile: 起動時にhashcatのPOTファイルから <hashfile>.out を再構築し、既存の内容を置き換えてから通常のメニューに進みます。このフラグがない場合、POTの参照は .out がまだ存在しないときだけ実行されます。メニューオプション93は、確認プロンプト付きでオンデマンドに同じことを行います。
  • --maxruntime <SECONDS>: 最大実行時間を上書きします。
  • --bandrel-basewords <PATH>: bandrelのベースワードファイルを上書きします。
  • --update: 最新リリースに更新して再インストールします。リリースタグは main に存在するため、チェックアウトが別のブランチの場合は main に切り替えます。
  • --nightly: 代わりに nightly-dev ブランチから最新のナイトリービルドに更新します。ナイトリービルドはCIを通過していますが、正式リリースには含まれません。--update --nightly と書くこともできます。
  • --no-optimized-kernel (または --no-optimize): 実行全体でhashcatに -O を渡しません。config.json 内の optimizedKernelAttacks を上書きし、hcatTuning に指定した -O も取り除きます。設定には書き戻されないため、この実行だけに適用されます。サブコマンドを使う場合は、サブコマンドの前に指定します: ./hate_crack.py --no-optimize quick hashes.txt 1000 --wordlist words.txt
  • --debug: デバッグログを有効にします(stderrに書き出します)。

Hashview 統合

hate_crack は、ハッシュの集中管理と分散クラッキングのために Hashview と統合します。

対話式メニュー

対話式Hashviewメニューにアクセス:```bash hate_crack.py --hashview

メニューオプション:
- **(1) Upload Cracked Hashes** - 現在のセッションからクラック済みハッシュをHashviewにアップロードする
- **(2) Upload Wordlist** - ワードリストファイルをHashviewにアップロードする
- **(3) Download Wordlist** - Hashviewからワードリストをダウンロードする
- **Download Rule** - Hashviewからルールファイルをダウンロードする(プレーンテキストに展開され、`hashcat -r` で使用可能)
- **(4) Download Left Hashes** - 未クラックの残りハッシュをダウンロードする(クラック用に切り替えるようプロンプト表示)
- **(5) Download Found Hashes** - クラック済みハッシュを平文パスワード付きでダウンロードする(参照・分析用)
- **(6) Upload Hashfile and Create Job** - 新しいハッシュファイルをアップロードしてクラックジョブを作成する
- **(99) Back to Main Menu** - メインメニューに戻る

**重要: Download Found と Download Left の違い**
- **Download Left Hashes (4)**: クラックが必要な未クラックハッシュをダウンロードします。利用可能なクラック済みハッシュがあれば自動的にマージされ、このハッシュファイルに切り替えてクラックを続行するかプロンプトが表示されます。
- **Download Found Hashes (5)**: クラック済みハッシュを hash:cleartext 形式でダウンロードします。これらは参照用であり、これ以上クラックすることはできません。切り替えプロンプトは表示されません。

#### コマンドラインインターフェース

Hashviewの操作はコマンドラインからも実行できます。

クラック済みハッシュのアップロード:```bash
hate_crack.py --hashview upload-cracked --file <output_file>.out --hash-type 1000

ワードリストをアップロード:```bash hate_crack.py --hashview upload-wordlist --file .txt --name "My Wordlist"

ルールファイルをダウンロード(解凍済み、`hashcat -r` にそのまま使用可能):```bash
hate_crack.py --hashview download-rules --rules-id 4 --output best64.rule

残りのハッシュをダウンロード(クラッキング用の未クラックハッシュ):```bash hate_crack.py --hashview download-left --customer-id 1 --hashfile-id 123

見つかったハッシュをダウンロード(すでにクラック済みのハッシュと平文):```bash
hate_crack.py --hashview download-found --customer-id 1 --hashfile-id 123

hashfileをアップロードしてジョブを作成:```bash hate_crack.py --hashview upload-hashfile-job --file hashes.txt --customer-id 1
--hash-type 1000 --job-name "NTLM Crack Job" --hashfile-name "Domain Hashes"

#### 設定

Hashview の認証情報を `.env` に設定します(これらは統合設定であり、`config.json` には含まれません)。```
HASHVIEW_URL=https://hashview.example.com
HASHVIEW_API_KEY=your-api-key-here

Ollama の設定

LLM 攻撃(オプション 12)は、Ollama を使用してパスワード候補を生成します。モデル、コンテキストウィンドウ、リクエストタイムアウトを .env で設定します:``` OLLAMA_MODEL=qwen2.5:32b OLLAMA_NUM_CTX=8192 OLLAMA_TIMEOUT=300

- **`OLLAMA_MODEL`** — 候補生成に使用するOllamaモデル(デフォルト: `qwen2.5:32b`)。LLM攻撃は構造化(JSON)出力を使用するため、ツール/JSON対応が良好なモデルを選択してください。
- **`OLLAMA_NUM_CTX`** — モデルのコンテキストウィンドウサイズ(デフォルト: `8192`)。コーパス統計が導入される前は `2048` でしたが、これは与えられるプロンプトを保持するには小さすぎました。500件のサンプル平文は、システムプロンプトと応答の前に約2,000〜3,500トークンになり、そのためOllamaは、サンプラーがファイル全体に注意深く分散させたサンプルの一部を黙って切り捨てていました。
- **`OLLAMA_TIMEOUT`** — 生成応答を待ってから諦めるまでの秒数(デフォルト: `300`)。最初のリクエスト時に大きなモデルがまだVRAMにロード中で、タイムアウトを超える可能性がある場合は、この値を上げてください。タイムアウトが発生すると、hate_crackは経過したタイムアウト時間とこの設定名を出力します。
- **`OLLAMA_MAX_SAMPLE_LINES`** — LLMモードがリテラルな平文もプロンプトに貼り付けるしきい値(デフォルト: `500`)。値が`0`以下の場合は`500`として扱われます。

  コーパス由来モード(**Wordlist**、**Cracked passwords**、**Pattern rules**)は、その一部を貼り付けるのではなく、コーパス全体を常に統計的に記述します — ベースワードのシェア、マスク、大文字小文字、長さ、末尾の数字と記号、年 —。集約には上限があるため、120,000パスワードのダンプでも、500行のダンプとほぼ同じプロンプト領域しか消費しません。コーパス全体がこのしきい値未満に収まる場合は、小さなコーパスをモデルから隠しても何も得られないため、生の平文も含まれます。

  これは、`ollamaMaxSampleLines`個までのパスワードを等間隔でサンプリングして貼り付ける以前の動作を置き換えます。大きなダンプのサンプルは頻度情報をまったく伝えませんでした。モデルは、組織の8%が使用するベースワードと、一人だけが使用するベースワードを区別できませんでした。これはまさに、推測を実行する価値を持たせるシグナルです。
- **`OLLAMA_NO_CLOUD`** — `true`の場合、Ollamaの*クラウド*モデルへの送信を拒否します。Ollamaは`-cloud`タグの付いたモデル(`gpt-oss:120b-cloud`、`deepseek-v3.1:671b-cloud`)を、ローカルモデルが使用するのと同じローカルエンドポイント経由でollama.comにプロキシするため、リクエストの見た目は変わりません。しかしhate_crackのプロンプトには、復元された平文、コーパス統計、クライアント名、業界、所在地が含まれます。これを設定すると、リクエストが構築される前にクラウドモデル名が拒否されます。デフォルトは`false`なので、意図的に設定されたクラウドモデルは動作し続けます。クライアントデータをホストの外に出してはならない案件ではこれを有効にしてください。
- **`OLLAMA_AUTO_RESEARCH`** — `true`(デフォルト)の場合、**Target info**モードは、会社名を入力するとすぐにローカルモデルに業界と所在地を提案させ、編集可能なプロンプトのデフォルトとして提供します。`false`に設定すると、常に空のプロンプトが表示されます(攻撃開始前にリサーチのための追加ラウンドトリップが1回発生するため、低速なモデルで有用です)。
- **`OLLAMA_HOST`** — Ollamaが待ち受けている場所。ベアの`host:port`(`theplague.lan:11434`)またはスキーム付きの完全なURL(`https://ollama.example.com`)を受け付けます。どちらの場合も、使用前にベースURLが正規化されます。デフォルトは`localhost:11434`です。`.env`に設定するか、実際の環境変数としてエクスポートして単一実行時に上書きできます — これはOllama自身のCLIが読み取るものと同じ変数名です。
- LLM Attackを使用する前に、Ollamaが実行中でありモデルがプルされていることを確認してください(`ollama pull qwen2.5:32b`)— hate_crackは不足しているモデルを自動プルしなくなりました。

攻撃には3つの生成モードがあります:

1. **Target info** — 会社 / 業界 / 所在地。モデルはそれらの詳細から候補を導き出します。

   会社名を入力すると、hate_crackは同じローカルモデルに、その組織について既に知っていることを尋ね、**Industry**と**Location**のプロンプトに回答を事前入力します(括弧内に表示されます):   ```
   Company name: Acme Rail Services

   [!] The values in parentheses below are the local model's GUESSES, not verified OSINT.
       Press Enter to accept, or type your own value to override.
   Industry (freight rail maintenance):
   Location (Omaha, Nebraska):

Enter を押すと候補を受け入れるか、上から入力できます。これらの値はモデルの記憶によるものであり、OSINT ではありません — クライアントに関する情報ではなく、出発点として扱ってください。このルックアップはローカルの Ollama サーバーのみを使用するため、クライアント名がホストの外に出ることはありません。Web やサードパーティの API 呼び出しは行われません。モデルが組織を認識しない場合(小規模クライアントではよくあるケース)、何も返されず、空白のプロンプトが表示されます: ``` Company name: Acme Rail Services Industry: Location:

調査の失敗(タイムアウト、Ollamaが実行されていない、空の回答)は攻撃を妨げることはありません。単に空のプロンプトにフォールバックするだけです。`ollamaAutoResearch` を `false` に設定すると、調査を完全にスキップできます。
2. **ワードリスト** — サンプルのワードリストからベースワードを導出します。
3. **解読済みパスワード** — このセッションで既に復元された平文(`<hashfile>.out`)をモデルにフィードバックして、対象組織独自のパスワード規則(ベースワード、季節、年、接尾辞、リート語)を推測し、同じスタイルの*新しい*候補を生成させます。このオプションは、少なくとも1つのハッシュが解読された後にのみリスト表示されます。ファイル全体は、Wordlistモードとまったく同様に統計解析されます(上記の`ollamaMaxSampleLines`を参照)。

#### PCFG 設定

PCFG攻撃(オプション20)とPRINCE-LING攻撃(オプション21)は、`pcfg_cracker`サブモジュールを使用します。これらは`config.json`で設定します:```json
{
"pcfgRuleset": "DEFAULT",
"pcfgMaxCandidates": 50000000,
"pcfgPrinceLingMaxCandidates": 10000000
}
  • pcfgRuleset — 使用する学習済み文法の名前(デフォルト: DEFAULT)。pcfg_cracker/Rules/<name>/ に解決されます。pcfg_crackerのtrainer.pyで独自の文法を学習し、この値をルールセット名に設定してください。
  • pcfgMaxCandidates — PCFG攻撃でpcfg_guesser.pyが生成する最大候補数(デフォルト: 50000000)。
  • pcfgPrinceLingMaxCandidatesprince_ling.pyがキャッシュされたPRINCEベースワードリストに書き込む最大ベースワード数(デフォルト: 10000000)。

Optimized kernels (optimizedKernelAttacks)

hashcatの-Oフラグは最適化カーネルを選択します。これらは大幅に高速ですが、候補の長さに上限があり(おおよそ31文字、一部のモードではそれより短い)、それを超えるものは静かにスキップされます。config.json内のoptimizedKernelAttacksは、-Oで実行する攻撃のリストです。リストから攻撃を除外すると、フルレングスカーネルで実行されます。config.json.exampleのリストは、config.jsonが存在しない場合に適用される組み込みのデフォルトと一致します。

4つの攻撃はこの設定を尊重しますが、デフォルトでは最適化されません-Oの上限を超える可能性のある候補を供給するためです。オプトインするにはリストに追加してください:

  • hcatNgramX, hcatOllama, hcatOmen, hcatLMtoNT

設定を編集せずに単一の実行で-Oを全面的に無効にするには、--no-optimized-kernel(短縮形: --no-optimize)を指定します。これはすべての攻撃のリストを上書きし、さらにhcatTuningに書き込まれた-Oも除外します。そうしないと、リストに関係なくhashcatに渡されてしまうためです。

名前は完全一致で照合され、認識できないエントリは無視されずに起動時に報告されます。別の攻撃に委譲する攻撃は、自身の名前ではなく委譲先の攻撃によって制御されることに注意してください: PRINCE-LINGはhcatPrinceに従い、Spoonman、Rosetta、LLMパターンルールモードはhcatQuickDictionaryに従います。

Notifications (menu option 82)

hate_crackは、攻撃完了時および(オプションで)個々のハッシュがクラックされたときにPushoverプッシュ通知を送信できます。すべてのコントロールはメインメニューオプション82 — Notificationsにあります:

  1. Pushover通知の切り替え [ON/OFF] — マスタースイッチ。config.jsonnotify_enabledとして保存されます。
  2. クラックごとの通知の切り替え [ON/OFF] — ONの場合、バックグラウンドのテイラーが.outファイルを監視し、クラックごとに通知をプッシュします(ティックごとのバースト集約あり)。config.jsonnotify_per_crack_enabledとして保存されます。マスタースイッチがOFFの間は有効にできません — 最初にオプション1を有効にしてください。
  3. テストPushover通知の送信 — 定型のプッシュを送信して、Pushoverのトークン/ユーザーペアが機能することを確認できます。マスタースイッチがOFFでも機能します。

認証情報は.envにあります。残りのチューニングノブはconfig.jsonの設定ファイルのみです:

  • NOTIFY_PUSHOVER_TOKENNOTIFY_PUSHOVER_USER.env内) — プッシュを発火させるために必須です。メニューからはこれらを書き込めません。自分で.envを編集してください。
  • notify_attack_allowlist[y/N/always]プロンプトなしで自動同意する攻撃名。alwaysと回答すると自動的に追加されます。
  • notify_suppress_in_orchestrators(デフォルト true) — Extensive Crackによって連鎖される個々の攻撃を抑制し、代わりに単一のサマリーを送信します。連鎖された攻撃ごとに通知を受け取るにはfalseに設定します。複数のパスを実行する他のメニューエントリ(たとえば複数のルールチェーンを使うQuick Crack)はオーケストレーターではないため、常にパスごとに通知します。
  • notify_max_cracks_per_burst(デフォルト 5)、notify_poll_interval_seconds(デフォルト 5.0) — クラックごとのテイラーのチューニング。バースト集約ロジックはhate_crack/notify/tailer.pyを参照してください。

Wordlist Tools (menu option 80)

Wordlist Toolsサブメニューは、hashcat-utilsバイナリを利用したワードリスト前処理ユーティリティと、Hashmob.netおよびWeakpassからのワードリストダウンロードを提供します。メインメニューのオプション80からアクセスします。

オプションバイナリ説明
1len.bin長さでフィルタリング - 最小と最大の長さの間の単語のみを保持
2req-include.bin文字クラスを必須にする - 必要なすべての文字タイプを含む単語のみを保持
3req-exclude.bin文字クラスを除外 - 除外された文字タイプを含む単語を削除
4cutb.bin部分文字列を抽出 - 各単語からバイト範囲を切り出す
5splitlen.bin長さで分割 - 単語の長さごとに別々のファイルを作成(出力ディレクトリに01-64という名前のファイル)
6rli.bin / rli2.bin単語を減算 - 1つ以上の他のファイルに存在するエントリを削除
7gate.binシャーディング - 複数マシンでの分散クラック用にN番目ごとの単語を抽出
8-ワードリストを最適化 - 重複を排除し、最適化ワードリストディレクトリの下に長さ別ファイルに分割
9-Hashmob.netからワードリストをダウンロード
10-Weakpassからワードリストをダウンロード(BitTorrent経由)

文字クラスマスクビット(オプション2および3で使用): 1=小文字、2=大文字、4=数字、8=記号、16=その他。値を合算します: 7 = 小文字+大文字+数字。

シャーディングの使用目的: シャーディングは1つのワードリストをN個の等しい、重複しない部分に分割し、作業を複数のマシンまたはGPUに分散できるようにします。各部分はインターリーブ(N行ごと)されるため、各シャードはリスト全体の代表的なサンプルになり、連続した先頭/末尾のチャンクではありません — 単一ノードが低確率の末尾だけをクラックすることはありません。

オプション7を一度実行し、入力ワードリスト、出力ベースパス、シャード数(N)を指定します。単一パスですべてのN部分を書き出し、ゼロ埋めされたパート番号(base.001base.002、… base.00Nまで)で名前が付けられます。各部分を各ノードにコピーし、そのノードのhashcat実行でそれを指定します。シングルGPUシステムではシャーディングによる高速化はありませんが、単一の部分はフルリストに着手する前の迅速なトリアージパスとして、依然として高速で代表的なサンプルです。

自動更新チェック

hate_crackは起動時にGitHubで新しいリリースを自動的に確認できます。この機能はcheck_for_updates設定オプションで制御されます:```json { "check_for_updates": true }

- **`check_for_updates`** — 起動時に自動バージョンチェックを有効にします(デフォルト: `true`)。
- 有効にすると、hate_crack は GitHub から最新のリリース情報を取得し、アップデートがある場合は通知を表示します。
- このチェックは非同期的に実行され、起動をブロックしません。ネットワークエラーは黙って無視されます。

##### 更新チャネル

| チャネル | フラグ | ソース | 得られるもの |
|---------|------|--------|--------------|
| Release | `--update` | `main` | 最新の正式リリース。これはデフォルトであり、起動時チェックが提示するものです。 |
| Nightly | `--nightly` | `nightly-dev` | CI を通過したが、まだリリースされていない成果物です。 |

バージョンは通常の semver に従い、バンプはバッチに実際に含まれる内容から決定されます。2 番目のコンポーネントが移動するのは**機能追加のときだけ**です。`feat` コミットを 1 つでも含むサイクルは `X.(Y+1).0` に向かい、修正・ドキュメント・雑務のみのサイクルは `X.Y.(Z+1)` に向かいます。

`nightly-dev` は、バッチが向かっているバージョンのリリース候補にタグを付けます — `v2.20.1rc1`, `v2.20.1rc2`, … — そして `main` へのマージにより、同じターゲットが最終リリースに昇格します。リリース候補は本物の PEP 440 プレリリースであるため、両端で正しく順序付けられます。

    2.20.0  <  2.20.1rc1  <  2.20.1rc2  <  2.20.1  <  2.21.0rc1  <  2.21.0

ターゲットはサイクル途中で変更されることがあります。最初に追加された `feat` によって `X.Y.(Z+1)` から `X.(Y+1).0` に移動し、新しいターゲットに対して候補番号が振り直されます。その番号は常に、バッチが今日リリースされる場合のバージョンを表します。

メジャーコンポーネントが自動的にバンプされることはありません。`!` の件名や `BREAKING CHANGE:` フッターは機能追加として扱われます。自動メジャーは、打ち間違えた件名 1 つで取り消し不能な公開リリースにつながるためです。メジャーは明示的な人間の操作です。手動でタグを付けてプッシュしてください。

この方針は `tools/next_version.py` にあり、両方のタグ付けワークフローで共有され、`tests/test_next_version.py` でユニットテストされています。

起動時チェックは常にリリースのみを提示します。ナイトリービルドは GitHub リリースを一切公開せず、チェックは GitHub の "latest release" エンドポイントを読み取るため、`check_for_updates` を有効にしてもナイトリーに誘導されることはありません。現在、チャネルを分けているのは次の 2 点です。すなわち、前述の点と、リリース候補が本物の PEP 440 プレリリースであるため、生のバージョン番号を並べるツールでも、そのリリース候補を将来のリリースより古いものとして扱うという点です。

どちらのフラグも、まずチェックアウトを対応するブランチに切り替えます(未コミットの変更がある場合は拒否されます)。ナイトリーを実行中で、リリース済みコードに戻りたい場合は、`--update` で `main` に戻ります。

#### 見つかったハッシュの自動マージ(左ハッシュのダウンロード時のみ)

左ハッシュ(未クラックのハッシュ)をダウンロードするとき、hate_crack は自動的に以下を行います:
1. 補助操作として、Hashview から見つかった(クラック済みの)ハッシュのダウンロードを試みます
2. 見つかったハッシュをローカルの `.out` ファイル(例: `left_1_123.txt.out` または pwdump 形式の `left_1_123.nt.txt.out`)とマージします
3. 重複エントリを削除します
4. マージ後、一時的な分割ファイルをクリーンアップします

これにより、未クラックのハッシュを扱う際、ローカルのクラック結果が Hashview の集中データベースと同期された状態を保てます。

**注:** download-found オプションは、すでにクラックされたハッシュを参照用に別途ダウンロードするもので、マージやクラックの実行を促すことは一切行いません。

<hash_type> は `hashcat --help` を実行して取得できます。

ハッシュの例: http://hashcat.net/wiki/doku.php?id=example_hashes```
$ hashcat --help |grep -i ntlm
   5500 | NetNTLMv1                                        | Network protocols
   5500 | NetNTLMv1 + ESS                                  | Network protocols
   5600 | NetNTLMv2                                        | Network protocols
   1000 | NTLM                                             | Operating-Systems

コマンドラインからIPアドレスやドメインに関する情報を検索できるようにします。 urlscan.ioと同様の機能を提供します。

Build

$ go get
$ go build axeman.go

$ ./hate_crack.py 1000


/ | _____ / | ____ _ ___ ____________ ____ | | __ / ~ __ \ / __ \ / \ /_ __ _ \ / | |/ / \ Y // __ | | \ / \ _| | // __ \ _| < ___| /(__ /| _ >______ /|__| ( /___ >|_
/ / /
___/ / / / / Version 2.0

## テスト

テストスイートはほとんどオフラインで、モック/フィクスチャを使用します。ライブネットワークチェックとシステム依存関係チェックは、環境変数によるオプトインです。

### テストをローカルで実行する```bash
# Run all tests
uv run pytest -v

# Run specific test
uv run pytest tests/test_hashview.py -v

make test でフルスイートを実行することもできます。

ライブテスト(オプトイン)

ライブチェックを有効にするには、次のいずれかを設定します:

  • HASHMOB_TEST_REAL=1 — Hashmob のライブ接続性/CLIメニューチェック
  • HASHVIEW_TEST_REAL=1 — Hashview のライブCLIメニューチェック
  • WEAKPASS_TEST_REAL=1 — Weakpass のライブCLIメニューチェック
  • HATE_CRACK_REQUIRE_DEPS=17ztransmission-daemon、または transmission-remote が不足している場合は失敗

ライブ Hashview アップロードテスト

ライブ Hashview アップロードテストはデフォルトではスキップされます。実行するには、環境変数を設定し、.env に有効な認証情報を指定します:```bash HATE_CRACK_RUN_LIVE_TESTS=1 uv run pytest tests/test_upload_cracked_hashes.py -v

### ローカルDockerスタックに対するライブHashviewテスト

ライブテストをリモートのHashviewサーバーに対して実行する代わりに、テストスイートに
ローカル [Hashview](https://github.com/hashview/hashview) の
Dockerスタックを起動させ、シードし、それに対してライブテストを実行してから停止させることができます。
`HASHVIEW_TEST_LOCAL=1` を設定し、`HASHVIEW_REPO` をHashviewのチェックアウト先に指定します。```bash
HASHVIEW_TEST_LOCAL=1 HASHVIEW_REPO=~/projects/hashview \
  HATE_CRACK_SKIP_INIT=1 uv run pytest tests/test_hashview_cli_subcommands_subprocess.py -v

これは、Hashviewリポジトリ内で docker compose を起動し、管理者APIキー、顧客、ハッシュファイル、クラック済みの "effective task" データをシードしてから、テストが読み取る HASHVIEW_* 環境変数をエクスポートします。便利な環境変数:

  • HASHVIEW_TEST_LOCAL=1 — ローカルスタックを有効にする (それ以外の場合は何もしない)
  • HASHVIEW_REPO=<path> — Hashviewチェックアウト (デフォルト ~/projects/hashview)
  • HASHVIEW_KEEP=1 — セッション後もコンテナを起動したままにする (再実行が高速)
  • HASHVIEW_LOCAL_PORT=5000 — アプリが公開されるホストポート

hate_crack CLI は HASHVIEW_URL / HASHVIEW_API_KEY 環境変数を尊重します (この2つのキーが含まれる .env を上書きします)。これにより、スイートは永続化された設定を編集することなく、CLI をローカルスタックに向けることができます。

エンドツーエンドのインストールテスト (ローカル + Docker)

ローカルの uv tool install + スクリプト実行 (一時的な HOME を使用):```bash HATE_CRACK_RUN_E2E=1 uv run pytest tests/test_e2e_local_install.py -v

Dockerベースのエンドツーエンドのインストール/実行 (`Dockerfile.test` 経由でキャッシュ):```bash
HATE_CRACK_RUN_DOCKER_TESTS=1 uv run pytest tests/test_docker_script_install.py -v

Docker E2E テストは、rockyou の小さなサブセットもダウンロードし、基本的な hashcat クラックを実行して、外部ツールとの統合を検証します。

Lima VM エンドツーエンドテスト (macOS のみ):

前提条件: Limarsync がインストールされている必要があります。```bash brew install lima

テストVMは、すべてのLinux依存関係(hashcat、build-essential、curl、git、gzip、p7zip-full、transmission-daemon、ocl-icd-libopencl1、pocl-opencl-icd、uv)とともに自動的にプロビジョニングされます。```bash
HATE_CRACK_RUN_LIMA_TESTS=1 uv run pytest tests/test_lima_vm_install.py -v

このテストは、macOS上の軽量Linux VM内でのインストールと実行を検証します。

テスト構造

  • tests/test_hashview.py: HashviewAPIクラスの包括的なテストスイート。モックされたAPIレスポンスを使用。内容:
    • 顧客一覧とデータ検証
    • 認証と認可のテスト
    • ハッシュファイルのアップロード機能
    • 完全なジョブ作成ワークフロー

すべてのテストはモックされたAPI呼び出しを使用するため、Hashviewサーバーへの接続なしで実行できます。


(1) クイッククラック (2) 包括的Pure_Hateメソドロジークラック (3) ブルートフォース攻撃 (4) トップマスク攻撃 (5) フィンガープリント攻撃 (6) コンビネーター攻撃 (7) ハイブリッド攻撃 (8) Pathwell Top 100マスクブルートフォースクラック (9) PRINCE攻撃 (10) Bandrelメソドロジー (11) ループバック攻撃 (12) LLM攻撃 (13) OMEN攻撃 (14) アドホックマスク攻撃 (15) マルコフブルートフォース攻撃 (16) N-gram攻撃 (17) 順列攻撃 (18) ランダムルール攻撃 (19) Combipowパスフレーズ攻撃 (20) PCFG攻撃 (21) PRINCE-LING攻撃 (22) Spoonman攻撃 (23) Rosetta攻撃

(80) ワードリストツール (81) ルールファイルツール (82) 通知

(93) POTファイルから.outを再生成 (94) Hashview API (95) Pipalでハッシュを分析 (96) 出力をExcel形式にエクスポート (97) 解読されたハッシュを表示 (98) READMEを表示 (99) 終了

タスクを選択:```

Option 94 — Hashview API is only listed when HASHVIEW_API_KEY is set in .env.

The YOLO, Middle, and Thorough Combinator attacks were previously at keys 10-12. They now live in the Combinator Attacks submenu (option 6) along with Combinator3 and CombinatorX.

Quick Crack

Runs a dictionary attack against wordlists in your hcatOptimizedWordlists directory (falls back to hcatWordlists if not configured) and optionally applies rules. Multiple rules can be selected by comma-separated list, and chains can be created with the '+' symbol. Pressing Enter at the wordlist prompt uses the configured optimized wordlists directory as the default.

どのルールを実行しますか?
(1) best64.rule
(2) d3ad0ne.rule
(3) T0XlC.rule
(4) dive.rule
(99) YOLO...すべてのルールを実行
実行したいルールをカンマ区切りのリストで入力してください。ルールを連結して実行するには + 記号を使用します。
例: 1+1 は best64.rule を2回連結して実行し、1,2 は best64.rule を実行してから d3ad0ne.rule を順番に実行します。
賢く選択してください:```




#### Extensive Pure_Hate Methodology Crack
Runs several attack methods provided by Martin Bos (formerly known as pure_hate):
  * Brute Force Attack (7 characters)
  * Dictionary Attack
    * All wordlists in `hcatWordlists` with `best64.rule`
    * `rockyou.txt` with `d3ad0ne.rule`
    * `rockyou.txt` with `T0XlC.rule`
  * Top Mask Attack (Target Time = 4 Hours)
  * Fingerprint Attack
  * Combinator Attack
  * Hybrid Attack
  * Extra - Just For Good Measure
    - Runs a dictionary attack using `rockyou.txt` with chained `combinator.rule` and `InsidePro-PasswordsPro.rule` rules

#### Brute Force Attack
Brute forces all characters with the choice of a minimum and maximum password length.

#### Top Mask Attack
Uses StatsGen and MaskGen from PACK (https://thesprawl.org/projects/pack/) to perform a top mask attack using passwords already cracked for the current session.
Presents the user a choice of target cracking time to spend (default 4 hours).

#### Fingerprint Attack
https://hashcat.net/wiki/doku.php?id=fingerprint_attack

Runs a fingerprint attack using passwords already cracked for the current session.

#### Combinator Attack
https://hashcat.net/wiki/doku.php?id=combinator_attack

Runs a combinator attack using the "rockyou.txt" wordlist.

#### Hybrid Attack
https://hashcat.net/wiki/doku.php?id=hybrid_attack

* Runs several hybrid attacks using the "rockyou.txt" wordlists.
  - Hybrid Wordlist + Mask - ?s?d wordlists/rockyou.txt ?1?1
  - Hybrid Wordlist + Mask - ?s?d wordlists/rockyou.txt ?1?1?1
  - Hybrid Wordlist + Mask - ?s?d wordlists/rockyou.txt ?1?1?1?1
  - Hybrid Mask + Wordlist - ?s?d ?1?1 wordlists/rockyou.txt
  - Hybrid Mask + Wordlist - ?s?d ?1?1?1 wordlists/rockyou.txt
  - Hybrid Mask + Wordlist - ?s?d ?1?1?1?1 wordlists/rockyou.txt

#### Pathwell Top 100 Mask Brute Force Crack
Runs a brute force attack using the top 100 masks from KoreLogic:
https://blog.korelogic.com/blog/2014/04/04/pathwell_topologies

#### PRINCE Attack
https://hashcat.net/events/p14-trondheim/prince-attack.pdf

Runs a PRINCE attack using wordlists/rockyou.txt

#### YOLO Combinator Attack
Runs a continuous combinator attack using random wordlists from the configured wordlists directory for the left and right sides.

#### Middle Combinator Attack
https://jeffh.net/2018/04/26/combinator_methods/

Runs a modified combinator attack adding a middle character mask:
wordlists/rockyou.txt + masks + worklists/rockyou.txt

Where the masks are some of the most commonly used separator characters:
2 4 <space> - _ , + . &

#### Thorough Combinator Attack
https://jeffh.net/2018/04/26/combinator_methods/

* Runs many rounds of different combinator attacks with the rockyou list.
  - Standard Combinator attack: rockyou.txt + rockyou.txt
  - Middle Combinator attack: rockyou.txt + ?n + rockyou.txt
  - Middle Combinator attack: rockyou.txt + ?s + rockyou.txt
  - End Combinator attack: rockyou.txt + rockyou.txt + ?n
  - End Combinator attack: rockyou.txt + rockyou.txt + ?s
  - Hybrid middle/end attack: rockyou.txt + ?n + rockyou.txt + ?n
  - Hybrid middle/end attack: rockyou.txt + ?s + rockyou.txt + ?s


#### Bandrel Methodology

Prompts for comma-separated names and creates a pseudo hybrid attack by capitalizing the first letter and adding up to six additional characters at the end. Each word is limited to a total of five minutes.

  - Built-in common words (seasons, months) included as a customizable `config.json` entry (`bandrel_common_basedwords`)
  - The default five-minute time limit is customizable via `bandrelmaxruntime` in `config.json`

#### Loopback Attack
https://hashcat.net/wiki/doku.php?id=loopback_attack

Uses hashcat's loopback mode to feed cracked passwords from the current session back into the attack pipeline with rules applied. This generates new password candidates based on variations of already-cracked passwords, which is particularly effective for finding related passwords that follow similar patterns.

* Prompts for rule selection to apply to the loopback candidates
* Uses an empty wordlist with the --loopback flag to process previously cracked passwords
* Automatically downloads Hashmob rules if no rules are available locally

#### LLM Attack
Uses a local Ollama instance to generate password candidates for a capture-the-flag scenario. Prompts for the fake company name, industry, and location, then sends these details to the configured LLM model to produce likely password candidates using industry terms and company name permutations. The generated candidates are fed into a hashcat wordlist+rules attack.

* Requires a running Ollama instance (default: `http://localhost:11434`, override with `OLLAMA_HOST` in `.env` or the environment) with the model already pulled — hate_crack does not auto-pull
* Candidate generation uses structured (JSON) output via Atomic Agents, so pick a model with good schema adherence (default: `qwen2.5:32b`)
* Configurable model, context window, request timeout, and sample size via `.env` (see Ollama Configuration below)
* Prompts for target company name, industry, and location. The industry and location prompts are pre-filled with the local model's guesses about the named organization (editable, and clearly labelled as guesses rather than verified OSINT); disable with `ollamaAutoResearch: false`
* Alternatively derives basewords from a sample **wordlist**, or from the **cracked passwords** of the current session (`<hashfile>.out`) so the model mirrors the target organization's own password conventions and produces new candidates in that style (only offered once something has been cracked)
* A live spinner with an elapsed-seconds counter runs during generation, and requests are bounded by `ollamaTimeout` so a model stuck loading into VRAM reports a timeout instead of hanging

**Pattern rules mode** (option 4 in the LLM submenu) takes the same shape as the [Spoonman Attack](#spoonman-attack) — a baseword list run through a rule file, both derived from one corpus — but infers each side with the model instead of extracting it. Spoonman is exact and therefore bounded: its basewords all appear in the corpus and its rules only reproduce transformations the corpus already shows. This asks the model to generalize on both axes, so it can name the *word families* behind a sample (the company and its products, site names, local sports teams, seasons, mascots) and write decorations the corpus does not contain.

* Pattern source is either the current session's cracked passwords (offered first, and only once something has been cracked, since those reveal the target's real conventions) or a sample wordlist
* **You are not asked to pick a rule file.** The model writes one, from the same corpus statistics — a stock rule file encodes the internet's habits, and the point of spending a model round trip is to encode *this* organization's
* Basewords are normalized to lowercase letters only, discarding anything under 3 characters, so the generated rules supply case, digits, and punctuation exactly once
* Generated rules are validated before hashcat sees them, and anything using an op hashcat does not have, a position argument outside `0-9A-Z`, more than 31 functions, or a stray comment or non-ASCII character is discarded. hashcat drops an invalid rule *silently* when valid rules share the file, so an unscreened line would become missing coverage rather than an error. The op table was established by testing hashcat itself, not from its rule documentation, which lists ops hashcat will not actually run
* Local-model yield varies a lot run to run, so a thin answer is asked again once and the two rounds are merged — a handful of rules would waste the pass they are spent on
* If no rule survives validation the basewords still run, unmutated, rather than throwing away the expensive half of the run
* Output lands in `<hashfile>.llm_patterns/` as `basewords.txt` and `rules.rule` — per-run scratch, laid out like `.spoonman/` and removed on exit

#### OMEN Attack
Uses the Ordered Markov ENumerator (OMEN) to train a statistical password model from a wordlist and generate password candidates. This attack learns patterns from known passwords and generates new candidates based on those patterns.

* Requires OMEN binaries (createNG and enumNG) to be built from the omen submodule
* Interactive menu: use existing model, train new model, or cancel
* Training wordlist picker shows available wordlists from configured directory or accepts a custom path
* Validates all 5 required model files (createConfig, CP/IP/EP/LN.level) before running
* Captures and reports enumNG errors instead of failing silently
* Generates up to a specified number of password candidates (configurable via `omenMaxCandidates`)
* Pipes generated candidates directly into hashcat for cracking
* Model files and metadata are stored in `~/.hate_crack/omen/` for persistence across sessions

#### Combinator Attacks Submenu
Opens an interactive submenu with six combinator attack variants (formerly at menu keys 10-12). Consolidates related attacks for cleaner menu organization:
- Combinator Attack - combines two wordlists
- YOLO Combinator Attack - combines all permutations of multiple wordlists
- Middle Combinator Attack - combines wordlists with an extra word in the middle
- Thorough Combinator Attack - comprehensive combination of wordlists with rules
- Combinator3 Attack - combines exactly 3 wordlists using `combinator3.bin`, generating all `word1+word2+word3` combinations piped to hashcat
- CombinatorX Attack - combines 2-8 wordlists using `combinatorX.bin` with optional `--sepFill` separator character between word segments

#### Ad-hoc Mask Attack
Runs hashcat mask attack (mode 3) with a user-specified custom mask string. Allows fine-grained control over character-set brute forcing.

* Opens with a choice between typing a mask and selecting a mask file
* Prompts for a hashcat mask (e.g., `?u?l?l?l?d?d` for uppercase + lowercase + lowercase + lowercase + digit + digit)
* Supports custom character sets (`-1`, `-2`, `-3`, `-4`) for specialized character combinations
* Interactive charset entry with early exit on blank input
* Mask files (`.hcmask`) can be selected with tab completion, defaulting to the bundled `masks/` directory; hashcat runs every mask in the file in order. Because a mask file defines its own charsets inline, the `-1` through `-4` prompts are skipped when one is chosen
* Useful for targeted brute forcing when you know password structure patterns

#### Markov Brute Force Attack
Generates password candidates using Markov chain statistical models. Similar to OMEN but simpler and faster.

* Checks for existing `.hcstat2` Markov table from previous sessions (with option to reuse, regenerate, or cancel)
* Generates table from training source if needed:
  - Can use cracked passwords from current session (`.out` file) as training data
  - Or select any wordlist from configured directory or custom path
* Interactive menu: choose minimum and maximum password length
* Uses `--increment` flag to test lengths in sequence
* Markov table persists with hash file (filename.out.hcstat2) for fast subsequent runs
* Faster than OMEN for general-purpose brute forcing

#### N-gram Attack
Generates n-gram candidates from a corpus file using `ngramX.bin` from hashcat-utils and pipes them into hashcat.

* Prompts for a corpus file with tab completion, defaulting to the configured wordlist directory
* Prompts for an n-gram group size (default 3)
* Gzip-compressed corpus files are auto-detected and decompressed on the fly
* Useful when you have target-relevant prose (scraped site copy, leaked documents, internal wiki exports) rather than a password list

#### Permutation Attack
Generates all character permutations of each word in a targeted wordlist and pipes them to hashcat via `permute.bin` from hashcat-utils.

* Prompts for a single wordlist file (not a directory)
* Effective against short targeted wordlists where the character set is known but the order is not (company abbreviations, name fragments, known tokens)
* WARNING: Scales as N! per word - an 8-character word produces 40,320 permutations. Only practical for words up to ~8 characters.
* Uses `permute.bin < wordlist | hashcat` pipeline pattern

#### Random Rules Attack
Generates a set of random hashcat mutation rules using `generate-rules.bin`, writes them to a temporary file, then runs hashcat against a chosen wordlist with those rules.

* Prompts for rule count (default 65536)
* Prompts for wordlist path with tab-completion and numbered selection
* Temporary rules file is cleaned up after the run regardless of outcome
* Useful when known rule sets are exhausted - explores random rule-space for additional cracks

#### Combipow Passphrase Attack
Generates all unique non-empty subset combinations from a short wordlist using `combipow.bin` and pipes them into hashcat. Designed for passphrase cracking when you know the pool of words a password was built from.

* Prompts for a wordlist file (max 63 lines - combipow generates up to 2^n-1 combinations)
* Optional space separator (`-s` flag) to insert spaces between words in each combination
* Warns if the wordlist exceeds 20 lines (output volume may be large)
* Aborts with a clear message if the wordlist exceeds 63 lines (hard limit)
* Candidates are piped directly to hashcat stdin

#### PCFG Attack
Uses [pcfg_cracker](https://github.com/lakiw/pcfg_cracker) to generate candidates from a Probabilistic Context-Free Grammar, piping `pcfg_guesser.py` output directly into hashcat's stdin mode. A PCFG models password *structure* (baseword + digits + symbol, capitalization habits, keyboard walks) with learned probabilities, so candidates come out roughly in descending likelihood order.

* Requires the `pcfg_cracker` submodule. Presence is checked at startup and reported non-fatally: if it is missing, the PCFG attacks are simply unavailable. Run `make` to fetch it.
* Uses the trained grammar named by `pcfgRuleset` in `config.json` (default `DEFAULT`), read from `pcfg_cracker/Rules/<name>/`
* Candidate count is capped by `pcfgMaxCandidates` (default 50,000,000)
* hate_crack does not wrap grammar training. To build a grammar from a target-specific password set, run pcfg_cracker's own `trainer.py` and point `pcfgRuleset` at the resulting ruleset name

#### PRINCE-LING Attack
Uses pcfg_cracker's `prince_ling.py` to derive an optimized PRINCE base wordlist from a trained grammar, then hands it to the existing PRINCE attack. PRINCE-LING picks base words the grammar says are actually productive, so the PRINCE combination space is far less wasteful than pointing PRINCE at a generic wordlist.

* Requires the `pcfg_cracker` submodule and a trained ruleset directory, same as the PCFG attack
* The generated wordlist is cached at `<hcatOptimizedWordlists>/pcfg_prince_ling_<ruleset>.txt` and reused across sessions
* Regenerates only when the ruleset directory is newer than the cached wordlist, so retraining a grammar invalidates the cache automatically
* Generation is written to a temporary file and atomically moved into place; a failed or interrupted run cleans up its partial file and leaves any existing cache intact
* Base wordlist size is capped by `pcfgPrinceLingMaxCandidates` (default 10,000,000)

#### Spoonman Attack
Derives a baseword list and a hashcat rule file from a corpus of known plaintext passwords — a previous engagement's cracked output, a leak dump, or any password list — such that the baseword x rule cross product reconstructs the corpus exactly (see the memory bound below for the one case where it does not). Contributed as issue #169 by @Spoonman1091.

Each password is split into its letters-only lowercased core (the baseword) plus a rule that rebuilds the original from it, using `l`/`u`/`c` for casing, `T{p}` toggles, `${x}`/`^{x}` for trailing and leading characters, and `i{p}{x}` for interior ones.

* When the current session already has cracked plaintexts (`<hash file>.out` exists and is non-empty), a picker offers those as the corpus ahead of a free-form path — the target's own recovered passwords derive rules describing that target's actual conventions, which is exactly what you want to fire back at the remaining uncracked hashes. Deriving from `.out` and then cracking the same hash file appends new plaintexts to that same file, growing the corpus for the next run; that is the intended feedback loop, not corruption. Sessions with no cracked output yet see no picker at all — just today's path prompt
* Prompts for the corpus, then for how much of the rule file to run: top 50% coverage (listed first and recommended), top 75%, top 95%, top 99%, or the full set
* Rules are sorted by how many passwords each one rebuilds, so a truncated file keeps the most productive rules. Coverage is extremely long-tailed: on a 98.2M-password sample, 50% coverage needed 4,120 rules while 95% needed 16,119,661 and 100% needed 21,029,696 — the last few percent typically costs orders of magnitude more rules than the first half, which is why the smallest tier is listed first and is usually the right choice
* Output is written beside the hash file in `<hash file>.spoonman/`, alongside the other ephemeral wordlists: `basewords.txt`, `rules.full.rule`, the capped rule files, and `coverage.txt` with per-milestone rule counts. Derivation is skipped on later runs of the same hash file unless the corpus has been modified since, and the directory is removed on exit by the temp-file cleanup
* Derivation is bounded in memory. Both counters would otherwise grow for the whole read with nothing written until the end, so a corpus large enough to exhaust RAM lost the entire pass to an OOM kill and produced no output; a measured run against a 31 GB corpus reached 14.1 GB resident at 11% of the file and was still accelerating. Each counter is now capped at 20 million distinct keys (about 1.6 GB apiece), and the lowest-frequency keys are discarded once it is exceeded. If that happens, the run says so on the console and in `coverage.txt`, the output reconstructs the retained keys rather than 100% of the corpus, and the coverage percentages are relative to those. Corpora below the cap are unaffected
* Passwords that cannot be expressed as a rule are written verbatim as their own baseword with a `:` no-op, so coverage stays complete. This covers two hashcat limits: rule positions cannot address past index 35, and hashcat rejects any rule with more than 31 functions — silently, when valid rules share the file
* The derivation self-checks every password by reconstructing it in-process, and reports any failures rather than reporting success
* Corpus lines may carry a hash in front of the password, as cracked output does. A leading field is dropped only when it has the shape of a hash (a hex digest at a known length, or a crypt-style `$id$` string), so `hash:salt:plain` is handled while a plaintext or wordlist entry containing a colon survives intact. `$HEX[...]` plaintexts are decoded. If most lines look like an uncracked dump rather than cracked output, `coverage.txt` records the count and the attack warns — the derived basewords and rules would otherwise be meaningless without any error being raised

#### Rosetta Attack
Mines hashcat `--debug-mode 5` logs for the basewords and rules that already cracked something, then runs their full cross product. Powered by [HashcatRosetta](https://github.com/bandrel/HashcatRosetta), the same library behind [Analyze Hashcat Rules](#analyze-hashcat-rules-rule-file-tools-option-5).

No setup is needed to feed it: `_add_debug_mode_for_rules` appends `--debug-mode 5 --debug-file` to every rule-based hashcat invocation hate_crack makes, so the logs accumulate in `hcatDebugLogPath` (`~/.hate_crack/hashcat_debug` by default, one file per session) as a side effect of normal use. A mode 5 log records only candidates that cracked a hash, in the form `baseword:rule:candidate:wordlist`, which is what makes both halves known-productive against this target population; the trailing wordlist field also shows which list is earning its keep on a multi-wordlist run. HashcatRosetta parses mode 4 and mode 5 alike, so logs written before the switch are still read.

The value is in the cross product rather than the recorded pairs. A pair present in a log has already cracked its hash and will not crack another, but a rule that worked on one baseword has usually never been tried against the others — so N basewords and M rules yield close to N x M untried candidates.

The menu first asks how to rank rules — choices 1-3 below, plus a fourth, unrelated mode:

* Rules can be ranked by application frequency, by how many distinct basewords each one worked on, or by how many unique candidates each one generated. Frequency is the default; baseword spread is the better choice when the goal is a rule set that generalizes past the specific words it was learned from
* Only after one of those three is picked does hate_crack list the logs found in `hcatDebugLogPath` newest-first with their sizes; pick one, pick all of them (up to 20), or type a path to a log from elsewhere
* Prompts for how many top rules to keep (default 100) and how many top basewords (default all). Zero means unlimited for either. The keyspace is the product of the two and is printed before hashcat starts
* Output is written beside the hash file in `<hash file>.rosetta/` as `basewords.txt` and `rules.rule`, alongside the other ephemeral wordlists, and the directory is removed on exit by the temp-file cleanup
* Reading stops at 1,000,000 debug lines, since the analyzer needs the whole batch in memory at once. Truncation is reported on the console rather than assumed harmless — logs from a long run routinely exceed this, in which case the newest log is the one worth selecting
* **LLM Mask Attack** (4) - a different mode entirely, and the only one that needs no debug logs. Prompts for a natural-language description of the passwords you expect (length, character patterns, symbols, etc.), sends it to the locally configured Ollama model, writes the returned masks to `<hash file>.hcmask`, and runs a `-a 3` hashcat mask attack against them

#### Wordlist Tools (option 80)
A submenu of wordlist preprocessing utilities using hashcat-utils binaries. All tools read from and write to files on disk. All file and directory path prompts support tab completion.

| Key | Tool | Description |
|-----|------|-------------|
| 1 | Filter by Length | Keep only words between a min and max length (`len.bin`) |
| 2 | Require Char Classes | Keep words that include all char classes in mask (`req-include.bin`). Mask: 1=lower, 2=upper, 4=digit, 8=symbol (additive) |
| 3 | Exclude Char Classes | Remove words containing any char class in mask (`req-exclude.bin`). Same mask encoding |
| 4 | Extract Substring | Cut bytes from each word at a given offset and optional length (`cutb.bin`) |
| 5 | Split by Length | Create per-length files in an output directory (`splitlen.bin`) |
| 6 | Subtract Wordlist | Remove lines from a wordlist that appear in one or more remove files. Mode 1 uses `rli2.bin` (single file); mode 2 uses `rli.bin` (multiple files) |
| 7 | Shard Wordlist | Split a wordlist into N equal, interleaved parts in one run, written as `base.001`…`base.00N` for distributed cracking (`gate.bin`) |
| 8 | Optimize Wordlists | Dedupe and split the selected wordlists into per-length files under an output directory |
| 9 | Download from Hashmob.net | Browse and download wordlists from Hashmob.net into the configured wordlist directory |
| 10 | Download from Weakpass | Browse and download Weakpass wordlist torrents, with automatic extraction |

All binaries are in `hate_crack/hashcat-utils/bin/`.

#### Rule File Tools (option 81)
Preprocesses hashcat rule files using `cleanup-rules.bin` and `rules_optimize.bin` from hashcat-utils, and downloads rule files from Hashmob.net.

* **Clean** (1) - removes invalid syntax and duplicate rules using `cleanup-rules.bin`. Useful after combining rule files or downloading rules from external sources.
* **Optimize** (2) - consolidates redundant operations using `rules_optimize.bin`. Reduces rule file size and improves cracking speed.
* **Clean and optimize** (3) - runs both operations in sequence via a temporary file, then writes the final result.
* **Download rules from Hashmob.net** (4) - fetches rule files into the configured `rulesDirectory`.
* **Analyze Hashcat rules** (5) - opcode frequency analysis of a rule file, powered by HashcatRosetta.

The three preprocessing operations read from an input file and write to a separate output file (original is never modified).

#### Download Rules from Hashmob.net (Rule File Tools option 4)
Downloads the latest rule files from Hashmob.net's rule repository. These rules are curated and optimized for password cracking and can be used with the Quick Crack and Loopback Attack modes.

* Downloads rule sets in parallel using a thread pool (up to 4 concurrent downloads)
* Skips rules already downloaded locally
* Reports download summary with success/failure counts
* Stores rules in the configured rules directory

#### Analyze Hashcat Rules (Rule File Tools option 5)
Powered by HashcatRosetta (https://github.com/bandrel/HashcatRosetta), this feature analyzes hashcat rule files to provide detailed insights into rule composition and complexity.

* Prompts for a rule file path
* Displays frequency analysis of rule opcodes (operations)
* Helps understand what transformations a rule set performs
* Useful for rule debugging and optimization

#### Download Wordlists from Hashmob.net (Wordlist Tools option 9)
Downloads wordlists from Hashmob.net's collection of cracked passwords and commonly used wordlists.

* Interactive menu for browsing available wordlists
* Progress tracking for large downloads
* Stores wordlists in configured wordlist directory

#### Weakpass Wordlist Menu (Wordlist Tools option 10)
Interactive menu for downloading and managing wordlists from Weakpass.com via BitTorrent.

* Browse available Weakpass wordlist torrents
* Download specific wordlists or entire collections
* Automatic extraction of compressed archives
* Progress tracking for torrent downloads

-------------------------------------------------------------------
### Version History

The full, per-release changelog now lives in [CHANGELOG.md](https://github.com/trustedsec/hate_crack/blob/HEAD/CHANGELOG.md).

カテゴリ