DoS on a Wifi Router — Wifi Hacking #1

Harsh Master
InfoSec Write-ups
Published in
5 min readSep 30, 2022

--

This is the first article of the Wifi Hacking Series. In this article, we will discuss how to perform a DoS (Denial of Service) attack which will prevent the users from connecting to a Wifi Network using the built-in tool of Kali Linux ~ Aircrack. But…But…But, guess the best part !!!

The best part of this complete process is…… we aren’t even connected to the wireless network and…and…and moreover we don’t even have to know the password of the wireless network. Now, this might fascinate you and catch your attention, so without further ado, Let’s get started !!!

Once you’ll learn it, you’ll love it

Photo by Jadon Kelly on Unsplash

WiFi hacking is a great way to test security measures and identify vulnerabilities in networks. In this post, we will cover the full process of deauthenticating users by first scanning the network for available access points and then utilizing the great power of aircrack-ng to carry out the attack.

Disclaimer: This article is only for educational and fun purposes, this must not be referred with ill-intent !!!

Pre-Requisites

You’ll need:

  • Kali Machine pre-installed
  • A wireless USB Wifi Adapter that supports monitor mode. If you don’t have one, you can use the following USB adapter:

If you want to bring down Wireless networks that use 5GHz then you will need to get an adapter that supports 5GHz

  • Update Kali Linux using the following command
sudo apt update && sudo apt upgrade
  • And at last the most important thing, your enthusiasm to learn this.

Once the prerequisites are in place, read further.

What exactly will we do?

To keep it short and simple, Firstly, we will scan the nearby available wifi networks and gather its BSSID and other information like channel and security type.

Then we will start sending packets to the wireless access point that will deauthenticate all the users (or particular) from it.

And that’s it, now let’s get into the complete process.

Step by Step Process

  1. To begin, we start off by launching Kali Linux.

Now if you are using Kali Linux in a Virtual Machine then make sure the wireless USB wifi adapter is connected to the machine, if not do the following:

Open Player -> Select removable devices -> Select the external Wifi card -> Connect to Host

2. Now, head on to the terminal and split it into three for ease by right-clicking and selecting “Split Vertically”

3. Find the name of your wireless adapter (wlan0 in most cases)

ifconfig

Note down your interface’s name (in my case wlan0)

4. The next step is to put your adapter into Monitor Mode ~ Type the following command.

airmon-ng start <interface name>

Check if your wireless adapter is into monitor mode

iwconfig

5. Now scan the nearby networks to get their BSSID and broadcasted channel

airodump-ng -i <interface name>

6. Now copy the BSSID of the target router (Ctrl+Shift+C), after Killing the scanning process (Ctrl+C).

Also, note down the Channel on which the target router is broadcasting.

7. Now type in the following command to start sending deauthentication packets

aireplay-ng -0 <number of packets> -a <bssid of target network> -c <target client> <interface name>

Here,

<number of packets> — Enter the number of packets to send or ‘0’ to send them continuously

More the number, more the pleasure

<bssid of target network> — Paste the BSSID of the router you just copied

<target client> (optional) — Enter the MAC address of the specific user you wish to disconnect, skip to deauthenticate all connected clients

<interface name> — Name of your adapter

Now you might get this error, if not, you are lucky enough…😶

This means that the target network is broadcasting on channel 1 (in my case) but the interface is on channel 3.

8. So now you’ll need to configure the channel.

Stop the scanning of networks using Ctrl+C.

Type the following command:

airodump-ng -c <broadcasting channel of router> -i  <interface name>

Here,

<broadcasting channel of router> — The channel on which the router is broadcasting (in my case 1).

<interface name> — Name of your adapter

Now again type the command to unauthenticated:

aireplay-ng -0 <number of packets> -a <bssid of target network> -c <target client> <interface name>

Now the authentication packets are being sent to the access point and all the users connected to it will be disconnected.

That’s it, the attack started now no user will be able to connect to the router until the packets reach the specified limit (in this case 1000) or until you stop sending them (Ctrl+C or Ctrl+Z)😉.

This was the first article in the Wifi Hacking Series, follow and subscribe to get updates whenever I post an article…!!!

From Infosec Writeups: A lot is coming up in the Infosec every day that it’s hard to keep up with. Join our weekly newsletter to get all the latest Infosec trends in the form of 5 articles, 4 Threads, 3 videos, 2 GitHub Repos and tools, and 1 job alert for FREE!

--

--

A first-year data science student at IIT Madras who is enthusiastic about the latest technology. A Python and Android Developer, Video Editor & Ethical Hacker.