Activate administrator account windows 10 cmd

broken image
broken image

#Help me obfuscate or cram code into a space So here is a quick script to concert the commands to base64 encoding and then copy them to the clipboard! Ok so this is something if you are planning on doing security testing will want to know about, how do we encode commands and pass them? well sometimes we want a cool way of preparing a payload (set of code/commands) and then executing these in a way that can be sent in a URL string or other fashion. $user=$computer.Create(‘User’, $username) We can also create local accounts using the Windows NT provider via ADSI $computer=”WinNT://$env:COMPUTERNAME” New-LocalUser -Name SecurityAuditor -Password $password -FullName “Security Auditor Powershell Demo”Īdd-LocalGroupMember -Group Administrators -Member “SecurityAuditor” We can do the same via PowerShell (note that using password on the command line is not a great idea from an opsec perspective!) $password = ConvertTo-SecureString “ !” -AsPlainText -Force #really bad for opsec Add the account to the local administrators group.Create a user account named “secaudit” with a password of “ !”.

broken image

Net localgroup administrators /add secaudit Are you like me and always end up searching for easy stuff that you know but you just can’t remember the syntax all the time?Ĭommand line net user secaudit ! /ADD

broken image