2010-05-03 17:13:09 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/framework/
|
|
|
|
##
|
2009-09-12 15:40:33 +00:00
|
|
|
|
2010-05-03 17:13:09 +00:00
|
|
|
require 'msf/core'
|
2009-09-12 15:40:33 +00:00
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
|
|
|
|
|
|
|
include Msf::Exploit::DECT_COA
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2009-09-12 15:40:33 +00:00
|
|
|
def initialize
|
|
|
|
super(
|
|
|
|
'Name' => 'DECT Call Scanner',
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'Description' => 'This module scans for active DECT calls',
|
|
|
|
'Author' => [ 'DK <privilegedmode@gmail.com>' ],
|
|
|
|
'License' => MSF_LICENSE,
|
2011-10-16 09:53:53 +00:00
|
|
|
'References' => [ ['URL', 'http://www.dedected.org'] ]
|
2010-05-03 17:13:09 +00:00
|
|
|
)
|
2009-09-12 15:40:33 +00:00
|
|
|
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']}")
|
2010-05-03 17:13:09 +00:00
|
|
|
end
|
2009-09-12 15:40:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
=begin
|
|
|
|
def record_call(data)
|
|
|
|
print_status("Synchronizing..")
|
|
|
|
pp_scan_mode(data['rfpi_raw'])
|
|
|
|
while(true)
|
|
|
|
data = poll_coa()
|
|
|
|
puts data
|
2010-05-03 17:13:09 +00:00
|
|
|
end
|
2009-09-12 15:40:33 +00:00
|
|
|
end
|
|
|
|
=end
|
|
|
|
|
|
|
|
def run
|
|
|
|
@calls = {}
|
|
|
|
|
|
|
|
print_status("Opening interface: #{datastore['INTERFACE']}")
|
|
|
|
print_status("Using band: #{datastore['band']}")
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2009-09-12 15:40:33 +00:00
|
|
|
open_coa
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2009-09-12 15:40:33 +00:00
|
|
|
begin
|
|
|
|
|
|
|
|
print_status("Changing to call scan mode.")
|
|
|
|
call_scan_mode
|
|
|
|
print_status("Scanning...")
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
next_channel
|
|
|
|
|
2011-07-15 15:33:35 +00:00
|
|
|
vprint_status("Switching to channel: #{channel}")
|
2010-06-22 18:58:38 +00:00
|
|
|
select(nil,nil,nil,1)
|
2009-09-12 15:40:33 +00:00
|
|
|
end
|
|
|
|
ensure
|
|
|
|
print_status("Closing interface")
|
|
|
|
stop_coa()
|
|
|
|
close_coa()
|
|
|
|
end
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2009-09-12 15:40:33 +00:00
|
|
|
print_results
|
|
|
|
end
|
|
|
|
end
|