Basic Windows Commands
Basic enum commands
Enumeration from Windows HostCommand
Result
hostname
Prints the PC's Name
[System.Environment]::OSVersion.Version
Prints out the OS version and revision level
wmic qfe get Caption,Description,HotFixID,InstalledOn
Prints the patches and hotfixes applied to the host
ipconfig /all
Prints out network adapter state and configurations
set
Displays a list of environment variables for the current session (ran from CMD-prompt)
echo %USERDOMAIN%
Displays the domain name to which the host belongs (ran from CMD-prompt)
echo %logonserver%
Prints out the name of the Domain controller the host checks in with (ran from CMD-prompt)
List Local Admins
cmd
net localgroup Administratorspowershell
PS C:\Windows\system32> Get-LocalGroupMember -Group "Administrators"Privileges
net localgroup
Once connected, we can check to see what privileges bwilliamson has. We can start with looking at the local group membership using the command:
net user username- Checking User Account Privileges including Domain
whoami /priv
Add user to admin local group
net user mark Password123 /add && net localgroup administrators mark /add
Use a "complex" password - If not, the user will not be created
RunAsC
RunasCs is an utility to run specific processes with different permissions than the user's current logon provides using explicit credentials
Read encrypted file
Find encrypted files
If you don't know the user password, change it. You have to know the user plaintext password to decipher and read the file in the user context
Mount SMB share
SMB (445, 139) / RPCLast updated