$ 포렌식 $/$ 포렌식 문제 풀이 $

Digital Forensic Chellenge 2018 IoT100

ws1004 2019. 8. 20. 10:06

2018년에 열렸던 디지털포렌식챌린지(DFC) 대회에서 음성인식 스피커인 Amazon Echo Alexa를 분석 해보자.

 

주어진 데이터는 스마트폰에 연동된 앱에 관한 데이터입니다.

스피커와 연동된 기록을 분석하여 사용자가 어떠한 기록을 남겨 놓았는지 확인해 볼 것 입니다. 

 

문제를 푸는 과정을 찾는 것이 아닌 남겨진 데이터에서 의미있는 데이터가 어떤 것인지에 대해서 찾아야 합니다.

 

시나리오를 한번 확인해 보겠습니다.

 

위의 번역본은 실제 2018 DFC - Amazon Echo Analysis 문제의 번역본이다.

 

위의 시나리오를 한번 보면 용의자의 집에서 스마트 스피커 Amazon Echo를 찾았고, 용의자로 부터 데이터를 획득했지만 Alexa 클라우드에서 모든 데이터를 삭제 했다. 압수한 안드로이드 기반의 스마트폰을 분석한 후에 Alexa와 관련된 아티팩트를 획득할 수 있었고, 신뢰할 수 있는 원본 파일은 용의자가 클라우드 서버에 비밀 키를 숨기려고 했다는 것을 알려준다. 모바일 기기로 부터 비밀 키를 찾아야 한다.

 

Amazon Echo는 사용자로 부터 명령을 받으면 -> 음성을 녹화 해서 Amazon의 Alexa Voice Service(AVS)로 전송된다.

AVS에서 음성을 Alexa가 이해할 수 있는 명령으로 파싱해서 작업을 한다. 그리고 수행 결과를 Amazon Echo로 전송을 한다. 

이때 생기는 모든 로그는 오디오 캐시 파일로 저장.

 

오디오 캐시 파일은 audio_cache 파일 안에 존재 하는데 경로는 다음과 같다.

경로 : com.amazon.dee.app\files\audio_cache

 

내부 파일들을 보면 희한한 확장자를 가지고 있습니다. .0 .1

 

HxD로 열어보면 확장자 .0 파일은MIME 타입의 파일 포맷을 가지고 있는 것을 확인 할 수 있습니다.

HxD로 열어보면 다음과 같습니다.

audio/x-aac 라는 문자열을 가지고 있습니다.

 

MIME 유형이란? MIME라고도 하는 다목적 인터넷 메일 확장은 전자 메일 메시지를 통해서 다양한 유형의 데이터 파일을 교환 할 수 있도록 개발된 인터넷 표준 유형입니다.

audio / x-aac와 같은 MIME 유형은 비디오, 오디오, 이미지 등과 같은 특정 데이터 범주로 분류 됩니다.

 

똑같은 이름의 확장자 .1을 HxD로 열어 보면 다음과 같습니다.

 

파일 시그니처 포맷을 보면 ftypmp42를 보고 mp4파일이라는 것을 확인 할 수 잇습니다.

 

모든 .1 확장자가 ftypmp42 시그니처를 가지고 있기 때문에 다 .mp4로 변환해서 중요한 단서가 있는지 확인해 보겠습니다.

 

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_1fe10afe-86bc-482c-9adf-95031d9a5a0f_tdl49m0erjucu.mp4 : 

W : What's up?

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_4aa5a734-5fbc-4088-9002-8ecfc432ff88_tdl49m0erjucu.mp4 : 

W : Are you enjoying this chellenge?

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_82b3ec23-23a8-4e38-956d-6a46cf287129_tdl49m0erjucu.mp4 : 

M : Sure.

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_87c9b144-e21a-43d1-a746-22a7799f5125_tdl49m0erjucu.mp4 : 

W : Ask me if you're not sure how to do it.

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_99e1d8f4-244c-44f9-bd0c-1693ff4fc8d6_tdl49m0erjucu.mp4 : 

