Security & Hacking

Android Security - exported 편

zeroone-kr 2025. 2. 16. 17:23

 

안드로이드에서 app component는 actiivties, servcies, broadcaset receivers, content providers가 있다.

이 4가지 모두 entry point가 될 수 있다. 

 

Activities 

[1] 역할: 사용자가 직접 interaction하는 UI를 제공

[2] 보안: exported=true이면, 다른 앱에서 클래스 이름으로 activity를 시작 가능

원래 바로 접근이 되어서는 안되는 activity가 켜질 수 있음

 ex) am start -n com.android.banking/.ActivityName 

[3] 기본값: 기본적으로 exported=false

[4] 관련 xml tag: <activity>

 

Services

[1] 역할: 장기간 백그라운드 작업에 많이 사용

[2] 보안: exported=ture이면, 다른 앱에서 서비스를 호출 가능

[3] 기본값: filter가 없으면, 기본적으로 exported=false

[4] 관련 xml tag: <service>

 

Broadcast receivers

[1] 역할: system이 혹은 다른 앱이 보내는 event(e.g., 배터리 낮음, 화면 꺼짐, 켜짐, 기타 앱이 보내는 이벤트 등) 를 수신할 수 있음 

[2] 보안: exported=true이면, system이 아닌 곳에서 오는 message들을 수신 가능

[3] 기본값: service와 마찬가지로 filter가 없으면 기본적으로 exported =false

[4] 관련 xml tag: <receiver>

 

Content providers

[1] 역할: private 데이터에 다른 앱의 접근을 허락하는 역할을 한다. 예를 들어, 사진 앱을 생각해보면 됨

[2] 보안: content URI를 통해 데이터 접근 가능

[3] 기본값: api level 16이하로는 true로 인식되고, api level 17이상 부터 exproted=false

[4] 관련 xml tag: <provider>

 

[시간 나면 계속 수정 예정]

 

https://developer.android.com/guide/components/fundamentals?hl=en

https://developer.android.com/guide/topics/manifest/activity-element?hl=en

https://developer.android.com/guide/topics/manifest/service-element?hl=en

https://developer.android.com/guide/topics/manifest/receiver-element?hl=en

https://developer.android.com/guide/components/intents-filters

https://developer.android.com/guide/topics/manifest/provider-element

 

 

acitivity를 잘 못 사용한 케이스를 다루는 글

https://medium.com/@markoeltiger8/what-is-exported-true-in-android-manifest-6280113a47ce

'Security & Hacking' 카테고리의 다른 글

Heap exploit  (0) 2025.03.08
3 types of embedded systems  (0) 2025.03.03
command injection  (0) 2025.02.11
CodeQL  (0) 2025.02.11
00_angr_find  (0) 2025.02.10