> 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/fr/hacking-wifi/wpa-wpa2-psk-network-attacks/precomputed-attacks/cracking-with-pyrit.md).

# Craquage avec Pyrit

Comparer les vitesses de récupération de mots de passe WPA/WPA2 avec Pyrit et Hashcat.

Ce test compare les performances de récupération de mot de passe avec Pyrit et Hashcat. Chaque outil utilise la même capture et la même liste de mots de passe.

Le mot de passe cible est `92212345`.

### Extraire le hachage

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="https://3840167291-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>

Afficher les hachages extraits :

{% code overflow="wrap" %}

```bash
cat Hash
```

{% endcode %}

<figure><img src="https://3840167291-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>

### Créer la liste de mots de passe

Créez un `passwords.txt` fichier contenant 100 000 candidats :

{% code overflow="wrap" %}

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

{% endcode %}

### Tester avec John

Exécuter la récupération :

{% code overflow="wrap" %}

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

{% endcode %}

Cela prend environ 1 minute et 40 secondes.

<figure><img src="https://3840167291-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>

### Tester avec Pyrit

Ensuite, identifiez le nom du point d'accès. Il s'agit de `Jordan`.

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="https://3840167291-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 utilise `attack_passthrough` pour calculer `PMK = PBKDF2(ESSID, password)` pour chaque `passwords.txt` entrée. Il compare chaque résultat avec le handshake.

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="https://3840167291-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>

Cela prend 1 min 29 s.

### Comparer avec Hashcat

Le flux de travail équivalent avec Hashcat commence par convertir la capture :

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

Puis lancez la récupération :

{% code overflow="wrap" %}

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

{% endcode %}

Cela prend environ 1 minute et 30 secondes.

<figure><img src="https://3840167291-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/fr/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.
