13
Secure Software Lab. 1 TaintDroid:An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones 고고 고고고고고 2013 고 9 고 23 고 고 고 고 [email protected]

TaintDroid:An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones

  • Upload
    jeroen

  • View
    156

  • Download
    1

Embed Size (px)

DESCRIPTION

TaintDroid:An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones. 고급 운영체제론. 2013 년 9 월 23 일. 이 찬 희. [email protected]. Taint??Taint Analysis??. What is “Taint Analysis”? 기존 PC 에서 사용하던 동적 분석 방식 오염 분석 TaintDroid 안드로이드에서의 오염 분석 도구. Why?. - PowerPoint PPT Presentation

Citation preview

Page 1: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

1

TaintDroid:An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones

고급 운영체제론2013 년 9 월 23 일

이 찬 희[email protected]

Page 2: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

• What is “Taint Analysis”?– 기존 PC 에서 사용하던 동적 분석 방식– 오염 분석

• TaintDroid– 안드로이드에서의 오염 분석 도구

Taint??Taint Analysis??

Page 3: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

• 어플리케이션의 소스 비공개• 스마트폰 내부의 사용자 개인정보는 어디로 ?

Why?

GPS 정보수집 권한 요청 사용자의 허가 GPS 정보 전송

Somewhere Somewhere Somewhere

Page 4: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

• 스마트폰을 위한 경량화된 동적 분석 도구• 애플리케이션을 비신뢰• 기존 PC 에서의 동적 분석 도구와는 달리 전체 프로세스 대상 ( 데이터 공유 등 전부 확인 )

TaintDroid

Page 5: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

• 메소드 변수 , 메소드 인자 , 클래스 정적 필드 , 클래스 인스턴스 필드 , 배열에 대한 taint storage• 32bit 의 비트벡터 (bitvector) 를 이용한 taint

marking• 스택 프레임을 2 배로 확장하여 지역변수들 각각에 taint

tag 를 함께 할당 ( 인덱스가 2 배가 됨 )

Taint Tag Storage

Page 6: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

• 각 Opcode 분류별 Taint Logic 정의Taint Logic

Page 7: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

• 네이티브 코드는 모니터링되지 않음• Taint 추적을 위해 수동적 instrumentation, 휴리스틱 , 메소드 프로필을 사용

Native Code Taint Propagation

• Return 값 전이• 필요한 메소드들만 수동적으로 찾아서 패치 ( 배열 복사 및 자바 리플렉션 관련 )• Android 2.1 에 185 개 Internal VM Methods 이 있고 , 5 개의 메소드 수정

Internal VM Methods

• JNI Call Bridge 를 통해 호출• Call bridge 는 메소드 인자 파싱 , 반환 값 할당• JNI Call Bridge 패치 모든 JNI Methods 들에 대해 Taint 전이 기능 제공• JNI Method 가 리턴하면 , method profile table 에 taint 전이 정보 갱신• Taint profile table 는 (from, to) 의 리스트• Method 인자 , 클래스 변수 리턴 값들 사이의 흐름 정보를 저장

(return value, B method arg 1) 형식• 메소드의 인자들의 TAG 정보들의 모음을 리턴 값에 할당• 현재는 String 과 primitive 타입의 인자들에 대해서만 전이 기능 제공

JNI Methods

Page 8: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

Parcel

IPC Taint Propagation

valTAG

valTAG

Val

TAG

valTAG

TAG

Binder

Page 9: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

Secondary Storage Taint Propagation

파일 수준 전이• 파일 하나당 taint tag 를 하나씩 할당• 파일에 내용이 쓰이면 taint tag 를 갱신• 파일에서 읽으면 변수에 전이• File taint tag 는 파일 시스템의 extended attributes 에 저장• 이를 위해 안드로이드 파일 시스템 (YAFFS2) 와 Sdcard 파일 시스템 (ext2) 를 수정

Page 10: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

Privacy Hook Placement

• 위치 정보는 여러 어플리케이션이 동시에 정보를 받아 사용하며 , 일반적으로 하나의 Manager 를 두고 관리

Low-bandwidth Sensors

• 마이크나 카메라는 요청 시 대량의 데이터를 하나의 어플리케이션에 제공한다 . OS 는 파일이나 버퍼를 이용해 이를 공유High-bandwidth Sensors

• 주소록 , SMS 정보는 파일 데이터베이스 형태로 관리 Information Databases

• phone number, SIM card id, Device id 는 API 를 통해서 획득Device Identifiers

• 네트워크 관련 API 로 Taint 정보를 보내려고 하면 , 잡아서 이벤트로 알림Network Taint Sink

Page 11: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

Performance Evaluation

23.5%

14%

27%

Page 12: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

• 인사이드 안드로이드 ( 송형주 , 위키북스 )• 안드로이드 디벨로퍼

– http://developer.android.com/index.html• AndroidXRef

– http://androidxref.com

Reference

Page 13: TaintDroid:An  Information-Flow Tracking System for  Realtime  Privacy Monitoring on  Smartphones

Secure Software Lab.

Any Question?

Thank you