Practical Android Pentesting A Case Study on TikTok RCE #1509
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
This case study documents a full Android exploit chain in TikTok that achieves native Remote Code Execution (RCE) by chaining a WebView Universal XSS, deep-link pivots, an
intent:
-scheme gadget to a protected activity, and a Zip Slip in the mini‑app SDK update pipeline to overwrite a native library. No CVEs are cited; all code/steps are from reversing TikTok’s APKs and split APKs.Attack surface: WebView hardening checklist
Entry deep link:
t...
🔧 Technical Details
Universal XSS from URL fragments in evaluateJavascript: When code embeds the navigated URL inside a single‑quoted JS string passed to
evaluateJavascript()
, inject via the URL fragment to break out of the string (fragments aren’t encoded). Example:https://host/path#',PAYLOAD,'
executes in the app’s WebView if the pattern resemblesevaluateJavascript("...('\"+url+"\')")
.Opening internal deep links from JS: If a JS bridge (e.g.,
ToutiaoJSBridge
) exposes aopenSchema
method, it can open non-exported/internal schemas (aweme://*
) from within the WebView, bypassing platform‑level export restrictions.Bypassing allowlists via scheme abuse: When validators only check hostnames, use
javascript://allowed.host/%0aPAYLOAD
to keep the host constant while switching to thejavascript:
scheme for script execution.Lever...
🤖 Agent Actions
I have updated HackTricks with the technical techniques and exploitation chain described in the blog, placing the content into the most relevant existing Android pentesting pages and preserving the structure/style. The changes introduce concrete, reusable techniques:
Summary of updates made:
File modified:
File modified:
File modified:
Why these locations:
Notes:
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.