> For the complete documentation index, see [llms.txt](https://repo.4pfsec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://repo.4pfsec.com/wireless-penetration-testing/wifi-pineapple-tetra/cracking-wpa2-handshake.md).

# Cracking WPA2 Handshake

## Cracking

We need to convert the captured `.pcap` file into `.hccapx` format in order to start cracking with it. There's a tool named `cap2hccapx` which can help us do this. However, we first need to download and compile it on our unix system.

### **Compiling cap2hccapx**

* Downloading Source

```
wget https://raw.githubusercontent.com/hashcat/hashcat-utils/master/src/cap2hccapx.c
```

![](/files/-Mg_ri2Imxu7XR8RIqzL)

* Compiling Tool

```
gcc -o cap2hccapx cap2hccapx.c
```

![](/files/-Mg_rp0ubtLrZTalSH_2)

* Testing Tool

```
./cap2hccapx
```

![](/files/-Mg_ru-YjmYXEsMWri2W)

### Converting

Now that we have the tool compiled and ready to go, we can convert the file and prep it for cracking!

```
cap2hccapx E4-6F-13-FA-AD-E0_partial.pcap  capture.hccapx
```

![](/files/-Mg_rxUpxXeVWNQYZA5l)

### Cracking with .hccapx

I'll be using Hashcat for the cracking on my host machine. [Here's](https://4pfsec.com/hashcat-password-cracking/) a post where I explain why cracking on the host machine is better 😊!

```
.\hashcat.exe -m 2500 .\hashes\capture.hccapx .\wordlists\rockyou.txt --force
```

![](/files/-Mg_s-4sWEc87K4G-6Au)

{% hint style="success" %}
e46f13faade0:c6adf262679d:Nee2.4:**tinkerbell**

**tinkerbell** is the PSK of the network in question
{% endhint %}

We were successfully able to crack the handshake and retrieve the password to the lab network!


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://repo.4pfsec.com/wireless-penetration-testing/wifi-pineapple-tetra/cracking-wpa2-handshake.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
