Land #9481, Update native DNS spoofer for Dnsruby

4.x
Brent Cook 2018-02-01 00:10:32 -06:00 committed by Jeffrey Martin
parent ec12d61702
commit ce3d5d77e4
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
1 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ class MetasploitModule < Msf::Auxiliary
peer = "#{cli.ip_daddr}:" << (cli.is_udp? ? "#{cli.udp_dst}" : "#{cli.tcp_dst}") peer = "#{cli.ip_daddr}:" << (cli.is_udp? ? "#{cli.udp_dst}" : "#{cli.tcp_dst}")
# Deal with non DNS traffic # Deal with non DNS traffic
begin begin
req = Packet.encode_net(data) req = Packet.encode_drb(data)
rescue => e rescue => e
print_error("Could not decode payload segment of packet from #{peer}, check log") print_error("Could not decode payload segment of packet from #{peer}, check log")
dlog e.backtrace dlog e.backtrace
@ -109,7 +109,7 @@ class MetasploitModule < Msf::Auxiliary
answered = [] answered = []
# Find cached items, remove request from forwarded packet # Find cached items, remove request from forwarded packet
req.question.each do |ques| req.question.each do |ques|
cached = service.cache.find(ques.qName, ques.qType.to_s) cached = service.cache.find(ques.qname, ques.qtype.to_s)
if cached.empty? if cached.empty?
next next
else else
@ -154,7 +154,7 @@ class MetasploitModule < Msf::Auxiliary
def sent_info(cli,data) def sent_info(cli,data)
net = Packet.encode_net(data) net = Packet.encode_net(data)
peer = "#{cli.ip_daddr}:" << (cli.is_udp? ? "#{cli.udp_dst}" : "#{cli.tcp_dst}") peer = "#{cli.ip_daddr}:" << (cli.is_udp? ? "#{cli.udp_dst}" : "#{cli.tcp_dst}")
asked = net.question.map(&:qName).join(', ') asked = net.question.map(&:qname).join(', ')
vprint_good("Sent packet with header:\n#{cli.inspect}") vprint_good("Sent packet with header:\n#{cli.inspect}")
vprint_good("Spoofed records for #{asked} to #{peer}") vprint_good("Spoofed records for #{asked} to #{peer}")
end end