

# stack all the layers and add a RadioTap

# generate a random MAC address (built-in in scapy)ĭot11 = Dot11(type=0, subtype=8, addr1="ff:ff:ff:ff:ff:ff", addr2=sender_mac, addr3=sender_mac)Įssid = Dot11Elt(ID="SSID", info=ssid, len=len(ssid)) # interface to use to send beacon frames, must be in monitor mode Note: My USB WLAN stick is named wlan0 in my case, you should run ifconfig command and see your proper network interface name.Īlright, now you have everything set, let's start with a simple recipe first: from scapy.all import * (mac80211 station mode vif disabled for wlan0) (mac80211 monitor mode vif enabled for wlan0 on wlan0mon) Phy0 wlan0 ath9k_htc Atheros Communications, Inc. Enable monitor mode using airmon-ng command:.Note: aircrack-ng utility comes pre-installed with Kali Linux, so if you're on Kali, you shouldn't run this command. You need to make sure you're in a Unix-based system.It is highly suggested you follow along with Kali Linux environment, as it provides pre-installed utilities we gonna need in this tutorial.īefore we dive into the exciting code, you need to enable monitor mode in your network interface card: To make sure Scapy is installed properly, head to this tutorial or check the official scapy documentation for complete installation for all environments.
#FAKE HACKING PROGRAM FOR MAC INSTALL#
Necessary packages to install for this tutorial: pip3 install faker scapy In this tutorial, you will learn how can you send beacon frames into the air using Scapy library in Python to successfully forge fake access points! Ever wondered how does your laptop or mobile phone know which wireless networks are available nearby ? It is actually very simple, Wireless Access Points continually send beacon frames to all nearby wireless devices, these frames include informations about the access point, such as the SSID (name), type of encryption, MAC address, etc.