M : I'm well. How are you?

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_293ddd17-adb7-479f-a89a-12df9f9e8a86_tdl49m0erjucu.mp4 : 

W : You can also find useful hint from lists.

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_1458e301-545b-4e21-9339-ba3fe010e0e4_tdl49m0erjucu.mp4 : 

W : Did ou just get to the office?

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_2640da8b-d29d-4fd2-af66-3e8a6e245b38_tdl49m0erjucu.mp4 : 

W : I am your father.

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_acaef923-01de-48e7-8ed2-72e79da0b745_tdl49m0erjucu.mp4 : 

W : Remember, focusing on about and thirteen.

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_bacf8cda-cb54-49b3-b6f2-38125e967f53_tdl49m0erjucu.mp4 : 

W : Did you find conversations between me and Alexa?

arn_alexa_messaging_na__mediastorageservice_amzn1_tortuga_3_e18d56fb-0f9f-4eed-b1d5-187389a1051e_tdl49m0erjucu.mp4 : 

W : Did you find conversations between me and Alexa?

 

 

W : What's up?

W : Are you enjoying this chellenge?

M : Sure.

W : Ask me if you're not sure how to do it.

M : I'm well. How are you?

W : You can also find useful hint from lists.

W : Did ou just get to the office?

W : I am your father.

W : Remember, focusing on about and thirteen.

W : Did you find conversations between me and Alexa?

W : Did you find conversations between me and Alexa?

 

위의 음성에서 대화 내용을 확인해 보면 list, thirteen, Alexa와의 대화내용 이라는 힌트를 얻을 수 있다.

 

먼저 list 에 관련된 자료는 Shopping list와 Todo list가 있다.

또한 Alexa와의 대화 내용은 웹을 통해 데이터가 전달 됬을 것이라 추정되므로 Web View Cache파일에서 흔적을 찾을 수 있습니다.

 

Web View Cache 파일을 찾아서 분석해 보겠습니다. 

 

경로 : com.amazon.dee.app\cache\org.chromium.android_webview

 

파일을 HxD로 열어서 한번 확인해 보았습니다.

 

File Header signature는 30 5C 72 A7 1B 6D FB FC 이고 File Footer signature는 D8 41 0D 97 45 6F FA F4 입니다.

 

파일 구조는 다음과 같습니다 

Header signature

[8byte]

(30 5C 72 A7 1B 6D FB FC)

Unk

[4Byte]

(05 00 00 00)

Unk

[4Byte]

(xx xx xx xx)

Unk

[4Byte]

(xx xx xx xx)

Unk

[4Byte]

(00 00 00 00)

URL

 

 

Data

 

 

Footer signature

[8byte]

(D8 41 0D 97 45 6F FA F4)

Unk

[4Byte]

(03 00 00 00)

Unk

[4Byte]

(xx xx xx xx)

Unk

[4Byte]

(F4 10 00 00)

Unk

[4Byte]

(00 00 00 00)

첫번째 파일인 00a7d85c384caa72_0 의 URL을 보면

https://alexa.amazon.com/api/namedLists/YW16bjEuYWNjb3VudC5BR1hKQkY2N0pSRU1NSENKU0JTVDVLUUpBWkhRLVNIT1BQSU5HX0lURU0=/items?startTime=&endTime=&completed=&listIds=YW16bjEuYWNjb3VudC5BR1hKQkY2N0pSRU1NSENKU0JTVDVLUUpBWkhRLVNIT1BQSU5HX0lURU0%3D&_=1532662178037

이렇게 되어 있습니다. url 형식을 한번 알아 보겠습니다. 

 

https://alexa.amazon.com/api/<API category>/<listId>/items?startTime=&endTime=&completed=&listIds=<listId>&_=<UnixTime>

 

 

Web View Cache분석은 API category 별로 HxD를 사용해서 데이터 추출 과 압축 해제후, 생성된 json파일을 Sublilme Text 도구로 확인.

 

첫번째 파일인 00a7d85c384caa72_0을 기준으로 보면 

 

