metasploit-framework/modules/auxiliary/scanner/sip/options.rb

44 lines
1.1 KiB
Ruby
Raw Normal View History

2014-07-18 00:17:31 +00:00
# encoding: UTF-8
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::Udp
2013-08-30 21:28:54 +00:00
include Msf::Auxiliary::Report
include Msf::Auxiliary::UDPScanner
include Msf::Exploit::Remote::SIP
2013-08-30 21:28:54 +00:00
def initialize
super(
'Name' => 'SIP Endpoint Scanner (UDP)',
'Description' => 'Scan for SIP devices using OPTIONS requests',
'Author' => 'hdm',
'License' => MSF_LICENSE
)
register_options(
[
OptInt.new('BATCHSIZE', [true, 'The number of hosts to probe in each set', 256]),
2014-07-18 00:17:31 +00:00
OptString.new('TO', [false, 'The destination username to probe at each host', 'nobody']),
Opt::RPORT(5060)
2013-08-30 21:28:54 +00:00
], self.class)
end
def scanner_prescan(batch)
print_status("Sending SIP UDP OPTIONS requests to #{batch[0]}->#{batch[-1]} (#{batch.length} hosts)")
@res = {}
2013-08-30 21:28:54 +00:00
end
def scan_host(ip)
scanner_send(create_probe(ip, 'UDP'), ip, datastore['RPORT'])
2013-08-30 21:28:54 +00:00
end
def scanner_process(data, shost, _)
parse_response(data, shost, 'UDP')
2014-07-18 00:17:31 +00:00
end
end