metasploit-framework/modules/auxiliary/scanner/dect/call_scanner.rb

78 lines
1.7 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'
class Metasploit3 < Msf::Auxiliary
2013-08-30 21:28:54 +00:00
include Msf::Exploit::DECT_COA
def initialize
super(
'Name' => 'DECT Call Scanner',
'Description' => 'This module scans for active DECT calls',
'Author' => [ 'DK <privilegedmode[at]gmail.com>' ],
'License' => MSF_LICENSE,
'References' => [ ['URL', 'http://www.dedected.org'] ]
)
end
def print_results
print_line("Time\t\t\t\tRFPI\t\tChannel")
@calls.each do |rfpi, data|
print_line("#{data['time']}\t#{data['rfpi']}\t#{data['channel']}")
end
end
=begin
2013-08-30 21:28:54 +00:00
def record_call(data)
print_status("Synchronizing..")
pp_scan_mode(data['rfpi_raw'])
while(true)
data = poll_coa()
puts data
end
end
=end
2013-08-30 21:28:54 +00:00
def run
@calls = {}
2013-08-30 21:28:54 +00:00
print_status("Opening interface: #{datastore['INTERFACE']}")
print_status("Using band: #{datastore['BAND']}")
2013-08-30 21:28:54 +00:00
open_coa
2013-08-30 21:28:54 +00:00
begin
2013-08-30 21:28:54 +00:00
print_status("Changing to call scan mode.")
call_scan_mode
print_status("Scanning...")
2013-08-30 21:28:54 +00:00
while (true)
data = poll_coa()
if (data)
parsed_data = parse_call(data)
parsed_data['time'] = Time.now
print_status("Found active call on: #{parsed_data['rfpi']}")
@calls[parsed_data['time']] = parsed_data
end
2013-08-30 21:28:54 +00:00
next_channel
2013-08-30 21:28:54 +00:00
vprint_status("Switching to channel: #{channel}")
select(nil,nil,nil,1)
end
ensure
print_status("Closing interface")
stop_coa()
close_coa()
end
2013-08-30 21:28:54 +00:00
print_results
end
end