Puzzle #2: Ann Skips Bail

네트워크 포렌직 #2 풀이 입니다.
http://forensicscontest.com/2009/10/10/puzzle-2-ann-skips-bail

http://forensicscontest.com/contest02/evidence02.pcap
MD5 (evidence02.pcap) = cfac149a49175ac8e89d5b5b5d69bad3

1. What is Ann’s email address?

sneakyg33k@aol.com

smtp로 필터 후 [Follow TCP Stream] 메뉴를 통해 확인할 수 있다.

2. What is Ann’s email password?

558r00lz

BASE64로 인코딩 되어 있어 디코딩 하면 확인할 수 있다.

3. What is Ann’s secret lover’s email address?

mistersecretx@aol.com

메일을 두번 발송했으나 첫번째 사람에게는 약속을 미루었고 두번째 사람에게 sweetheart! 라는거 보니.....

4. What two items did Ann tell her secret lover to bring?

fake passport, bathing suit

위 이미지에서 확인할 수 있다.

5. What is the NAME of the attachment Ann sent to her secret lover?

secretrendezvous.docx

6. What is the MD5sum of the attachment Ann sent to her secret lover?

9e423e11db88f01bbff81172839e1923

Follow TCP Stream 부분에서 첨부파일 데이터 부분이 Base64로 인코딩 되어 있음을 알 수 있다.

따라서 해당 데이터 부분만 따로 짤라내어 message.txt 파일로 저장 후 아래 스크립트로 디코딩 할 수 있다.

#!/usr/bin/python
import base64

input = open('message.txt', 'r')
data = input.read()

decode = base64.b64decode(data)

output = open('secretrendezvous.docx', 'wb')
output.write(decode)

디코딩 한 파일의 md5 값은 아래와 같다.

7. In what CITY and COUNTRY is their rendez-vous point?

docx 파일을 열어보면 아래와 같다.

8. What is the MD5sum of the image embedded in the document?

aadeace50997b1ba24b09ac2ef1940b7

docx 문서에 포함된 이미지를 따로 뽑아내는 스크립트는 아래와 같다.

#!/usr/bin/python

file = open('secretrendezvous.docx', 'rb')
data = file.read()

png = open('output.png', 'wb')
flag = 0
for x in range(len(data)):
    #.PNG
    if hex(ord(data[x])) == '0x89':
        if hex(ord(data[x+1])) == '0x50':
            if hex(ord(data[x+2])) == '0x4e':
                if hex(ord(data[x+3])) == '0x47':
                    flag = 1
    #ENDB`
    elif hex(ord(data[x])) == '0x45':
        if hex(ord(data[x+1])) == '0x4e':
            if hex(ord(data[x+2])) == '0x44':
                if hex(ord(data[x+3])) == '0xae':
                    if hex(ord(data[x+4])) == '0x42':
                        if hex(ord(data[x+5])) == '0x60':
                            if hex(ord(data[x+6])) == '0x82':
                                for y in range(7):
                                    png.write(data[x+y])
                                break
    if flag == 1:
        png.write(data[x])

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다