Hack The Box Writeup | Sense

SenseはLinuxのマシンで、難易度はeasyです。

・使用ツール
gobuster
searchsploit

流れとしては、以下のようになっています。
1.gobusterでディレクトリ探索する
2.探索したディレクトリにアクセスして認証情報を取得
3.ログインしてバージョン情報を確認
4.searchsploitでexploitを検索
5.exploitを実行して管理者権限でシェルを奪取

1.Enumeration

nmpaでオープンポートが、80,443であることを確認

gobusterでディレクトリ探索をする

gobuster dir -u https://10.10.10.60 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -o gobuster_443 -k -t 100 -x php,txt

/system-user.txtのディレクトリに認証に関する情報が確認できる

「company defaults」の参考に調べると、パスワードはpfsenseであることがわかる

rohit,pfsenseでログインする
バージョンが2.1.3であることがわかる

2.Exploitation

searchsploitでsense 2.1.3のexploitを検索して、ヒットしたexploitをコピーする

コードに以下があり、コマンドで必要なオプションを指定する
rhost = args.rhost
lhost = args.lhost
lport = args.lport
username = args.username
password = args.password

exploitが成功し、管理者権限でシェルを奪取