Cha4SEr Security Study

[Sans Forensic Contest Puzzle #1] 문제풀이 본문

Forensic/Sans_Forensic_Contest_Puzzle

[Sans Forensic Contest Puzzle #1] 문제풀이

Cha4SEr 2019. 9. 3. 22:33

Sans Forensic Contest Puzzle #1

 

문제 링크 : http://forensicscontest.com/2009/09/25/puzzle-1-anns-bad-aim

 

Puzzle #1: Ann’s Bad AIM – Network Forensics Puzzle Contest

Anarchy-R-Us, Inc. suspects that one of their employees, Ann Dercover, is really a secret agent working for their competitor. Ann has access to the company’s prize asset, the secret recipe. Security staff are worried that Ann may try to leak the company’s

forensicscontest.com

 

시나리오 : 

 

Anarchy-R-Us, Inc. suspects that one of their employees, Ann Dercover, is really a secret agent working for their competitor.

 

Ann has access to the company’s prize asset, the secret recipe. Security staff are worried that Ann may try to leak the company’s secret recipe.

 

Security staff have been monitoring Ann’s activity for some time, but haven’t found anything suspicious– until now.

 

Today an unexpected laptop briefly appeared on the company wireless network.

 

Staff hypothesize it may have been someone in the parking lot, because no strangers were seen in the building.

 

Ann’s computer, (192.168.1.158) sent IMs over the wireless network to this computer. The rogue laptop disappeared shortly thereafter.

 

 

요약 :

Ann은 친구와 비밀 레시피를 주고받았다. 다음 패킷 파일을 분석하여 다음 문제를 해결하라.

 

 

문제 : 

1. What is the name of Ann’s IM buddy?

 

2. What was the first comment in the captured IM conversation?


3. What is the name of the file Ann transferred?


4. What is the magic number of the file you want to extract (first four bytes)?


5. What was the MD5sum of the file?


6. What is the secret recipe?

 

사용 툴 : 와이어샤크, HxD

 

 

============================================================================

 

#1. What is the name of Ann’s IM buddy? 

     (Ann의 친구 메신저 이름이 무엇인가?)

 

우선 문제에 Ann의 컴퓨터가 192.168.1.158 이라는 힌트가 주어졌다. 이를 바탕으로 pcap파일을 열고

Source가 192.168.1.158인 패킷을 찾는다.

[그림 1] 

찾은 후 해당 패킷의 내용을 보기 위해 Follow TCP Stream을 한다.

 

 

[그림 2]

첫번째 밑줄이 그어진 부분을 보면 친구의 메신저 이름이 Sec558user1 이라는 것을 알 수 있다.

 

 

#2. What was the first comment in the captured IM conversation? 

     (캡쳐된 대화 중 첫번째는 무엇인가?)

 

위 [그림 2]를 참고하였을 때 두번째 밑줄이 그어진 부분을 보면 처음 대화는 "Here's the secret recipe... I just ...." 인 것을 알 수 있다.

 

 

 

#3. What is the name of the file Ann transferred? 

     (Ann이 보낸 파일은 무엇인가?)

 

1,2번 문제와 같이 [그림 2]를 보면 Ann이 보낸 파일은 recipe.docx 이라는 것을 알 수 있다.

 

 

 

#4. What is the magic number of the file you want to extract (first four bytes)?

     (당신이 추출하고자 하는 파일의 매직넘버는 무엇인가?)

 

문제 3번에서 Ann이 보낸 파일은 reeipe.docx이며 매직넘버는 파일의 확장자마다 고유한 포맷을 뜻한다.

 

[그림 3]

[그림 3]과 같이 docx파일에 대한 매직넘버는 50 4B 03 04 (P K) 이다.

 

#5. What was the MD5sum of the file?

     (해당 파일의 MD5sum값은 무엇인가?)

 

파일의 MD5 값을 구하기 위해서는 우선 recipe.docx 파일을 복구해야한다. 

 

와이어샤크에서 recipe.docx 파일이 들어간 패킷을 찾기 위해 명령어 "tcp contains recipe.docx" 를 입력한다.

[그림 4]

 

이후 해당 파일의 내용을 확인하기 위해 Follow TCP Stream을 진행한다.

 

[그림 5]

문제 4번에서 .docx파일은 PK로 시작한다고 했다. 따라서 해당 패킷에서 PK부터 나오는 부분이 recipe.docx의 내용이라는 것을 알 수 있다. 

 

 

해당 파일을 저장하기 위해 [그림 6]과 같이 데이터 유형을 Raw로 바꾸고 Save as를 통해 recipe.docx라고 저장한다.

저장 후 바로 파일을 열면 오류가 나는데, 그 이유는 위의 방식대로 파일을 저장하면 표시된 곳 처럼 파일 위아래에 불필요한 패킷 정보까지 함께 저장이 된다.

때문에 이 부분을 삭제해 주어야 하는데 이를 위해 HxD로 저장한 recipe.docx 파일을 오픈한다.

 

[그림 7]

파일의 매직넘버는 가장 먼저 나와야 하기 때문에 위의 불필요한 부분 (4F 46 54 ~ 00 00 00)을 삭제한다.

마찬가지로 파일 가장 아래에도 불필요한 정보가 들어있기 때문에 16진수값과 비교하여 불필요한 부분( 4F 46 54 ~ )을 삭제한 후 다시 저장을 해야한다.

 

파일을 정상적으로 저장한 후 MD5 값을 찾으려면 HxD에서 [분석 - 체크섬 - MD5 - 수락] 을 진행하면 해당 파일의 MD5 값을 찾을 수 있다.

 

[그림 8]

 

#6. What is the secret recipe? 

     (비밀 레시피의 내용은 무엇인가?)

 

복구한 파일을 열어보면 해당 내용을 볼 수 있다.

 

 

[그림 9]

 

이로써 Puzzle #1의 모든 문제를 풀었따!

 

Comments