Post

TryHackMe - Enumeration Post Compromise

TryHackMe - Enumeration Post Compromise

Linux Enumeration

OS Version Details

1
ls /etc/*-release
1
hostname

Users and groups

1
2
3
cat /etc/passwd
cat /etc/group
cat /etc/shadow

Sensitive Info

1
ls -lh /var/mail/
1
2
ls -lh /usr/bin/
ls -lh /sbin/

Installed Packages

1
dpkg -l

Current user info

1
2
3
4
who
whoami
last
id

Network Details

1
2
3
ip a s
cat /etc/resolv.conf
sudo netstat -plt

netstat -atupn will show All TCP and UDP listening and established connections and the program names with addresses and ports in numeric format. Running Services

1
ps axf

Windows Enumeration

Systeminfo

1
systeminfo

Installed Updates

1
wmic qfe get Caption,Description

Windows Services

1
net start

Users

1
2
3
4
5
6
7
whoami /priv
whoami /groups
net user
net localgroup
net localgroup administrators
net accounts
net accounts /domain

Networking

1
2
3
ipconfig /all
netstat -abno
arp -a

DNS

1
dig -t AXFR DOMAIN_NAME @DNS_SERVER

SMB

1
net share

Other Tools

List

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.

Utility NameDescription
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. If you want to learn more and experiment with these different utilities, we suggest the Sysinternals room.

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.

Summary

Commands and Cheatsheet

Linux CommandDescription
hostnameshows the system’s hostname
whoshows who is logged in
whoamishows the effective username
wshows who is logged in and what they are doing
lastshows a listing of the last logged-in users
ip address showshows the network interfaces and addresses
arpshows the ARP cache
netstatprints network connections
psshows a snapshot of the current processes
Windows CommandDescription
systeminfoshows OS configuration information, including service pack levels
whoamishows the user name and group information along with the respective security identifiers
netstatshows protocol statistics and current TCP/IP network connections
net usershows the user accounts on the computer
net localgroupshows the local groups on the computer
arpshows the IP-to-Physical address translation tables
This post is licensed under CC BY 4.0 by the author.