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

# Quebra com Pyrit

Compare as velocidades de recuperação de senhas WPA/WPA2 com Pyrit e Hashcat.

Este teste compara o desempenho da recuperação de senhas com Pyrit e Hashcat. Cada ferramenta usa a mesma captura e a mesma lista de senhas.

A senha-alvo é `92212345`.

### Extraia o hash

{% code overflow="wrap" %}

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

{% endcode %}

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

Veja os hashes extraídos:

{% code overflow="wrap" %}

```bash
cat Hash
```

{% endcode %}

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

### Crie a lista de senhas

Crie um `passwords.txt` arquivo com 100.000 candidatos:

{% code overflow="wrap" %}

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

{% endcode %}

### Teste com o John

Execute a recuperação:

{% code overflow="wrap" %}

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

{% endcode %}

Isso leva cerca de 1 minuto e 40 segundos.

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

### Teste com o Pyrit

Em seguida, identifique o nome do ponto de acesso. Ele é `Jordan`.

{% code overflow="wrap" %}

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

{% endcode %}

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

O Pyrit usa `attack_passthrough` para calcular `PMK = PBKDF2(ESSID, senha)` para cada `passwords.txt` entrada. Ele compara cada resultado com o handshake.

{% code overflow="wrap" %}

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

{% endcode %}

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

Isso leva 1 min 29 s.

### Compare com o Hashcat

O fluxo de trabalho equivalente do Hashcat começa convertendo a captura:

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

Em seguida, execute a recuperação:

{% code overflow="wrap" %}

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

{% endcode %}

Isso leva cerca de 1 minuto e 30 segundos.

<figure><img src="https://783634792-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/pt-br/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.
