Windows Local Enumeration

#Local Enumeration

System Information

  • In the Meterpreter session

getuid
	Server username: WIN-OMCNBKR66MN\Administrator
sysinfo
    Computer        : WIN-OMCNBKR66MN
    OS              : Windows 2012 R2 (6.3 Build 9600).
    Architecture    : x64
    System Language : en_US
    Domain          : WORKGROUP
    Logged On Users : 1
    Meterpreter     : x86/windows
show_mount
    Mounts / Drives
    ===============
    Name  Type   Size (Total)  Size (Free)  Mapped to
    ----  ----   ------------  -----------  ---------
    C:\   fixed  30.00 GiB     15.93 GiB    
  • In the Windows command prompt session

  • Get specific info about the KBs. pay attention to the Security Updates

Users & Groups

  • Privilege escalation is not necessary in this case

  • Enumerate current/recent logged-on users

  • Back into the Meterpreter session

  • In the Windows command prompt session

  • Enumerate current logged-on users

  • Display all the accounts

  • Enumerate groups

Network Information

  • Show network adapter info

  • Display the routing table

  • Check the arp table for a list of all devices on the network

  • List open listening connections/ports

  • Win Firewall state

Processes & Services

  • Enumerate all running processes, from a Meterpreter session

  • Process migration is recommended to obtain a stable Meterpreter session

  • In the Windows command prompt session

  • List started services

  • List the running tasks and the corresponding services

  • List the scheduled tasks

📌 Scheduled tasks can be misconfigured and vulnerable to exploitation and privilege escalation!

#Automating Local Enum

JAWS - PowerShell 2.0 script designed to help penetration testers quickly identify potential privilege escalation vectors on Windows systems.

Enumeration & Exploitation

#Metasploit Post-Exploitation

  • Enumerate current user privileges

  • Enumerate logged on users

  • Check if the target is a VM or a container

  • Enumerate installed applications

    • Search for vulnerabilities in the installed programs

  • Enumerate same LAN computers

  • Enumerate installed updates/patches

  • Enumerate the SMB shares

#JAWS

jaws-enum.ps1

  • Back into the MSFconsole session, copy the jaws-enum.ps1 file into the C:\temp target directory

  • Run jaws-enum.ps1 and output the results in a file

  • Architecture migrate

  • Enumerate current user privileges

  • Check current and recently logged on users

  • Determine if the system is a VM

  • Enumerate installed programs

  • Check Antivirus

  • Enumerate domain computers

  • Enumerate installed patches

  • Enumerate any shares

  • Check if RDP is enabled

Last updated