Land #17547, Remove KRB5CCNAME env var on bootup

This commit is contained in:
cgranleese-r7 2023-01-26 16:11:03 +00:00 committed by GitHub
commit fb79a5f9d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -43,7 +43,7 @@ module Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Options
),
Msf::OptPath.new(
"#{protocol}Krb5Ccname",
[false, 'The ccache file to use for kerberos authentication', ENV.fetch('SMBKRB5CCNAME', ENV.fetch('KRB5CCNAME', nil))],
[false, 'The ccache file to use for kerberos authentication', nil],
conditions: option_conditions
)
]

View File

@ -7,6 +7,11 @@ ENV['OPENSSL_CONF'] = File.expand_path(
File.join(File.dirname(__FILE__), '..', 'config', 'openssl.conf')
)
if ENV['KRB5CCNAME']
$stderr.puts 'Warning: KRB5CCNAME environment variable not supported - unsetting'
ENV['KRB5CCNAME'] = nil
end
# Override the normal rails default, so that msfconsole will come up in production mode instead of development mode
# unless the `--environment` flag is passed.
ENV['RAILS_ENV'] ||= 'production'