Facebook JavaScript SDK and Facebook plugins (Math.random ca... #1780
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 post is a Meta bug-bounty write-up showing how a DOM XSS sink in the Facebook JavaScript SDK’s Customer Chat message handler can be turned into a practical Facebook account takeover (ATO) in the Facebook mobile-app webview by chaining: (1) a Facebook-origin message-sending primitive, (2) prediction of a “shared secret” callback generated with
Math.random(), (3) a side-channel leak of PRNG outputs viaiframe window.name, (4) forced regeneration of iframes to obtain ...🔧 Technical Details
g.inform("xd." + a.type, a)) and then a privileged subscriber injects message fields into the DOM (e.g.,d("sdk.DOM").html(node, a.iconSVG)), an attacker who can craft a message that reaches that subscriber can trigger DOM XSS by placing HTML/JS gadget payloads in the injected field (e.g., URL-encoded<img onerror=...>).2) Breaking “shared secret” postMessage validation built on Math.random(): If message authentication relies on a token derived from
Math.random()(e.g.,"f" + (Math.random() * (1<<30)).toString(16)...), and the attacker can observe several outputs from the same PRNG instance, they can use constraint solving (e.g., Z3 against V8 PRNG) to recover/predict outputs and forge valid tokens. If the system emits...🤖 Agent Actions
Summary:
Files Modified:
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.