TryHackMe(THM):Juicy Details
目次
- Task 1 Introduction
- Task 2 Reconnaissance
- Task 3 Stolen data
- What section of the website did the attacker use to scrape user email addresses?
- Was their brute-force attack successful? If so, what is the timestamp of the successful login? (Yay/Nay, 11/Apr/2021:09:xx:xx +0000)
- What user information was the attacker able to retrieve from the endpoint vulnerable to SQL injection?
- What files did they try to download from the vulnerable endpoint? (endpoint from the previous task, question #5)
- What service and account name were used to retrieve files from the previous question? (service, username)
- What service and username were used to gain shell access to the server? (service, username)
この記事は、DeepL翻訳を利用して和訳しています。
このサイトに書かれている攻撃手法は「自分に権利のあるサイト」以外では使用しないでください
Task 1 Introduction
世界最大級のジュースショップのSOCアナリストとして採用されたあなたのネットワークに、攻撃者が侵入してきました。
あなたの任務:
- 攻撃者がどのようなテクニックやツールを使用したかを把握する
- どのエンドポイントに脆弱性があったか
- どのような機密データがアクセスされ、環境から盗まれたか
ITチームから、サーバーのログが入ったZIPファイルが送られてきました。添付ファイルをダウンロードして、"I am ready!"と入力し、仕事に取りかかってください。もう時間がないぞ!
Answer the questions below
Are you ready?
答えは上の説明にあります。
Task 2 Reconnaissance
偵察
提供されたログファイルを分析する。
よく見てください。
- 攻撃者がどのようなツールを使用していたか
- どのエンドポイントを攻撃しようとしていたか
- どのエンドポイントに脆弱性があったか
Answer the questions below
What tools did the attacker use? (Order by the occurrence in the log)
「access.log」ファイルを見ると、攻撃名はほどんど括弧()内に書かれているので、それを列挙すればOKかな?
What endpoint was vulnerable to a brute-force attack?
攻撃に使用したツールのうちブルートフォース攻撃に使用できそうなのは、「Hydra」なので、このツールを使用したログから答えが導き出せます。
What endpoint was vulnerable to SQL injection?
攻撃に使用したツールのうちSQLインジェクションに使用できそうなのは、「sqlmap」なので、このツールを使用したログから答えが導き出せます。
What parameter was used for the SQL injection?
sqlmapが使用されたログを見るとパラメータがわかります。
What endpoint did the attacker try to use to retrieve files? (Include the /)
「access.log」ファイルの最後の方を見ると答えが何となくわかります。
Task 3 Stolen data
盗まれたデータ
提供されたログファイルを分析する。
よく見てください。
- Webサイト上での攻撃者の動き
- レスポンスコード
- 異常なクエリ文字列
Answer the questions below
What section of the website did the attacker use to scrape user email addresses?
スクレイピングとは“データを収集した上で利用しやすく加工すること”です。
ヒントから「ショッピングサイトでお客様がコメントできる場所は?」をもとにaccess.logを見ると、ある特定の文字列「pro****」が見えてきます。
Was their brute-force attack successful? If so, what is the timestamp of the successful login? (Yay/Nay, 11/Apr/2021:09:xx:xx +0000)
ブルートフォース攻撃ということは、access.log内で「/rest/user/login」を確認しているとステータスが以下の2つが大量に出力されてます。
500 Internal Server Error サーバ内部のエラー
401 Unauthorized 未認証
その中で成功のステータスを探せば、答えが出ます。
What user information was the attacker able to retrieve from the endpoint vulnerable to SQL injection?
お客様がコメントできる場所に書き込まれる情報を想像すると、名前やユーザ名などの情報です。ログインに成功するにはその情報と対となる情報が取得できたということです。
その対となる情報の名称名でaccess.logを検索すると、答えが導き出せます。
What files did they try to download from the vulnerable endpoint? (endpoint from the previous task, question #5)
ファイルをダウンロードということで「ftp.log」ファイルを確認すると「[ftp] OK DOWNLOAD」のログが解答結果です。
What service and account name were used to retrieve files from the previous question? (service, username)
vsdftp.logより、使っているサービスはおのずとわかります。
ユーザ名は大体まずこのユーザかadiminなどの管理者アカウントが思いつくと思います。それがログに残っているので解答になります。
What service and username were used to gain shell access to the server? (service, username)
今回ダウンロードした3つのファイルのうち、まだ使ってない「auth.log」ファイルを使います。
authということはあるサービス名が想像できます。
またログの中でユーザ名として想像できる「logname=」で検索するとユーザ名もおのずとわかってきます。
設問はこれで完了!