Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit 41cad0e

Browse files
Fix for edge case where System.Core is not loaded
Make sure System.Core is loaded before creating an AES object. #247
1 parent 0bbf86e commit 41cad0e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: Exfiltration/Get-GPPPassword.ps1

+4-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ http://rewtdance.blogspot.com/2012/06/exploiting-windows-2008-group-policy.html
118118
}
119119

120120
$Base64Decoded = [Convert]::FromBase64String($Cpassword)
121+
122+
# Make sure System.Core is loaded
123+
[System.Reflection.Assembly]::LoadWithPartialName("System.Core") |Out-Null
121124

122125
#Create a new AES .NET Crypto Object
123126
$AesObject = New-Object System.Security.Cryptography.AesCryptoServiceProvider
@@ -345,4 +348,4 @@ http://rewtdance.blogspot.com/2012/06/exploiting-windows-2008-group-policy.html
345348
}
346349

347350
catch { Write-Error $Error[0] }
348-
}
351+
}

0 commit comments

Comments
 (0)