-
[InsecureShop] Weak Host ValidationAndroid/InsecureShop 2025. 4. 1. 16:38
약한 호스트 검증
지난번 글과 동일하게 WebViewActivity에서 Host검증을 약하게 하는 취약점입니다.
WebViewActivity
if (StringsKt.equals$default(uri.getPath(), "/webview", false, 2, null)) { Intent intent2 = getIntent(); Intrinsics.checkExpressionValueIsNotNull(intent2, "intent"); Uri data2 = intent2.getData(); if (data2 == null) { Intrinsics.throwNpe(); } String queryParameter = data2.getQueryParameter("url"); if (queryParameter == null) { Intrinsics.throwNpe(); } Intrinsics.checkExpressionValueIsNotNull(queryParameter, "intent.data!!.getQueryParameter(\"url\")!!"); if (StringsKt.endsWith$default(queryParameter, "insecureshopapp.com", false, 2, (Object) null)) { Intent intent3 = getIntent(); Intrinsics.checkExpressionValueIsNotNull(intent3, "intent"); Uri data3 = intent3.getData(); data = data3 != null ? data3.getQueryParameter("url") : null; }
해당 path가 /webview일 경우 이전과 마찬가지로 url을 parameter를 통해 입력받습니다.
저번과 다른점은 queryParameter가 insecureshopapp.com으로 끝나야 한다는 점입니다.
insecureshopapp.com로 끝나기만 하면 되기 때문에 쉽게 우회할 수 있습니다.
adb shell am start -a android.intent.action.VIEW -d "insecureshop://com.insecureshop/webview?url=https://naver.com/insecureshopapp.com"
'Android > InsecureShop' 카테고리의 다른 글
[InsecureShop] Intent Redirection (Access to Protected Components) (1) 2025.04.01 [InsecureShop] Arbitrary Code Execution (0) 2025.04.01 [InsecureShop] Insufficient URL Validation (1) 2025.04.01 [InsecureShop] Hardcoded Credentials (0) 2025.04.01 [InsecureShop] 시작하기 (0) 2025.03.30