0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

hideme picoCTF (Writeup)

0
Posted at

【picoCTF】[hideme] Writeup

問題概要

  • Category: Forensics

Description:

Every file gets a flag.
The SOC analyst saw one image been sent back and forth between two people. They decided to investigate and found out that there was more than what meets the eye here.

日本語訳:

すべてのファイルにはフラグが付けられます。
SOCアナリストは、ある画像が2人の間でやり取りされているのを確認しました。調査を行ったところ、そこには一見しただけではわからない何かがあることが判明しました。


解法のプロセス(アプローチ)

1. ファイルの確認と調査

まずはダウンロードしたファイル(flag.png)を確認します。
flag.png

見た目はpicoCTFのロゴ画像ですが、問題名の「hideme(私を隠して)」というヒントから、画像の中に別のデータが埋め込まれている可能性が高いと推測できます。
まずは binwalk コマンドを使って、ファイルの中に別のファイルが結合されていないか確認します。

binwalk flag.png

実行結果:

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             PNG image, 512 x 504, 8-bit/color RGBA, non-interlaced
41            0x29            Zlib compressed data, compressed
39739         0x9B3B          Zip archive data, at least v1.0 to extract, name: secret/
39804         0x9B7C          Zip archive data, at least v2.0 to extract, compressed size: 2869, uncompressed size: 3024, name: secret/flag.png
42908         0xA79C          End of Zip archive, footer length: 22

結果を見ると、PNG画像データの後に Zip archive data(ZIPアーカイブ) が隠されていることが分かりました。中には secret/flag.png というファイルが含まれているようです。

2. ファイルの抽出(binwalk -e)

見つかった隠しファイルを抽出するために、binwalk の抽出オプションを使用します。

binwalk -e flag.png

💡 コラム:-e オプションについて
-e は --extract の略です。ファイルの中に含まれている既知のファイルタイプ(今回はZIP)を自動的に切り出し、現在のディレクトリに抽出してくれます。

実行すると、_flag.png.extracted という名前のディレクトリが作成されます。その中へ移動して内容を確認してみましょう。

cd ./_flag.png.extracted
ls

実行結果:

.:
29  29.zlib  9B3B.zip  secret

./secret:
flag.png

secret ディレクトリの中に、もう一つの flag.png が入っていました。

3. フラグの獲得

抽出された secret/flag.png を開いてみます。

flag.png

画像の中にフラグが記載されていました!

Flag:
picoCTF{Hiddinng_An_imag3_within_@n_ima9e_cda72af0}

⚠️ 注意: 画像から手入力する場合、タイポに注意しましょう。特に 9(数字のきゅう)と g(小文字のジー)、@(アットマーク)などが間違いやすいポイントです。


お疲れさまでした!

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?