LoginSignup
0
0

More than 1 year has passed since last update.

picoCTF Scavenger Hunt writeup

Posted at

1. はじめに

ここ2ヶ月ほど、CTFを初めて勉強してるうちにアウトプットも大切と思い、初投稿。picoCTFのwebExploitation分野の問題ScavengerHuntが個人的に為になったという備忘録。

2. Writeup

There is some interesting information hidden around this site http://mercury.picoctf.net:27393/. Can you find it?

リンク先のwebページに隠された情報を見つけられますか?という問題。

アクセスしてみると以下のページが表示される。
2021-09-07.png
Whatのタブを押すと表示内容が以下に変化。

What
I used these to make this site:
HTML
CSS
JS (JavaScript)

ページに情報が隠されているということなのでひとまずF12で開発者ツールを開きソースコードを見てみる。

--- http://mercury.picoctf.net:27393/
 |-- index.html
 |-- mycss.css
 |-- myjs.js

こんな感じのディレクトリ構成をしていた。それぞれのファイルの中にコメントアウトされいる文字列。

<!-- Here's the first part of the flag: picoCTF{t -->

/* CSS makes the page look nice, and yes, it also has part of the flag. Here's part 2: h4ts_4_l0 */

/* How can I keep Google from indexing my website? */

3つ目のフラグは無く、ヒントになりそうな文字列があった。和訳すると、どうやってwebサイトがインデックスされないようにしているか?ということなのでwebサイトをインデックスされないようにする方法を調べる。

Googleにインデックスされない原因と対策方法について

いろいろあるが、フラグを探すということでrobots.txtが怪しい。
http://mercury.picoctf.net:27393/robots.txtにアクセスするとビンゴ!

User-agent: *
Disallow: /index.html
\# Part 3: t_0f_pl4c
\# I think this is an apache server... can you Access the next flag?

まだ次のフラグメントがある模様。Apacheサーバを使っているらしく、Accessが大文字なのでその特徴を調べる。.htaccessというファイルを配置してディレクトリ毎にサーバの設定ができる様子。
http://mercury.picoctf.net:27393/.htaccessにアクセス

\# Part 4: 3s_2_lO0k
\# I love making websites on my Mac, I can Store a lot of information there.

今度のヒントはweb制作にマックを使っているというヒント。Storeが大文字なので関わりありそう。macはファイル作成時に.DS_Storeという隠しファイルを自動生成する。

http://mercury.picoctf.net:27393/.DS_Storeにアクセス

Congrats! You completed the scavenger hunt. Part 5: _d375c750}

フラグが出揃ったので、つなげると以下のようになる

picoCTF{th4ts_4_l0t_0f_pl4c3s_2_lO0k_d375c750}

3. 終わりに

Qiitaへの投稿にハードルの高さを感じていたけど、まずは書いてみることが大切そう。継続していろいろ載せていきたい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0