Switch to using Rex's Crypto module
This commit is contained in:
@@ -122,17 +122,21 @@ module Msf::Exploit::Remote::SMB::Client::KerberosAuthentication
|
||||
|
||||
# see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/7fd079ca-17e6-4f02-8449-46b606ea289c
|
||||
if @dialect == '0x0300' || @dialect == '0x0302'
|
||||
@application_key = RubySMB::Crypto::KDF.counter_mode(
|
||||
@application_key = Rex::Crypto::KeyDerivation::NIST_SP_800_108.counter_hmac(
|
||||
@session_key,
|
||||
"SMB2APP\x00",
|
||||
"SmbRpc\x00"
|
||||
)
|
||||
16,
|
||||
'SHA256',
|
||||
label: "SMB2APP\x00",
|
||||
context: "SmbRpc\x00"
|
||||
).first
|
||||
else
|
||||
@application_key = RubySMB::Crypto::KDF.counter_mode(
|
||||
@application_key = Rex::Crypto::KeyDerivation::NIST_SP_800_108.counter_hmac(
|
||||
@session_key,
|
||||
"SMBAppKey\x00",
|
||||
@preauth_integrity_hash_value
|
||||
)
|
||||
16,
|
||||
'SHA256',
|
||||
label: "SMBAppKey\x00",
|
||||
context: @preauth_integrity_hash_value
|
||||
).first
|
||||
end
|
||||
# otherwise, leave encryption to the default value that it was initialized to
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user