TryHackMe Red Team Path Module: Post Compromise Part 10 / 18

Enumeration

Purpose

The goal of post-exploitation enumeration is to gather information about the compromised host and the surrounding network. Whether it’s a server or user machine, the objective is to collect data that enables:

Key Targets of Enumeration

Valuable information we might find:SSH keys: If you find a private key, it may grant access to other systems where the matching public key is trusted.

Saved credentials: Files like passwords.txt or passwords.xlsx often contain valuable secrets.

Source code: Might expose hardcoded passwords, tokens, or keys — especially if it's not meant for public release.

Linux Enumeration

Identifying OS Version

Hostname and User Information

User & Group Files

Mail and Sensitive Files

Installed Applications

Running Services and Processes

Sudo Privileges

Networking Enumeration

  1. Network Interfaces & IP
  1. DNS Settings
  1. Network Connections
  1. Open Files and Ports

OS and User info: Easily accessible via /etc files and basic commands (who, id, last).

Sensitive files: /etc/shadow, /var/mail/root, running services.

Network details: Can be mapped with ip, netstat, and lsof.

Processes: ps shows real-time system activity, useful for identifying what users are doing.

Security Insight: Internal enumeration reveals much more detail than external scans (e.g., nmap).

Windows Enumeration

System Information

systeminfo: Displays OS version, hotfixes, build number, hardware, and more.

wmic qfe get Caption,Description: Lists installed Windows updates and hotfixes.

Installed Applications & Services

wmic product get name,version,vendor: Lists installed software.

net start: Shows currently running services.

User Enumeration

whoami: Shows current username.

whoami /priv: Lists privileges (e.g., SeTakeOwnershipPrivilege)

whoami /groups: Lists group memberships.

net user: Lists all local user accounts.

net localgroup: Lists local groups.

net localgroup administrators: Lists members of the Administrators group.

net accounts: Displays local account and password policy.

net accounts /domain for domain policies.

Network Configuration

ipconfig or ipconfig /all Displays IP address, subnet mask, gateway, and DNS configuration.

netstat -abno Shows all listening and established connections, associated processes, and PIDs. Options:

arp -a Lists recent LAN IP-to-MAC address mappings.

DNS,SMB and SMTP

DNS Enumeration

Use the dig command:dig -t AXFR DOMAIN_NAME @DNS_SERVER

- `-t AXFR`: Zone transfer query type

- `@DNS_SERVER`: Target DNS server

SMB Enumeration

Purpose: Identify shared folders, files, printers, and users on Windows systems.

Command:net share

Other tools: smbclient, enum4linux, and crackmapexec can also be used for advanced enumeration.

Other Windows Tools

Sysinternals Suite

The Sysinternals Suite is a group of command-line and GUI utilities and tools that provides information about various aspects related to the Windows system. To give you an idea, we listed a few examples in the table below.

Process ExplorerShows the processes along with the open files and registry keys

Process MonitorMonitor the file system, processes, and Registry

PsListProvides information about processes

PsLoggedOnShows the logged-in users

Check Sysinternals Utilities Index for a complete list of the utilities.

Process Hacker

Another efficient and reliable MS Windows GUI tool that lets you gather information about running processes is Process Hacker. Process Hacker gives you detailed information regarding running processes and related active network connections; moreover, it gives you deep insight into system resource utilization from CPU and memory to disk and network.

GhostPack Seatbelt

Seatbelt, part of the GhostPack collection, is a tool written in C#. It is not officially released in binary form; therefore, you are expected to compile it yourself using MS Visual Studio.

TryHackMe Red Team Path Module: Post Compromise Part 10 / 18