Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/auxiliary/scanner/llmnr/query.rb
Views: 11783
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Auxiliary::Report7include Msf::Auxiliary::UDPScanner8include Msf::Auxiliary::LLMNR910def initialize(info = {})11super(12update_info(13info,14'Name' => 'LLMNR Query',15'Description' => %q(16This module sends LLMNR queries, which are really just normal UDP DNS17queries done (usually) over multicast on a different port, 5355.18Targets other than the default RHOSTS' 224.0.0.252 should not respond19but may anyway.20),21'Author' =>22[23'Jon Hart <jon_hart[at]rapid7.com>'24],25'License' => MSF_LICENSE26)27)28end2930def scanner_prescan(batch)31print_status("Sending LLMNR #{query_type_name}/#{query_class_name} queries for #{query_name} to #{batch[0]}->#{batch[-1]} port #{rport} (#{batch.length} hosts)")32@results = {}33end3435def scanner_postscan(_batch)36found = {}37@results.each_pair do |peer, resps|38resps.each do |resp|39found[peer] ||= {}40next if found[peer][resp]41response_info = describe_response(resp)42print_good("#{peer} responded with #{response_info}")43report_service(host: peer, port: rport, proto: "udp", name: "llmnr", info: response_info)44found[peer][resp] = true45end46end47end48end495051