![](https://hackmd.io/_uploads/Hy3GUjLuh.png) ---------------- # Write Up 首先使用nmap進行scan ![](https://hackmd.io/_uploads/BkcuvjIO3.png) 檢查掃描結果後 ![](https://hackmd.io/_uploads/Hy4rdoU_h.png) ## 第一個flag ![](https://hackmd.io/_uploads/S1b6vjLu3.png) 另外,可以發現各個端口詳細資料 ![](https://hackmd.io/_uploads/BkARdjU_h.png) 發現端口有開啟445、139的smb服務,可以進一步使用NSE腳本掃描 `sudo nmap -p 445 --script=smb-enum-shares.nse,smb-enum-users.nse 10.10.1.158` ![](https://hackmd.io/_uploads/BJ9PKi8dh.png) ## 第二個flag ![](https://hackmd.io/_uploads/rJO3toId3.png) 使用smbclient登入smb `smbclient //10.10.1.158/anonymous` ![](https://hackmd.io/_uploads/ryLzjsLu2.png) 登入後發現有log.txt,下載至桌面,並檢查log.txt ![](https://hackmd.io/_uploads/ry5hho8dh.png) 發現是rsa 私鑰 ## 第三個flag ![](https://hackmd.io/_uploads/BJjxTjI_n.png) ## 第四個flag ![](https://hackmd.io/_uploads/rkcWpoIu3.png) ## 第五個flag 詢問端口 111 用於訪問網絡文件系統下的路徑,使用NSE `sudo nmap -p 111 --script=nfs-ls,nfs-statfs,nfs-showmount 10.10.1.158` ![](https://hackmd.io/_uploads/ryXs6iLdh.png) ![](https://hackmd.io/_uploads/B1w_InLdh.png) ## 第6個flag 透過nc檢查proftp版本 `nc 10.10.1.158 21` ![](https://hackmd.io/_uploads/S1gwlthUdh.png) ![](https://hackmd.io/_uploads/SydbKnLun.png) 利用exploit-db 找可以用得exploit ![](https://hackmd.io/_uploads/r1LYY2Ldn.png) 使用 SITE CPFR 和 SITE CPTO 命令複製 Kenobi 的私鑰 ![](https://hackmd.io/_uploads/H1EZ2nL_n.png) 複製金鑰,然後ssh登入 ![](https://hackmd.io/_uploads/BJG3p3Lun.png) ## 第7個flag `find / -perm -u=s -type f 2>/dev/null` 找尋具有配置SUID文件 ![](https://hackmd.io/_uploads/rkw2CnIdh.png) ![](https://hackmd.io/_uploads/rkMxy68uh.png) ## 第8個flag ![](https://hackmd.io/_uploads/H17rJ6Ld3.png) ![](https://hackmd.io/_uploads/B1WUy68Oh.png) ## 第9個flag ![](https://hackmd.io/_uploads/Sk3Y-6Id2.png) ![](https://hackmd.io/_uploads/rJTwWa8uh.png)