aboutsummaryrefslogtreecommitdiff
path: root/Privesc
diff options
context:
space:
mode:
authorHarmj0y <will@harmj0y.net>2016-02-12 17:25:13 -0500
committerHarmj0y <will@harmj0y.net>2016-02-12 17:25:13 -0500
commit6de1d78af875300f8f1d82fad64b4471ed33882a (patch)
tree6d12927b8fe9fc014980cdbd8f57975f2a1e2f42 /Privesc
parenteae5eef91fafd6539f8ba4f38c5fcac8aafb61c2 (diff)
downloadPowerSploit-6de1d78af875300f8f1d82fad64b4471ed33882a.tar.gz
PowerSploit-6de1d78af875300f8f1d82fad64b4471ed33882a.zip
Added Pester tests for Get-SiteListPassword
Encrypted password check for Get-SiteListPassword fields
Diffstat (limited to 'Privesc')
-rw-r--r--Privesc/Get-SiteListPassword.ps19
1 files changed, 7 insertions, 2 deletions
diff --git a/Privesc/Get-SiteListPassword.ps1 b/Privesc/Get-SiteListPassword.ps1
index a37f63c..f631872 100644
--- a/Privesc/Get-SiteListPassword.ps1
+++ b/Privesc/Get-SiteListPassword.ps1
@@ -128,8 +128,13 @@ function Get-SiteListPassword {
try {
$PasswordRaw = $_.Password.'#Text'
- # decrypt the base64 password
- $DecPassword = if($PasswordRaw) { (Get-DecryptedSitelistPassword -B64Pass $PasswordRaw).Decrypted } else {''}
+ if($_.Password.Encrypted -eq 1) {
+ # decrypt the base64 password if it's marked as encrypted
+ $DecPassword = if($PasswordRaw) { (Get-DecryptedSitelistPassword -B64Pass $PasswordRaw).Decrypted } else {''}
+ }
+ else {
+ $DecPassword = $PasswordRaw
+ }
$Server = if($_.ServerIP) { $_.ServerIP } else { $_.Server }
$Path = if($_.ShareName) { $_.ShareName } else { $_.RelativePath }