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

43 lines
1.0 KiB
Ruby
Raw Normal View History

##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
2016-03-08 13:02:44 +00:00
class MetasploitModule < Msf::Auxiliary
2013-08-30 21:28:54 +00:00
include Msf::Exploit::Remote::Tcp
include Msf::Auxiliary::Report
include Msf::Auxiliary::Scanner
include Msf::Exploit::Remote::SIP
2013-08-30 21:28:54 +00:00
def initialize
super(
'Name' => 'SIP Endpoint Scanner (TCP)',
'Description' => 'Scan for SIP devices using OPTIONS requests',
'Author' => 'hdm',
'License' => MSF_LICENSE
)
register_options(
[
2014-07-18 00:17:31 +00:00
OptString.new('TO', [false, 'The destination username to probe at each host', 'nobody']),
2013-08-30 21:28:54 +00:00
Opt::RPORT(5060)
], self.class)
end
# Operate on a single system at a time
def run_host(ip)
begin
connect
sock.put(create_probe(ip, 'tcp'))
res = sock.get_once(-1, 5)
report_response(res, rhost, 'tcp') if res
rescue ::Interrupt
raise $ERROR_INFO
ensure
disconnect
end
2013-08-30 21:28:54 +00:00
end
end