aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorb33f <ru.boonen@gmail.com>2017-07-18 13:08:31 +0100
committerGitHub <noreply@github.com>2017-07-18 13:08:31 +0100
commit41cad0ee9fa8a18a77d68b696c2cc24d14e95352 (patch)
tree8ab2ac2c9c8a8075ecfc2cb4b26c2062b1b9c554
parent0bbf86e02125d1b9ffbc8f1ac3514dec7aaae940 (diff)
downloadPowerSploit-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
-rw-r--r--Exfiltration/Get-GPPPassword.ps15
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
+}