Can you root this Mr. Robot styled machine? This is a virtual machine meant for beginners/intermediate users. There are 3 hidden keys located on the machine, can you find them?
Robots
There's something fishy about this wordlist… Why is it so long?
nmap
robots.txt 是一種存放於網站根目錄下的ASCII編碼的文字檔案,它通常告訴網路搜尋引擎的漫遊器(又稱網路蜘蛛),此網站中的哪些內容是不應被搜尋引擎的漫遊器取得的,哪些是可以被漫遊器取得的。
另外還有一個字典檔 fscoity.dic
後續應該會用到
目錄掃描後發現
在 /license.txt
中有一組帳號密碼 elliot:ER28-0652
在 /wp-login.php
可以看到 wordpress 的後台登入畫面,再使用這組帳號密碼登入後台
成功登入後,安裝 wordpress reverse shell plugin 取得 shell
接下來尋找 key-2-of-3.txt
但這邊會發現沒辦法直接印出記事本的東西,應該是權限不足,在 /home/robot/
的路徑下還有另一個檔案 password.raw-md5
,將它印出得到 robot 的密碼雜湊,並嘗試解密獲得密碼abcdefghijklmnopqrstuvwxyz
這邊之後不知道為什麼我的 shell 怪怪的,所以我找了別的 reverse shell php 並放在 404 的頁面(Wordpress的後台->Appearance->Editor),成功拿一個新的shell,並切換使用者變成 robot,成功拿到 key2
尋找可以提權的方法,發現 nmap
可以,與提示吻合
接下來透過 nmap
的 interactive 功能就可以拿到 key3 了