Enumeration

1. Enumerating System Information

Gather basic system information:

systeminfo
sysinfo
wmic qfe get Caption,Description,HotFixID,InstalledOn
  • systeminfo: Displays OS version, architecture, and patches.

  • sysinfo: Similar, used within Meterpreter.

  • wmic qfe get ...: Lists installed Windows updates.


2. Enumerating Users & Groups

Meterpreter Commands:

getuid          # Get current user
getprivs        # Get available privileges
background      # Background current session
use post/windows/gather/enum_logged_on_users
set SESSION 1
run
sessions 1
shell

Windows Commands:

  • whoami /priv: Identifies privilege escalation vectors.

  • net users: Lists local user accounts.

  • net localgroup administrators: Checks administrator group members.


3. Enumerating Network Information

  • ipconfig /all: Useful for finding internal IPs, gateways, and DNS servers.

  • netstat -ano: Identifies open ports and associated processes.


4. Enumerating Processes & Services

  • migrate 2252: Used to migrate Meterpreter session to a stable process.

  • schtasks /query /fo LIST: Identifies scheduled tasks (potential persistence methods).


5. Automating Windows Local Enumeration

1. Enumerate Privileges

Checks the privileges of the current session to identify potential privilege escalation opportunities.

  • Identifies high-privilege rights (e.g., SeDebugPrivilege, SeImpersonatePrivilege).

  • Helps determine if the session can escalate privileges.


2. Enumerate Logged-On Users

Lists all users currently logged into the system.

  • Useful for identifying target accounts for credential theft.

  • Helps in planning privilege escalation or lateral movement.


3. Check if the System is a Virtual Machine (VM)

Determines whether the compromised system is running inside a virtual environment.

  • Helps attackers evade sandbox environments and avoid detection.

  • Identifies Hyper-V, VMware, VirtualBox, or cloud-based VMs.


4. Enumerate Installed Applications

Lists all installed applications on the system.

  • Helps identify security software, vulnerable applications, or useful tools.

  • May reveal password managers, remote access tools, or exploits.


5. Enumerate Computers in the Network

Gathers information about other computers in the same Windows domain or workgroup.

  • Useful for network reconnaissance and lateral movement.

  • Identifies potential targets for further exploitation.


6. Enumerate Network Shares

Lists all network shares accessible from the compromised system.

  • Identifies shared files and folders that may contain sensitive data.

  • Helps in data exfiltration or privilege escalation.

Last updated