gzip 파일의 헤더 시그니처는 1F 8B 로 시작하고, gz파일이 끝나면 data가 오기 때문에 이를 감안해서 파일을 추출.

그리고 해당 파일을 새파일에 복사 해서 .gz 파일로 만들면 다음과 같은 파일이 압축 파일 내부에 존재합니다.

맨위 파일이므로 1.gz으로 파일명을 작성하고 열어보면 

 

이렇게 1이라는 파일이 존재하고 해당 파일을 분석해보면

JSON data라고 합니다.

 

파이썬 코드를 이용해서 gz파일을 카빙해 보겠습니다.

해당 모든 파일들을 .json를 넣어서 들어있는 파일을 확인해 보면 다음과 같습니다.

 

이처럼 파일들이 있습니다.

파일을 하나씩 확인해 보면 다음과 같습니다.

 

이처럼 추출 가능한 파일 모두를 추출하겠습니다.

 

Alexa API : nameLists

nameLists는 Shopping List 또는 Todo List 에 사용자가 말한 아이텐이나 할 일을 추가하는 API이다.

 

completed : 명령 수행의 성공 여부

createdDateTime : 쇼핑 목록 생성 시각

updatedDateTime : 쇼핑 목록 업데이트 시각

value : 쇼핑목록에 추가된 아이템 이름 문자열

 

 

위의 사진을 보면 thirteen watermelons , thirteen peaches 를 확인 할 수 있다.

 

그리고 리스트 관련 힌트를 토대로 json 파일에서 한번 찾아 보겠습니다. 

 

time sequence is very important in digital forensics 

=> 디지털 포렌식에 있어서 시간 순서는 매우 중요하다.

 

Focus on about

=> about에 초점을 두어라.

 

Get Acronyms from the endmost words

=> 마지막 단어로 부터 바로앞 글자를 가져와라

 

Are you curious?

=> 궁금하니?

 

 

i will find the key!!!!

=> 나는 키를 찾을 것이다.

 

 

Are you familiar with the UserAssist key?

=> UserAssist key에 익숙합니까?

 

Rotate each character you found

=> (직역) Rot13 알고리즘을 이용해서 디코딩 혹은 인코딩을 해야한다.

 

라는 힌트들을 list 에서 얻을 수 있습니다.

 

Alexa API 중에서 activities에 해당하는 데이터를 확인해 보면 사용자의 명령어가 존재 합니다.

 

creation Timestamp : 사용자가 Alexa에게 명령을 내린 시각

description : Alexa가 사용자의 명령을 파싱한 문자열

 

위의 힌트를 보면 디지털 포렌식에 있어서 시간 순서는 중요하다. 라는 말을 보면 creation Timestamp에 따라 정렬을 하면 될것같습니다.

 

how was your day

what time is it now

is a hot dog a sandwich

tell me a joke

who is the leader singer of coldplay

how are you

what's the alphabet

do you know about love

do you know about remeo

tell me about fox

tell me a what i want to hear

let's have fun

yes

echo stop

what's the weather in seoul

how many super heroes are there

tell me a superhero joke

echo set an alarm at seven a.m.

who's your favorite soccer player

how far away is the moom

name any smart

do you know about lima

do you know about bravo

do you know about hotel

give me a meal idea

give me a meal idea

what songs can you sing

who is the highest paid actor

what's the question of the day

what's the question of the day

echo stop

sing a camp fire song

stop

echo help me relax

sleep sound

what is the price of bitcoin

when is the next solar eclipse

echo what's the history behind new year's lure ledger lotions

what's the most popular movie

how many days until winter

do you know about baker

do you know about hypervisor

what do you think about actor

do you know about quebec

compliment me

compliment me

stop

echo how old was yoda

who are you a role models

echo what's trending

let's barbecue

who inspires

how old are you

echo when is fall

who's your favorite author

where does rain come from

beatbox for me

who's your favorite hobby

what is your mission

play sunday morning music

play hoilday music

do you know about genius

powerful tablet

thin laptop

thirteen peaches

thirteen watermelons

 

이 데이터를 토대로 Key 값을 찾을 수 있습니다.