How to Hack Wi-Fi: DoSing a Wireless AP Continuously

DoSing a Wireless AP Continuously

Welcome back, my nascent hackers!



Our Cyber War Scenario



How We'll Get the Job Done


Step 1: Put Your Wireless Adapter into Monitor Mode


kali > airmon-ng start wlan0

Step 2: Use Airdump-Ng to Get the Parameters


kali airodump-ng mon0


Step 3: Open a Text Editor & Write the Script




  • done closes the for loop.


Now, save the script as wirelessDoS.

Step 4: Change Permissions


kali > chmod 755 wirelessDoS

Step 5: Execute the Script

Finally, we execute the script by typing:

kali > ./wirelessDoS


Keep coming back, my nascent hackers, as we delve deeper into the world of hacking, cyber warfare, and cyber espionage!

Cover image via Shutterstock

Never Miss a Hacking or Security Guide

Get new Null Byte guides every week.


Just a quick question, did I get the randomized MAC-changing right?

You did get the macchanger part right, but just so you know, you randomized the MAC of wlan0, however, when you start up your wlan0 into monitor mode, mon0 will NOT have a randomized MAC.

we can use the victim's mac address so we are totally safe from being banned
and we can see it with airodump-ng, right?

@A#E You need to move the initialize with the random mac above the for loop, unless you want a new mac address every time you send the deauth packets. If this is the case you would just need to put this above the aireplay-ng command:

ifconfig mon0 down
macchanger -a mon0
ifconfig mon0 up

Depending on the chipset of your wifi adapter of course. If it doesn't create a mon0 interface just replace mon0 with wlan0, the airmon-ng start wlan0 wouldn't be necessary every time.

Greetings, If you need a reference I now have 2 MAC spoof scripts on github. One in bash the other in Python.

Also -A in macchanger makes real MAC Addresses Where is - r makes gibberish addresses that I would snipe off my network on sight.

(taken from my DirtyMAC script)

airmon-ng start $DEV >> /dev/null && airmon-ng start $DEV >> /dev/null && ip link set $DEV1 down && ip link set $DEV2 down && macchanger -A $DEV1 && macchanger -A $DEV2 && ip link set $DEV1 up && ip link set $DEV2 up


= 2 spoofed monitor interfaces waiting for love.

Also ifconfig wlan0 down is dead ip link set dev wlan0 down rules the world.

Hi CH, I was wondering if you would give me the link to your github repo with that code. I would really like to see it.

What's wrong with a new Mac every time you send an deauth ?

Yes, its right, but be careful about if the aireplay-ng will create a mon1 monitoring interface instead of mon0.
But most probably, this should work fine.

I want 2 monitors, not sure about you. That will create mon0 and mon1

Thanks for all your answers.

Wasn't sure whether I could change the MAC of mon0, since it is just a virtual interface and might have been bound to the MAC address of wlan0.

@Ezxploit, it is desired to change the MAC address each loop, since the purpose of doing so is to avoid that our deauth packages are blocked based on the MAC of former sent deauth packages.

This is slightly off-post. I just wanted to sign up to comment that this is an incredible site for learning. Not only are so many topics covered but they are explained clearly which in itself is hugely beneficial. I am currently studying for my postgraduate degree in Advanced Security & Digital Forensics in Edinburgh, Scotland and have picked up many things which have been of help to this and other 'interesting' things in general. A big thanks to all those involved in running the site. You should be proud of it.

instead of giving a loop to aireplay ...can't we increase the no of death packets infinitely?? it will make a difference ??

You could just send deauth packets continuously, but that would increase the probably that they would block you. By giving them 60 seconds to reconnect, it will be more confusing for the enemy.

Can you post the script the includes the mac spoofing?

this will kick off everyone connect to the AP but not the hosts connected with Ethernet cable?

Chris, i have tried yesterday his guide "Performing a Denial of Service (DoS) Attack on a Wireless Access Point" on my router and i was able to surf normally through an Ethernet cable.

After executing the final script ./wirelessDo I'm getting the error of an invalid MAC address.
I've tried changing the bssid in the script and substituting the '-a' prefix with the '-b'.
Any help?

Please show us a screenshot.

here is the screen.
Hope it helps

You didn't show me the script.


Read Step #2.

You need to use the BSSID of the AP. You used the client.

I can't frankly see any difference with what has been done in step #2, the BSSID of the AP has been used in both cases

You are right. My bad. I was reading your screenshot incorrectly.

Anyway, I've managed to achieve the same result by writing the same info directly into the terminal.

You got it to work? Must have been a typo in your script.

The syntax has stayed the same, I simply have input everything in the terminal, and not through the execution of the script

Then, obviously, there was a typo in your script.

Hey, I am getting the same invalid MAC address error. I've checked my code, and i don't see any typos, and I am, like, 99.9% sure I am using a valid bssid.. here is a screen of what I'm doing.


Maybe because mon0 is an invalid interface and the script should be corrected to reflect the new standards me thinks

Thats a very awesome there any android app that should do the same trick?

Someone help me, I'm very new to hacking stuffs and still learning. For some reason it says "No such BSSID available" - I'm using Kali Linux as OS and I have no idea if a text pad or something is available here. So I typed the aireplay-ng manually in a single line. Someone help please?

Open a text editor. In this tutorial, I used Leafpad. Enter the commands in Leafpad and save.

Yo Master, shouldnt it be "--deauth"? Your script says -deauth with one "-" missing. I got the Invalid Mac address error but after i added the second - to the script, it worked.

Yes, I'm changing it now.

Can you please update the script so it will spoof my MAC as well? thank you

Also the original script does not work - /bin/bash^M: bad interpreter: No such file or directory

used dos2unix command then the script works, edited it but it keeps sendig deauth and not stopping after 60 seconds : (

Boot Kali off a USB and try it.

Share Your Thoughts

  • Hot
  • Latest