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

Advent of Cyber 2022 [Day 2] をやる。

[Day 2] Santa's Naughty & Nice Log

今回は Log Analysis。

Ensure you are connected to the deployable machine in this task.

No answer needed

Use the ls command to list the files present in the current directory. How many log files are present?

まずは SSH でログイン。

ssh elfmcblue@xx.xx.xx.xx  # password: tryhackme!

すでに elfmcblue のホームディレクトリにいるのであとは ls コマンドを叩いてログファイルの数を確認する。

Elf McSkidy managed to capture the logs generated by the web server. What is the name of this log file?

先ほど確認したログファイルの中で the logs generated by the web server らしきものを回答する。

Begin investigating the log file from question #3 to answer the following questions.

No answer needed

On what day was Santa's naughty and nice list stolen?

ログファイルの行数を wc -l で確認する。約19万行あるので cat ではなく less で覗いてみる。

gobuster を動かした形跡があるのでそれを除去して grep する。指定文字を除去して検索するときは -v オプションを使う。

18/Nov/2022 に wget で santaslist.txt が GET されている形跡があるので日付の曜日を回答する。

What is the IP address of the attacker?

先ほどの santaslist.txt に関するログの IP アドレスを回答する。

What is the name of the important list that the attacker stole from Santa?

再度先ほどのログを見る。重要なリストとは一体……!?(すっとぼけ)

Look through the log files for the flag. The format of the flag is: THM{}

/home/elfmcblue 内を grep を用いて検索する。その際 -r オプションを使う。フラグには文字列 THM が含まれているから……

Interested in log analysis? We recommend the Windows Event Logs room or the Endpoint Security Monitoring Module.

No answer needed

感想

説明文が多く、問題数も多かったので心配だったが全部解けて一安心。