Managing Windows User Accounts via the Commandline
1. Managing Windows User Accounts via the
Commandline
Just hacked a box on a penetration test but can’t get a Meterpreter shell on it for some reason? Add yourself a
new account quickly with these easy commands. Works on all current versions of Windows (assuming you’ve
got an admin-level account).
Add local account of goat with password of T@styHay!
net user /add goat T@styHay!
Now add the goat account to the local administrators group
net localgroup administrators /add goat
WEB PHONE EMAIL
WWW.REDSPIN.COM 800-721-9177 INFO@REDSPIN.COM
2. View members of the local administrators group and make sure your new account is there
net localgroup administrators
Once you’re done, it’s polite to delete your account.
net user /delete goat
Other handy account management
Show all users on the local box
net user
Disable an account
net user goat /active:no
Enable an account
net user goat /active:yes
Change a users password
net user goat T@styAlfalfa!
WEB PHONE EMAIL
WWW.REDSPIN.COM 800-721-9177 INFO@REDSPIN.COM