Windows Enumeration

2 minute read

if you are interested in network penetration tester or red teaming I collected most of the commands used in windows enumeration,enjoy

Operating System

What version of windows is running? Is it 32 or 64-bit?

ver
wmic os get osarchitecture

Getting-gz

os version

systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"

Getting-gz

Hostname

Hostname prints the name of the PC you are currently connected to.

whoami:tells you the domain and the username of the user currently connected as

hostname
whoami 
set computername

Getting-gz

Network

Ipconfig displays all the networking information of the current PC your connected to.

ipconfig

Getting-gz

If you add a /all to the ipconfig command it will give you a more detailed output which includes the DHCP and DNS server that the PC is connected to.

ipconfig /all

Getting-gz

ipconfig /allcompartments /all

Getting-gz

 wmic nicconfig get description,IPAddress,MACaddress

Getting-gz

route print command displays the routing table of the current windows PC your connected to

route PRINT

Getting-gz

The arp -a command displays the IP to physical address translation used by the address resolution protocol.

arp -a

Getting-gz

netstat is a command-line network utility that displays network connections for Transmission Control Protocol, routing tables, and a number of network interface and network protocol

netstat
netstat -ano

Getting-gz

firewall configuration

netsh firewall gives you options to control the windows firewall

netsh advfirewall show currentprofile

Getting-gz

netsh advfirewall firewall show rule name=all

Getting-gz

netsh firewall show state

Getting-gz

netsh firewall show config

Getting-gz

windows defender

sc query windefend

Getting-gz

running processes

Tasklist displays a list of currently running processes on a PC.

tasklist /SVC

Getting-gz

Is the machine on a domain?

set userdomain

Getting-gz

Registry

Windows autologin

reg query "HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon"

Getting-gz

reg query "HKLM\Software\Microsoft\Windows NT\Currentversion\Winlogon" /v LastUsedUsername

Getting-gz

Search for password in registry

reg query HKLM /f password /t REG_SZ /s

Getting-gz

reg query HKCU /f password /t REG_SZ /s

Getting-gz

Hardware Information

wmic bios

Getting-gz

wmic baseboard get manufacturer

Getting-gz

wmic cpu list full

Getting-gz

patches are installed

qfe to the wmic command you get a list of all the installed hotfixes installed on a windows PC. What patches are installed?

wmic qfe

Getting-gz

install app

wmic product get name, version, vendor

Getting-gz

wmic qfe get Caption, Description, HotFixID, InstalledOn

Getting-gz

wmic service get name,displayname,pathname,startmode |findstr /i "auto" |findstr /i /v "c:\windows"

Getting-gz

Unquoted Service Paths

Find Services With Unquoted Paths

wmic service get name,displayname,pathname,startmode |findstr /i "auto" |findstr /i /v "c:\windows\\" |findstr /i /v """

Net Start

allows you to manage services running on the PC

net start

Getting-gz

device drivers

Driverquery quickly displays all the device drivers of the Pc your connected to.

Driverquery

Getting-gz

scheduled tasks

Schtasks allows you to manage scheduled tasks running on a local or remote machine

Schtasks /query /fo LIST /v

Getting-gz

device&kernal

Get-WmiObject Win32_PnPSignedDriver | Select-Object DeviceName, DriverVersion, Manufacturer | Where-Object {$_.DeviceName -like "*VMware*"}

Getting-gz

Search for Cleartext Passwords

findstr /si password *.txt
findstr /si password *.xml
findstr /si password *.ini

Find all those strings in config files.

dir /s *pass* == *cred* == *vnc* == *.config*

Find all passwords in all files.

findstr /spin "password" *.*
findstr /spin "password" *.*

I finished this part about windows enumeration today waiting me in the next part.