diff options
author | b33f <ru.boonen@gmail.com> | 2017-07-18 13:08:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 13:08:31 +0100 |
commit | 41cad0ee9fa8a18a77d68b696c2cc24d14e95352 (patch) | |
tree | 8ab2ac2c9c8a8075ecfc2cb4b26c2062b1b9c554 /Exfiltration | |
parent | 0bbf86e02125d1b9ffbc8f1ac3514dec7aaae940 (diff) | |
download | PowerSploit-41cad0ee9fa8a18a77d68b696c2cc24d14e95352.tar.gz PowerSploit-41cad0ee9fa8a18a77d68b696c2cc24d14e95352.zip |
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
Diffstat (limited to 'Exfiltration')
-rw-r--r-- | Exfiltration/Get-GPPPassword.ps1 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Exfiltration/Get-GPPPassword.ps1 b/Exfiltration/Get-GPPPassword.ps1 index f7be74c..7703508 100644 --- a/Exfiltration/Get-GPPPassword.ps1 +++ b/Exfiltration/Get-GPPPassword.ps1 @@ -118,6 +118,9 @@ http://rewtdance.blogspot.com/2012/06/exploiting-windows-2008-group-policy.html } $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 $AesObject = New-Object System.Security.Cryptography.AesCryptoServiceProvider @@ -345,4 +348,4 @@ http://rewtdance.blogspot.com/2012/06/exploiting-windows-2008-group-policy.html } catch { Write-Error $Error[0] } -}
\ No newline at end of file +} |