Skip to content

Commit 6a04f5e

Browse files
committed
Be less strict on hostname matching for ccache credentials
1 parent c1a44c8 commit 6a04f5e

File tree

1 file changed

+3
-1
lines changed
  • lib/msf/core/exploit/remote/kerberos/service_authenticator

1 file changed

+3
-1
lines changed

lib/msf/core/exploit/remote/kerberos/service_authenticator/base.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,9 @@ def load_credential_from_file(file_path, options = {})
10301030
next
10311031
end
10321032

1033-
unless !sname_hostname || sname_hostname.to_s.casecmp?(credential.server.components[1])
1033+
unless !sname_hostname ||
1034+
sname_hostname.to_s.downcase == credential.server.components[1] ||
1035+
sname_hostname.to_s.downcase.ends_with?('.' + credential.server.components[1])
10341036
wlog("Filtered credential #{file_path} ##{index} reason: SPN (#{sname_hostname}) hostname does not match (spn: #{credential.server.components.snapshot.join('/')})")
10351037
next
10361038
end

0 commit comments

Comments
 (0)