> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ja/hacking-wifi/wpa-wpa2-psk-network-attacks/precomputed-attacks/cracking-with-pyrit.md).

# Pyrit によるクラック

Pyrit と Hashcat を使って WPA/WPA2 のパスワード回復速度を比較する。

このテストでは、Pyrit と Hashcat のパスワード回復性能を比較します。各ツールは同じキャプチャとパスワードリストを使用します。

対象のパスワードは `92212345`.

### ハッシュを抽出する

{% code overflow="wrap" %}

```bash
wpapcap2john Capture-01.cap > Hash
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FBgJnQlqevUGwHctHQEOu%2Fimage.png?alt=media&amp;token=ad68a432-389d-4f4e-a659-6a83b956a6bd" alt=""><figcaption></figcaption></figure>

抽出されたハッシュを表示します:

{% code overflow="wrap" %}

```bash
cat Hash
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FAcUPjOW6i3nhuTgLGQ9j%2Fimage.png?alt=media&amp;token=1af8b366-7219-4145-8a8c-a67e9113ce5c" alt=""><figcaption></figcaption></figure>

### パスワードリストを作成する

作成する `passwords.txt` 100,000 個の候補を含むファイル:

{% code overflow="wrap" %}

```bash
seq 92162345 92262345 > passwords.txt
```

{% endcode %}

### John でテストする

回復処理を実行します:

{% code overflow="wrap" %}

```bash
john --format=wpapsk -w=passwords.txt Hash
```

{% endcode %}

これには約1分40秒かかります。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FDxzShpvXwL4QwYzEMbTF%2Fimage.png?alt=media&amp;token=5b09cae9-5833-46c6-8aa1-f34a2c96b0ba" alt=""><figcaption></figcaption></figure>

### Pyrit でテストする

次に、アクセスポイント名を特定します。それは `ジョーダン`.

{% code overflow="wrap" %}

```bash
echo -n "$(cat hash.22000 | cut -d'*' -f6)" | xxd -r -p
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FqopoiOvGLihEVzf1gSqY%2Fimage.png?alt=media&amp;token=f797d59c-bd2a-46d8-ae09-457cd5e1fa2b" alt=""><figcaption></figcaption></figure>

Pyritは `attack_passthrough` を計算する `PMK = PBKDF2(ESSID, password)` ごとに `passwords.txt` エントリです。各結果をハンドシェイクと比較します。

{% code overflow="wrap" %}

```bash
pyrit -r Capture-01.cap -e Jordan -i passwords.txt attack_passthrough
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FLETEIGXPISdlEAdv6XMi%2Fimage.png?alt=media&amp;token=0aa4de3a-be87-4d66-9ac6-b082d9d2ff1d" alt=""><figcaption></figcaption></figure>

これには1分29秒かかります。

### Hashcat と比較する

同等の Hashcat のワークフローは、まずキャプチャを変換することから始まります:

```bash
hcxpcapngtool -o hash.22000 Capture-01.cap
```

続いて、回復処理を実行します:

{% code overflow="wrap" %}

```bash
hashcat -m 22000 hash.22000 passwords.txt
```

{% endcode %}

これには約1分30秒かかります。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FTu7R3kHyW2IE7T92ZEJx%2Fimage.png?alt=media&amp;token=5f641671-85ad-4152-ac26-43bf0f0522fc" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/ja/hacking-wifi/wpa-wpa2-psk-network-attacks/precomputed-attacks/cracking-with-pyrit.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
