Basic Windows Commands

ko-fiarrow-up-right

LOL Binschevron-right

Basic enum commands

Enumeration from Windows Hostchevron-right

Command

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 Administrators

powershell

PS C:\Windows\system32> Get-LocalGroupMember -Group "Administrators"

Privileges

  1. 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:

  1. net user username - Checking User Account Privileges including Domain

  1. whoami /priv

Windowschevron-right

Add user to admin local group

net user mark Password123 /add && net localgroup administrators mark /add

circle-exclamation

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) / RPCchevron-right

Last updated