2014年1月27日月曜日

SECCON2013 online writeup - ここはどこ? フォレンジックス 100

SECCON2013 online の writeup です。
フォレンジックの100点問題、ここはどこ?です。
問題はForensicist.datというファイルを渡されて解答せよというもの。「ここはどこ?」と聞かれているので場所を特定して回答するものと仮定しフォレンジックを進めます。

まずは渡されたファイルの種類を調べるため file コマンドで調べます。

forensics100# file Forensicist.dat 
Forensicist.dat: RFC 822 mail text

中身は mail なのでテキストとして表示させます。


「答:○○○○○○ ○○○」とあり、panda.tif というファイルが添付されています。そこで、添付ファイルを取り出してみます。
まず base64 でエンコードされている部分をテキストファイルとして抜き出します(SUkから最後の=まで)
そのファイルをバイナリデータへデコードします。今回はこのサイトを使ってデコードしました。デコードされたファイルがダウンロードされるのでそのファイルを調べます。

forensics100# file base64.bin 
base64.bin: TIFF image data, little-endian

画像ファイルのようです。ファイルを確認します。


パンダでした。
このままではわからないので Google の画像検索か Exif だろうと見当をつけて調べると、Exif 情報にGPS情報がありました。画像 Viewer のプロパティか exiftool コマンドで確認できます。

forensics100# exiftool base64.tiff 
ExifTool Version Number         : 7.89
File Name                       : base64.tiff
Directory                       : .
File Size                       : 132 kB
File Modification Date/Time     : 2014:01:27 16:13:53+09:00
File Type                       : TIFF
MIME Type                       : image/tiff
Exif Byte Order                 : Little-endian (Intel, II)
Subfile Type                    : Full-resolution Image
Image Width                     : 229
Image Height                    : 172
Bits Per Sample                 : 8 8 8 8
Compression                     : LZW
Photometric Interpretation      : RGB
Make                            : Apple
Camera Model Name               : iPhone 4S
Strip Offsets                   : (Binary data 80 bytes, use -b option to extract)
Orientation                     : Horizontal (normal)
Samples Per Pixel               : 4
Rows Per Strip                  : 13
Strip Byte Counts               : (Binary data 69 bytes, use -b option to extract)
X Resolution                    : 96.012
Y Resolution                    : 96.012
Planar Configuration            : Chunky
Resolution Unit                 : inches
Software                        : 5.0.1
Modify Date                     : 2012:02:02 02:02:02
Predictor                       : Horizontal differencing
Extra Samples                   : 2
Y Cb Cr Positioning             : Centered
About                           : uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b
Creator Tool                    : 5.0.1
Exposure Time                   : 1/120
F Number                        : 2.4
Sub Sec Time Original           : 00
Sub Sec Time Digitized          : 00
Exposure Program                : Program AE
GPS Latitude Ref                : North
GPS Longitude Ref               : East
GPS Altitude Ref                : Above Sea Level
GPS Img Direction Ref           : True North
GPS Img Direction               : 45.17590361
ISO                             : 64
Exif Version                    : 0221
Date/Time Original              : 2012:02:02 02:02:02
Create Date                     : 2012:02:02 02:02:02
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/120
Aperture Value                  : 2.4
Brightness Value                : 5.861211392
Metering Mode                   : Multi-segment
Flash                           : Off, Did not fire
Focal Length                    : 4.3 mm
Subject Area                    : 1631 1223 881 881
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 3264
Exif Image Height               : 2448
Sensing Method                  : One-chip color area
Exposure Mode                   : Auto
White Balance                   : Auto
Digital Zoom Ratio              : 4.366263794
Focal Length In 35mm Format     : 35 mm
Scene Capture Type              : Standard
Sharpness                       : Normal
Padding                         : (Binary data 2060 bytes, use -b option to extract)
Aperture                        : 2.4
GPS Altitude                    : 23 m Above Sea Level
GPS Latitude                    : 24 deg 59' 55.00" N
GPS Longitude                   : 121 deg 34' 52.00" E
GPS Position                    : 24 deg 59' 55.00" N, 121 deg 34' 52.00" E
Image Size                      : 229x172
Scale Factor To 35 mm Equivalent: 8.2
Shutter Speed                   : 1/120
Create Date                     : 2012:02:02 02:02:02.00
Date/Time Original              : 2012:02:02 02:02:02.00
Circle Of Confusion             : 0.004 mm
Field Of View                   : 54.4 deg
Focal Length                    : 4.3 mm (35 mm equivalent: 35.0 mm)
Hyperfocal Distance             : 2.08 m
Light Value                     : 10.1

これで緯度が 24 deg 59' 55 経度が 121 deg 34' 52 とわかりました。これを Google マップで調べればいいのですが、10進法表記しか対応しておらず度分秒のままでは使えません。そのため Google の提供しているヘルプサイトを使って変換してやります。


これで10進法表記の座標が 24.998611, 121.581111 とわかりました。ただ実際には百分率表記 = 度 + (分/60) + (秒/3600)という計算式を使ってもう少し正確にだしたほうがよさそうです。この場合は

緯度 24.99861111
経度 121.5811111

となります。これをもとに Google map で検索すると次のようになります。



答えはTaipei Zooでした。

0 件のコメント:

コメントを投稿