How I hacked My Neighbor's Wi-Fi 📶
Tags: hacking, linux, tutorial, challenge
Published: 2022-03-08 05:38:33

Before getting started if you want to see the video about it
Check it out here 👇🏻

https://youtu.be/ENhi1gd-W1c
![Subscribe](https://media2.giphy.com/media/5WFdHQA7k86ul7MGDz/giphy.gif?cid=ecf05e47s4ikl6diqch2f0ehj6zlg85j3xnnl1m21bmsio5j&rid=giphy.gif&ct=g)

## Getting Started 

Is there anyone who doesn't like hacking ? If so, this article is not for you. I hope nobody doesn't like it, We all want to hack someone's WiFi at least once in our life just to have fun with them. That's how it started for me. Whenever I see a encrypted WiFi in my mobile I wish that I could hack it. It turned out if the WiFi's password isn't pretty strong then you can hack them at ease.

## How does WiFi works ?

Without any prior knowledge about something, We couldn't hack anything. The same applies here, So first lets know how it works.Without going in depth about it. Let me put it in simple words.

![gif](https://media1.giphy.com/media/xT9Igznmre6tnKH1Bu/giphy.gif?cid=ecf05e47obceemo998rbc40t4xedczj0syb4usw26ayfikqj&rid=giphy.gif&ct=g)
  
Basically two things are there that you need to know :
1. Access Point
2. Client

As the name suggest access point is a device which allows other Wi-Fi devices to connect to wired network. For example your home router or lets say your friend's mobile hotspot. On other hand Clients are the Wi-Fi devices which connects to the access point.

An encrypted way of communication takes place between these two devices which is known to be [4-way handshake](https://www.youtube.com/watch?v=9M8kVYFhMDw).
So when each time client connects to the access point it initially shares the passwords in an encrypted form.

Lets say your password is 12345678 the client will encrypt this into something like this 8B53D81E2E43080D5F62896068D6D325 and then send this to the access point which then decrypts it and check whether its a match or not and then accordingly. So this is how the connection the takes place.

### The Flaw :
Since the client sends the password each time to the access point to connects. We can intervene the process and capture encrypted password.

## Procedure:

-> First we look for a access point which already has connected client. 
-> Then we send disrupt the connection between the both devices so that the client gets disconnected.
-> As usual a normal device tends to reconnect to access point again. This time we stop the disruption allowing the client to connect and capture the handshake which is passed.
->Still we don't have the password. We only have the hashfile (encrypted file) of the password
-> Lets see how we can decrypt the encrypted file. 

![decryptgif](https://media1.giphy.com/media/KunyTnoHMYOgwB5wrc/giphy.gif?cid=ecf05e47fe6dni31m9z8qb7bv151xef9k81ts5e90bz1tmrv&rid=giphy.gif&ct=g)

## Rockyou.txt

To decrypt the file we could basically do bruteforcing which in terms trying every possible combination until the file gets decrypted.But this time taking process 
![img](https://media4.giphy.com/media/RDZo7znAdn2u7sAcWH/giphy.gif?cid=ecf05e47rl1v1wt34bwlgvpr44wf3wi8c0df64b3xe3z10yh&rid=giphy.gif&ct=g)
Instead we could use dictionary attack where we have list of common password in a text file and we try to break the hash file by trying each password. 

One of the most famous wordlist is RockYou.txt , In 2009 a company named rockyou got breached because of not well encrypted database and millions of user data has been released. Rockyou.txt consist of more than millions of common password with the help of it we can try to crack it.

This process depends on your CPU performance the more speed it can achieve with more power.

Because of my neighbour's common WiFi Password (thejoker666) I am able to crack it in less than 2 mins and that's how i hacked my neighbour's Wi-Fi.

So avoid using common password or week password. Make sure to use a strong and unique password 

![Time Taken to bruteforce](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/htfeu37jxgcevddze3f4.png)

### Disclaimer 
I did this for educational purpose to show how easy it is to hack if you don't have a strong password and the concern person also knows about this hack.

![disclaimer](https://media2.giphy.com/media/XVjKEKIhIgi3RNLDg9/giphy.gif?cid=ecf05e47hkdjvzftq07sl8u6d9d4edm6dutj8jfcv9o97cnk&rid=giphy.gif&ct=s)