{"id":133,"date":"2023-07-11T16:16:13","date_gmt":"2023-07-11T16:16:13","guid":{"rendered":"https:\/\/madlabs.dsu.edu\/digforce\/blog\/?p=133"},"modified":"2024-10-15T15:04:54","modified_gmt":"2024-10-15T15:04:54","slug":"penetrating-networks-by-cracking-wpa2","status":"publish","type":"post","link":"https:\/\/blogs.dsu.edu\/digforce\/2023\/07\/11\/penetrating-networks-by-cracking-wpa2\/","title":{"rendered":"Penetrating Networks by Cracking WPA 2"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Wi-Fi Security<\/h1>\n\n\n\n<p>Wi-Fi is a family of networking protocols that enable wireless communication and networking for devices. As a result of its popularity, wireless networks have become an indispensable technology in our modern world. As popular as Wi-Fi is, these networks must be properly secured, as it&#8217;s much harder to determine how far away a wireless network can be detected and who may interact with it. &nbsp;<\/p>\n\n\n\n<p>The owners of the Wi-Fi trademark, Wi-Fi Alliance, are the ones who certify the available wireless security protocols:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Wired Equivalent Privacy (WEP)&nbsp;<\/li>\n\n\n\n<li>Wi-Fi Protected Access (WPA)&nbsp;<\/li>\n\n\n\n<li>Wi-Fi Protected Access 2 (WPA 2)&nbsp;<\/li>\n\n\n\n<li>Wi-Fi Protected Access 3 (WPA 3)&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>Today, WEP and WPA have been considered deprecated due to numerous flaws in their security, and it&#8217;s recommended to upgrade or replace hardware utilizing these older protocols. Most networks today use WPA 2, with slow adoption to the newer WPA 3 standard.&nbsp;&nbsp;<\/p>\n\n\n\n<p>With WPA 2 being the commodity protocol for securing wireless networks for so long, there are many ways to attack WPA 2 networks, one being an attack on the authentication process itself.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WPA 2<\/h2>\n\n\n\n<p>Before discussing how to attack WPA 2 authentication, this protocol must first be briefly understood. WPA 2 was developed by Wi-Fi Alliance in 2004 as a more robust replacement for WEP and WPA networks. Unlike WEP and WPA, WPA 2 utilizes AES encryption, and the encryption can easily be broken if the network&#8217;s password is weak.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Although WPA 2 is stronger in encryption than its preceding WPA, the authentication process is still the same, using what&#8217;s called a four-way handshake.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Four-way handshake<\/h2>\n\n\n\n<p>At a high level, an access point (authenticator) and a client device (supplicant) exchange four different messages containing various keys and random numbers to generate encryption keys to secure communication. This is known as the four-way handshake.&nbsp;<\/p>\n\n\n\n<p>The authenticator device, usually an access point, knows the network password, referred to as a Pre-Shared Key (PSK). When a supplicant device, or a client, wants to connect to the network using the password, they do not forward the password over the network but rather invoke different methods of cryptography to verify the client knows the password. If the hash forwarded by the supplicant matches what the authenticator expects, it has been proven the supplicant knows the PSK.&nbsp;<\/p>\n\n\n\n<p>From the nature of wireless networks, this handshake is broadcast for any device to listen to. If an attacker can capture the entire handshake process, they now have access to all of the components to generate a hash, and all they need is the PSK. An attacker can then turn around and brute force various passwords to generate different hashes, and if they find one that matches what they&#8217;ve captured, they can now gain access to the network.&nbsp;<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Penetration Testing Wi-Fi\/WPA2<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Legalities<\/h2>\n\n\n\n<p><strong>The following demonstration is only intended for educational use. Before continuing with the example, it must be emphasized that this is a form of cyber attack, and engaging in these actions upon a network with which you do not have authorization to manipulate is illegal. If you were to follow along, only proceed with full certainty the network and devices are yours. <\/strong>&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Materials<\/h2>\n\n\n\n<p>To perform an attack on the handshake process, there are a few tools required:&nbsp;&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>USB antenna with installed drivers&nbsp;<\/li>\n\n\n\n<li>Preferably Kali Linux (although I am using Ubuntu)&nbsp;<\/li>\n\n\n\n<li>Wireshark&nbsp;<\/li>\n\n\n\n<li>Airmon-ng&nbsp;<\/li>\n\n\n\n<li>A victim internet device&nbsp;<\/li>\n\n\n\n<li>Wireless access point&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>To discover the victim network, we must first set up the antenna. For demo purposes, I am using an Alfa AWUS036ACS using aircrack-ng&#8217;s <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/aircrack-ng\/rtl8812au\" target=\"_blank\">open-source drivers<\/a>. The installation guide I used to install can be found <a rel=\"noreferrer noopener\" href=\"https:\/\/avabodha.in\/install-driver-for-alfa-awus036acs-on-linux\/\" target=\"_blank\">here<\/a>.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Monitor mode<\/h2>\n\n\n\n<p>After verifying the antenna is working as expected, we need to place the antenna into monitor mode. By default, most network devices are set to managed mode, where it will only process traffic specified to it. <\/p>\n\n\n\n<p>By setting the device into monitor mode, the network device will process all traffic in its proximity on all supported channels. We can use the following commands to kill all processes using the network device and set it to monitor mode:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo airmon-ng check kill\nsudo airmon-ng start &lt;wireless-interface&gt;<\/code><\/pre>\n\n\n\n<p>&nbsp;In my case: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo airmon-ng start wlx00c0caaab527<\/code><\/pre>\n\n\n\n<p>If following along, replace the interface with your system&#8217;s wireless interface. Do note if a device&#8217;s primary network adapter is set to monitor mode, all internet connections will cease until set back to managed mode. This is why I am using an external antenna.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"229\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/1.-kill-processes-start-monitor-mode.png\" alt=\"Using airmon-ng to kill conflicting processes and to start monitor mode\" class=\"wp-image-134\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/1.-kill-processes-start-monitor-mode.png 671w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/1.-kill-processes-start-monitor-mode-300x102.png 300w\" sizes=\"(max-width: 671px) 100vw, 671px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"206\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/2.-verify-monitor-mode.png\" alt=\"Verifying monitor mode on the interface\" class=\"wp-image-135\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/2.-verify-monitor-mode.png 628w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/2.-verify-monitor-mode-300x98.png 300w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Discovering target network information (BSSID and channel)<\/strong>&nbsp;<\/h2>\n\n\n\n<p>With the network device set to monitor mode, use the following command to display all traffic showing in our proximity and locate the target network:&nbsp;&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo airodump-ng &lt;wireless-interface&gt;<\/code><\/pre>\n\n\n\n<p>In my case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo airodump-ng wlx00c0caaab527<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"267\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/3.-scan-networks-around.png\" alt=\"Using airodump-ng to scan networks in proximity\" class=\"wp-image-136\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/3.-scan-networks-around.png 646w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/3.-scan-networks-around-300x124.png 300w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"638\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/locate-target-network-blurred.png\" alt=\"Airodump-ng output, finding target network's ESSID\" class=\"wp-image-150\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/locate-target-network-blurred.png 924w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/locate-target-network-blurred-300x207.png 300w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/locate-target-network-blurred-768x530.png 768w\" sizes=\"(max-width: 924px) 100vw, 924px\" \/><\/figure><\/div>\n\n\n<p>When the target network&#8217;s broadcasted name, or ESSID, is discovered, hit the spacebar to pause the output, and take note of the network&#8217;s MAC address, or BSSID, and channel (CH). In this case, our network is on channel 6 with the BSSID 94:83:C4:30:FD:E0. Use <strong>ctrl+C<\/strong> to kill the process. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Targeting the victim network<\/h2>\n\n\n\n<p>To specifically listen to this network, use the following command:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo airodump-ng -w &lt;filename&gt; -c &lt;channel-number&gt; --bssid &lt;bssid&gt; &lt;interface&gt;<\/code><\/pre>\n\n\n\n<p>In my case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo airodump-ng -w capture -c 6 --bssid 94:83:C4:30:FD:E0 wlx00c0caaab527<\/code><\/pre>\n\n\n\n<p>Here, the <strong>-w<\/strong> flag writes the traffic to a file where you can specify the filename, the <strong>-c<\/strong> and <strong>&#8211;bssid<\/strong> flags are used to specify the channel and BSSID previously captured, and the final argument is the network interface in use.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"986\" height=\"132\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/5.-focus-on-target-network-save-to-cap-file.png\" alt=\"Focus on target network's BSSID and channel, save to Wireshark .cap file\" class=\"wp-image-138\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/5.-focus-on-target-network-save-to-cap-file.png 986w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/5.-focus-on-target-network-save-to-cap-file-300x40.png 300w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/5.-focus-on-target-network-save-to-cap-file-768x103.png 768w\" sizes=\"(max-width: 986px) 100vw, 986px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"939\" height=\"633\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/6.-focus-on-target-network.png\" alt=\"Airodump focused output\" class=\"wp-image-139\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/6.-focus-on-target-network.png 939w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/6.-focus-on-target-network-300x202.png 300w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/6.-focus-on-target-network-768x518.png 768w\" sizes=\"(max-width: 939px) 100vw, 939px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Penetration testing the victim network<\/strong>&nbsp;<\/h2>\n\n\n\n<p>At this stage, we can either wait for a client device to join the wireless network, or we can be more aggressive. The latter is more fun and loud (more likely to be noticed or detected), so let&#8217;s do that instead! &nbsp;<\/p>\n\n\n\n<p>Keeping the previous command active, we can open a second terminal window to perform what&#8217;s known as a deauthentication attack. Before executing this attack, it&#8217;s nice to understand how it works.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is a deauthentication attack?<\/strong><\/h2>\n\n\n\n<p>Our mobile devices, such as our laptops and phones, are not very mobile from a wireless connectivity standpoint. If we have a device in one room next to a particular access point, or AP, and moved that connected device into another room with a different AP, our mobile device will tunnel vision and continue attempting to connect to its source regardless that a stronger connection exists.&nbsp;<\/p>\n\n\n\n<p>Often, networks with multiple APs can measure the connection strength of client devices to each AP in the network. From this, the network can decide if there&#8217;s a different AP a client can connect to for the best connectivity. If this is the case, the network will send a deauthentication frame, which boots the client device from the network, forcing it to reconnect and look around for a new connection. The client will then discover the AP closest to it and reestablish a connection with the strongest link.&nbsp;&nbsp;<\/p>\n\n\n\n<p>The problem here is, deauthentication frames do not have any signing. Meaning, any device in the network can send one. Sending a stream, or multiple deauthentication frames is known as a deauthentication attack. This extremely loud attack can knock out an entire network, but we will use it for something else. In terms of attacking the WPA2 handshake, we are sending a deauthentication frame to the router to briefly restart and force the handshake process with the clients again.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Deauthentication attack<\/strong>&nbsp;<\/h2>\n\n\n\n<p>In the second terminal window, we can execute a deauthentication attack to the router by typing:&nbsp;&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo aireplay-ng --deauth 0 -a &lt;bssid&gt; &lt;wireless-interface&gt;<\/code><\/pre>\n\n\n\n<p>In my case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo aireplay-ng --deauth 0 -a 94:83:C4:30:FD:E0 wlx00c0caaab527<\/code><\/pre>\n\n\n\n<p>The key argument in this command is<strong><em> <\/em>&#8212;deauth 0<\/strong>. The <strong>0<\/strong> flag in the <strong>&#8211;deauth<\/strong> argument indicates there is no limit to how many frames are sent, which creates a deauthentication attack. We also need to specify what the victim BSSID is, in our case the router, and the interface used to send the frames.&nbsp;&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"392\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/7.-deauth-attack.png\" alt=\"Terminal window 2 deauthentication attack\" class=\"wp-image-140\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/7.-deauth-attack.png 795w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/7.-deauth-attack-300x148.png 300w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/7.-deauth-attack-768x379.png 768w\" sizes=\"(max-width: 795px) 100vw, 795px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Capturing the handshake<\/strong>&nbsp;<\/h2>\n\n\n\n<p>This may take some time, but eventually, a victim device (D2:7E:D2:DE:E2:8F) will connect and handshake with the victim router. In the first terminal window, airodump-ng has indicated it has successfully captured the handshake, and a &#8220;WPA handshake: &lt;BSSID&gt;&#8221; message will appear.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"994\" height=\"318\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/8.-capture-handshake.png\" alt=\"Terminal 1 capturing the handshake\" class=\"wp-image-141\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/8.-capture-handshake.png 994w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/8.-capture-handshake-300x96.png 300w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/8.-capture-handshake-768x246.png 768w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Cracking the handshake<\/strong><\/h2>\n\n\n\n<p>After receiving the success message, use <strong>ctrl+C<\/strong> on both terminal windows to stop all processes. Next, search for the filename specified in previous steps, in our case, &#8220;capture,&#8221; and locate the .cap file.&nbsp;&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"994\" height=\"318\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/9.-find-capture-file.png\" alt=\"Locating Wireshark .cap file\" class=\"wp-image-142\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/9.-find-capture-file.png 994w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/9.-find-capture-file-300x96.png 300w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/9.-find-capture-file-768x246.png 768w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/figure><\/div>\n\n\n<p>Use the following command to open the capture file in Wireshark:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wireshark &lt;filename&gt;.cap<\/code><\/pre>\n\n\n\n<p>In my case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wireshark capture-01.cap<\/code><\/pre>\n\n\n\n<p>Once opened, search for &#8220;eapol&#8221; to filter the packets in the four-way handshake. Notice there are at least four packets!&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"528\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/10.-open-in-wireshark-find-handshake-packets-1024x528.png\" alt=\"Finding four-way handshake packets in Wireshark\" class=\"wp-image-143\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/10.-open-in-wireshark-find-handshake-packets-1024x528.png 1024w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/10.-open-in-wireshark-find-handshake-packets-300x155.png 300w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/10.-open-in-wireshark-find-handshake-packets-768x396.png 768w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/10.-open-in-wireshark-find-handshake-packets.png 1452w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>After verifying these packets are present, close Wireshark and set the network device back into monitor mode:&nbsp;&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo airmon-ng stop &lt;wireless-interface&gt;<\/code><\/pre>\n\n\n\n<p>In my case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo airmon-ng stop wlx00c0caaab527<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"989\" height=\"164\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/11.-stop-monitor-mode.png\" alt=\"Stop interface monitor mode\" class=\"wp-image-144\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/11.-stop-monitor-mode.png 989w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/11.-stop-monitor-mode-300x50.png 300w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/11.-stop-monitor-mode-768x127.png 768w\" sizes=\"(max-width: 989px) 100vw, 989px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"217\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/12.-verify-monitor-mode-stopped.png\" alt=\"Verify interface is in managed mode\" class=\"wp-image-145\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/12.-verify-monitor-mode-stopped.png 614w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/12.-verify-monitor-mode-stopped-300x106.png 300w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/figure><\/div>\n\n\n<p>Now, let&#8217;s crack some passwords! To specify the captured file and the wordlist you want to use, use the following command:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>aircrack-ng &lt;filename&gt;.cap -w &lt;wordlist-path&gt;<\/code><\/pre>\n\n\n\n<p>In my case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>aircrack-ng capture-01.cap -w ~\/Downloads\/rockyou.txt<\/code><\/pre>\n\n\n\n<p>Rockyou.txt is a great resource with millions of passwords found throughout various breaches. If you are using Kali Linux, rockyou.txt is pre-installed in <strong>\/usr\/share\/wordlists\/rockyou.txt<\/strong>, but since I am on Ubuntu, I had to download mine from the internet, so change the path accordingly.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"107\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/13.-crack-wifi-password.png\" alt=\"Using aircrack-ng to crack handshake in .cap file\" class=\"wp-image-146\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/13.-crack-wifi-password.png 621w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/13.-crack-wifi-password-300x52.png 300w\" sizes=\"(max-width: 621px) 100vw, 621px\" \/><\/figure><\/div>\n\n\n<p>If a victim network&#8217;s password exists in the wordlist, profit!<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"666\" height=\"534\" src=\"https:\/\/blogs.dsu.edu\/digforce\/wp-content\/uploads\/sites\/6\/2023\/07\/14.-profit.png\" alt=\"Profit!\" class=\"wp-image-147\" srcset=\"https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/14.-profit.png 666w, https:\/\/blogs.dsu.edu\/wp-content\/uploads\/sites\/6\/2023\/07\/14.-profit-300x241.png 300w\" sizes=\"(max-width: 666px) 100vw, 666px\" \/><\/figure><\/div>\n\n\n<h1 class=\"wp-block-heading\">Protecting Yourself<\/h1>\n\n\n\n<p>This attack, although powerful, has many disadvantages due to the prerequisites for a successful attack, making it impractical.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An attacker needs to be physically near the victim&#8217;s device, which presents a high risk of being caught.&nbsp;&nbsp;<\/li>\n\n\n\n<li>This attack is very involved and hands-on, which isn&#8217;t very time efficient.&nbsp;&nbsp;<\/li>\n\n\n\n<li>It can require an extremely loud and traceable deauthentication attack.&nbsp;<\/li>\n\n\n\n<li>This attack isn&#8217;t guaranteed to work successfully.&nbsp;&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>Although unlikely, it&#8217;s still recommended to adopt stronger security practices.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stronger passwords<\/h2>\n\n\n\n<p>Strengthening the network&#8217;s password using random characters, words, and phrases, and increasing length can significantly decrease the likelihood that it appears in a wordlist like rockyou.txt. Remember, this attack is pivoted upon the assumption the unknown password is in a wordlist on top of the risks previously mentioned. However, regardless of the likelihood of this particular attack, it is always best practice to enforce strong network passwords.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WPA 3<\/h2>\n\n\n\n<p>If possible, also consider upgrading the entire network to WPA3. Because of WPA2&#8217;s age, there are many tested and working exploits that enable unauthorized network access that are mitigated with an updated security protocol. Based on the devices used, upgrading to WPA3 could require hardware replacements or is as simple as navigating to the device&#8217;s settings and enforcing WPA3 encryption only.&nbsp;<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Resources<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.avast.com\/c-wep-vs-wpa-or-wpa2#:~:text=Wireless%20networks%20are%20often%20less,WEP%2C%20WPA%2C%20and%20WPA2\" target=\"_blank\">https:\/\/www.avast.com\/c-wep-vs-wpa-or-wpa2#:~:text=Wireless%20networks%20are%20often%20less,WEP%2C%20WPA%2C%20and%20WPA2<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.wifi-professionals.com\/2019\/01\/4-way-handshake\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.wifi-professionals.com\/2019\/01\/4-way-handshake<\/a>&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/avabodha.in\/install-driver-for-alfa-awus036acs-on-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/avabodha.in\/install-driver-for-alfa-awus036acs-on-linux\/<\/a>&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/aircrack-ng\/rtl8812au\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/aircrack-ng\/rtl8812au<\/a>&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=WfYxrLaqlN8\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.youtube.com\/watch?v=WfYxrLaqlN8<\/a>&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/techcrunch.com\/2017\/10\/16\/heres-what-you-can-do-to-protect-yourself-from-the-krack-wifi-vulnerability\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/techcrunch.com\/2017\/10\/16\/heres-what-you-can-do-to-protect-yourself-from-the-krack-wifi-vulnerability\/<\/a>&nbsp;<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Wi-Fi Security Wi-Fi is a family of networking protocols that enable wireless communication and networking for devices. As a result of its popularity, wireless networks&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/blogs.dsu.edu\/digforce\/2023\/07\/11\/penetrating-networks-by-cracking-wpa2\/\">Continue reading<span class=\"screen-reader-text\">Penetrating Networks by Cracking WPA 2<\/span><\/a><\/div>\n","protected":false},"author":24,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"ppma_author":[54],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-penetration-testing","entry"],"authors":[{"term_id":54,"user_id":24,"is_guest":0,"slug":"hwade","display_name":"Hunter Wade","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/dac5b64ec64c0278e13d2c4f33a2d91a?s=96&d=mm&r=g","author_category":"","first_name":"Hunter","last_name":"Wade","user_url":"","job_title":"","description":""}],"_links":{"self":[{"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/posts\/133"}],"collection":[{"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":6,"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/posts\/133\/revisions\/159"}],"wp:attachment":[{"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/tags?post=133"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.dsu.edu\/digforce\/wp-json\/wp\/v2\/ppma_author?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}