EvotecIT / PSWinDocumentation.AD

PowerShell module delivering a lot of Active Directory Forest/Domain information
MIT License
122 stars 22 forks source link

PasswordTests against pwned hashes not working #11

Closed cmwg71 closed 4 years ago

cmwg71 commented 4 years ago

hello,

i installed your module PSWinDocumentation especially for the pwned statistics. I have the following in the ps1:

PasswordTests = @{
            Use                       = $true
            # Using '' will still process some usefull output
            PasswordFilePathClearText = '' #"$PSScriptRoot\Passwords\Passwords.txt"
            # Fair warning it will take ages if you use HaveIBeenPwned DB :-)
            UseHashDB                 = $true
            PasswordFilePathHash      = 'C:\scripts\PSWinDocumentation\pwned-passwords-ntlm-ordered-by-count.txt'
        }

but the script does not aggregate the pwned hashes into statistics. It seems to be completely ignoring this part.

PrzemyslawKlys commented 4 years ago

It should be fixed now. At least when executed from PSWinDocumentation.AD. I'll take a look at PSWinDocumentation alone later. Tested with the newest hash DB.

Let me know how it goes.

PrzemyslawKlys commented 4 years ago

The recommended way would be to use - as it may be simpler.

# Using built-in password list (just one password P@ssw0rd!)
$Passwords = Invoke-ADPasswordAnalysis
$Passwords.'ad.evotec.xyz'.DomainPasswordDuplicatePasswordGroups | Format-Table -AutoSize 'Duplicate Group', *
$Passwords.'ad.evotec.xyz' | Format-Table *

return
# Using a list of passwords
$PathToPasswords = 'C:\Support\GitHub\PSWinDocumentation.AD\Ignore\Passwords.txt'
$Passwords = Invoke-ADPasswordAnalysis -PathToPasswords $PathToPasswords
$Passwords.'ad.evotec.xyz' | Format-Table

return
# Using Hashes from IHaveBeenPwned
$PathToPasswordsHashes = 'C:\Users\przemyslaw.klys\Downloads\pwned-passwords-ntlm-ordered-by-hash-v6\pwned-passwords-ntlm-ordered-by-hash-v6.txt'
$Passwords = Invoke-ADPasswordAnalysis -PathToPasswords $PathToPasswordsHashes -UseNTLMHashes
$Passwords.'ad.evotec.xyz' | Format-Table