mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-08 14:36:22 +01:00
pass CRYPT_VERIFYCONTEXT flag
not passing this flag was causing an error attempting to open the keyset. by setting this we are telling the CAPI that we only care about ephemeral keys, and so we don't run into the container issues. MSP-12356
This commit is contained in:
parent
ac0978abcd
commit
9d5c3c1610
@ -73,7 +73,7 @@ DWORD ntds_parse(Remote *remote, Packet *packet){
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (!decrypt_PEK(sysKey, pekEncrypted, pekDecrypted)){
|
if (!decrypt_PEK(sysKey, pekEncrypted, pekDecrypted)){
|
||||||
res = ERROR_DECRYPTION_FAILED;
|
res = GetLastError();
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ BOOL decrypt_rc4(unsigned char *key1, unsigned char *key2, LPBYTE encrypted, int
|
|||||||
unsigned char rc4Key[16];
|
unsigned char rc4Key[16];
|
||||||
HCRYPTKEY rc4KeyFinal;
|
HCRYPTKEY rc4KeyFinal;
|
||||||
|
|
||||||
cryptOK = CryptAcquireContext(&hProv, 0, MS_ENHANCED_PROV, PROV_RSA_FULL, 0);
|
cryptOK = CryptAcquireContext(&hProv, 0, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
|
||||||
if (!cryptOK){
|
if (!cryptOK){
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user