Meterpreter Commands Guide | Top 60 Essentials

x32x01
  • by x32x01 ||
If you're diving deep into penetration testing, ethical hacking, or red teaming, then you’ve definitely come across Meterpreter - one of the most powerful payloads built into the Metasploit Framework. This tool gives security professionals and penetration testers a flexible, stealthy, in-memory shell packed with features that make post-exploitation faster, smarter, and more effective. 🔥

In this full guide, we’ll break down how Meterpreter works, explain its internal process in simple language, and give you a clean, organized list of the top 60 Meterpreter commands every ethical hacker should master. We’ll also include practical examples and command snippets so beginners and advanced users alike can follow along easily. 🧑‍💻💡

🔍 How Meterpreter Works

Meterpreter isn’t just a normal shell. It’s an advanced payload designed to run completely in memory, making it harder for antivirus and endpoint tools to detect. Here's the simplified workflow of how it operates:

🧩 1. The target runs the initial stager

This is usually one of the following:
bind, reverse, findtag, passivex, etc.
Its job is to open communication between the attacker and the compromised machine.

🧬 2. Reflective DLL injection happens

The stager loads a DLL that starts with the prefix Reflective.
The Reflective Loader is responsible for injecting Meterpreter into memory without writing files to disk — a huge advantage in stealth operations.

🔗 3. A secure TLS communication channel is established

Meterpreter initiates a TLS/1.0 connection over the socket and sends a GET request.
Metasploit configures the client and prepares it for post-exploitation.

📦 4. Extensions are loaded

Meterpreter automatically loads key extensions such as:
  • stdapi - for filesystem, networking, system commands
  • priv - for advanced privilege escalation (loaded only when needed)
All extensions are transferred over encrypted TLS connections using the TLV protocol.



🛠️ Top 60 Useful Meterpreter Commands (With Descriptions) 🧑‍💻
Below is the full list of essential Meterpreter commands you’ll need during post-exploitation. These commands help you manage files, processes, users, keystrokes, desktops, webcams, privilege escalation, and more.

Each command is explained in simple, beginner-friendly language:

📂 File System Commands

CommandDescription
catDisplay file contents on screen
cdChange directory
downloadDownload a file from the target
editEdit a file directly
getlwdShow local working directory
getwdShow remote working directory
lcdChange local directory
lpwdShow local directory
lsList files/folders
mkdirCreate a directory
pwdPrint working directory
rmDelete a file
rmdirRemove directory
searchSearch for files
uploadUpload file to target

🔧 Example: Searching for password files​

Bash:
search -f *password*



🧠 Session & Channel Commands

CommandDescription
backgroundSend session to background
bgkillKill background session
channelShow active channels
closeClose a channel
interactInteract with a channel
readRead data from channel
writeWrite data to a channel

🧩 Unicode Encoding Commands

CommandDescription
disable_unicode_encodingDisable Unicode encoding
enable_unicode_encodingEnable Unicode encoding

🧪 Scripting & Automation Commands

CommandDescription
irbRuby scripting shell (dev mode)
resourceRun commands from file
runExecute a script or post module
loadLoad Meterpreter extensions

🖥️ Desktop & UI Interaction

CommandDescription
getdesktopGet active desktop session
idletimeShow user idle time
keyscan_startStart logging keystrokes
keyscan_stopStop logging
keyscan_dumpShow captured keystrokes
screenshotTake screenshot
setdesktopSwitch desktop
uictlControl GUI components

🧪 Example: Taking a screenshot​

Bash:
screenshot

📸 Webcam Commands

CommandDescription
webcam_listList available webcams
webcam_snapCapture an image

🔓 Privilege & Security Commands

CommandDescription
getsystemAttempt privilege escalation
hashdumpDump SAM password hashes
timestompEdit file timestamps
clearevClear event logs
drop_tokenDrop impersonation token
steal_tokenSteal impersonation token

🔥 Example: Attempting privilege escalation​

Bash:
getsystem

👤 System Interaction & Process Control

CommandDescription
getpidGet current process ID
getprivsShow process privileges
getuidShow current user
killKill a process
psList processes
rebootReboot machine
shutdownShut down machine
regAccess remote registry
rev2selfRevert to original user
shellOpen system command shell

🚀 Execution & Migration

CommandDescription
executeRun a command
migrateMove Meterpreter to another process
quitExit session
exitClose Meterpreter

🔥 Example: Migrating to explorer.exe​

Bash:
ps
migrate <PID>

📘 Simple Example: Using Meterpreter to Capture a Screenshot & Dump Passwords​

Here’s a quick real-world workflow:
Bash:
# Take a screenshot
screenshot

# Dump password hashes
hashdump

# Search for sensitive files
search -f *.txt

# Escalate privileges
getsystem
These small tasks show how powerful Meterpreter can be for penetration testing, incident response, and red teaming.

🎯 Final Thoughts

Meterpreter is one of the strongest tools in the modern penetration tester’s toolkit. With features like in-memory execution, encrypted communication, stealthy process migration, keystroke capture, privilege escalation, and full system control - professionals can perform highly advanced post-exploitation tasks safely and efficiently.

Mastering these top 60 Meterpreter commands will give you a huge advantage in real-world ethical hacking engagements and lab practice. Keep experimenting, stay ethical, and always get permission before testing! ⚡🛡️
 
Last edited:
Related Threads
x32x01
Replies
0
Views
938
x32x01
x32x01
x32x01
Replies
0
Views
911
x32x01
x32x01
x32x01
Replies
0
Views
879
x32x01
x32x01
x32x01
Replies
0
Views
822
x32x01
x32x01
x32x01
Replies
0
Views
1K
x32x01
x32x01
Register & Login Faster
Forgot your password?
Forum Statistics
Threads
660
Messages
668
Members
66
Latest Member
medhatmalak
Back
Top