Use DNS names
parent
86ae104580
commit
c813c117db
|
@ -59,8 +59,9 @@ class Metasploit3 < Msf::Exploit::Local
|
||||||
]),
|
]),
|
||||||
OptString.new("NAME", [ false, "Service name on each target in RHOSTS (Default: random)" ]),
|
OptString.new("NAME", [ false, "Service name on each target in RHOSTS (Default: random)" ]),
|
||||||
OptString.new("DISPNAME", [ false, "Service display name (Default: random)" ]),
|
OptString.new("DISPNAME", [ false, "Service display name (Default: random)" ]),
|
||||||
OptEnum.new("TECHNIQUE", [ true, "Technique to use", 'SMB', ['PSH', 'SMB'] ]),
|
OptEnum.new("TECHNIQUE", [ true, "Technique to use", 'PSH', ['PSH', 'SMB'] ]),
|
||||||
OptAddressRange.new("RHOSTS", [ false, "Target address range or CIDR identifier" ]),
|
OptAddressRange.new("RHOSTS", [ false, "Target address range or CIDR identifier" ]),
|
||||||
|
OptBool.new("KERBEROS", [ true, "Authenticate via Kerberos, dont resolve hostnames", false ])
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -102,7 +103,13 @@ class Metasploit3 < Msf::Exploit::Local
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Rex::Socket::RangeWalker.new(datastore["RHOSTS"]).each do |server|
|
if datastore['KERBEROS']
|
||||||
|
targets = datastore['RHOSTS'].split(', ').map{ |a| a.split(' ') }.flatten
|
||||||
|
else
|
||||||
|
targets = Rex::Socket::RangeWalker.new(datastore["RHOSTS"])
|
||||||
|
end
|
||||||
|
|
||||||
|
targets.each do |server|
|
||||||
begin
|
begin
|
||||||
print_status("#{server.ljust(16)} Creating service #{name}")
|
print_status("#{server.ljust(16)} Creating service #{name}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue