Use correct source port for NBNS spoofer

137 is only correct for systems that use this as their source port.
Systems running Samba, for example, don't use this.  So use the port
taken from the original request, not 137 or 1337
bug/bundler_fix
Jon Hart 2014-10-29 15:21:31 -07:00
parent 96ba6da697
commit 9238d80a24
1 changed files with 2 additions and 1 deletions

View File

@ -67,6 +67,7 @@ class Metasploit3 < Msf::Auxiliary
while @run # Not exactly thrilled we can never turn this off XXX fix this sometime.
packet, addr = @sock.recvfrom(512)
src_port = addr[1]
rhost = addr[3]
break if packet.length == 0
@ -127,7 +128,7 @@ class Metasploit3 < Msf::Auxiliary
p.ip_daddr = rhost
p.ip_ttl = 255
p.udp_sport = 137
p.udp_dport = 137
p.udp_dport = src_port
p.payload = response
p.recalc