TryHackMe 歴1ヵ月半が参加する Advent of Cyber 2022 [Day 4]

4日目。

[Day 4] Scanning through the snow

Nmap と Nikto と Samba まわりのお話。Nikto なんて初めて聞いたぞ

What is the name of the HTTP server running on the remote host?

ヒントにある通り nmap <target IP> -sV を走らせる。SERVICE が http の VERSION の項目を見れば答えがわかる。

What is the name of the service running on port 22 on the QA server?

前の問題で走らせた nmap の結果を見ればわかる。"port 22" から即答もできる。

What flag can you find after successfully accessing the Samba service?

Windowsエクスプローラーで smb://<target IP> を入力してみるもアプリの検索を促される。

そこで smbclient を試す(WSL2 で実行)。target IP の admins フォルダを見たいので、smbclient -U ubuntu //<target IP>/admins を実行する。-U はユーザ名指定であり、今、説明文から

  • Username: ubuntu
  • Password: S@nta2022

であるとわかっているのでそれで接続する。ログイン後は ls コマンドを用いるとフラグに関するファイルが見えるので、それを more コマンドを用いて見る。

What is the password for the username santahr?

先ほどの ls コマンドでもう一つ別のファイルが見えるのでそれを more コマンドを用いて見ると santahr のパスワードがわかる。

If you want to learn more scanning techniques, we have a module dedicated to Nmap!

No answer needed

感想

Nikto 使わんのかい!Windows の Samba クライアントみたいなものも検索したがそれらしきものは見つからなかったのでコマンドベースでやるしかないらしい。ちなみに促されるまま Windows Store にアプリを探しに samba で検索するとやはりというべきかダンス系統のアプリが出てきて愉快である。