Chaofan Shou Profile picture
Dec 13 β€’ 7 tweets β€’ 4 min read Twitter logo Read on Twitter
😝 Here is the full disclosure of the Twitter XSS + CSRF vulnerability.

Clicking a crafted link or going to some crafted web pages would allow attackers to take over your account (posting, liking, updating your profile, deleting your account, etc.)
On 12/11, @rabbit_2333 posted details about an XSS on the Twitter subdomain .

analytics.twitter.com
This XSS seems to be nothing beyond alert popper because:

1). Twitter's cookies are HttpOnly, meaning reading them using Javascript is impossible.

2). There are CSRF tokens, so no CSRF attacks.

3). Strict same site policy on , so no CSRF attacks to it. twitter.com
Image
However, I figured out some undocumented endpoints on also support using cookies to access. This means that any XSS on subdomains of Twitter can send requests to and impersonate the user. This solves problems 1 and 3. api.twitter.com
api.twitter.com

Image
Image
Reverse engineering the JS code of , I found that the CSRF token is just a hash of csrf_id in the cookie. Surprisingly, the csrf_id is not HttpOnly cookie, meaning that subdomain XSS can read this csrf_id and create CSRF tokens. This solves problem 2. twitter.com
Image
And we got the full JS exploit to chain with this XSS vulnerability!

In another word, visiting this link earlier today would take over your account: analytics.twitter.com/mob_idsync_cli…
Image
It is highly irresponsible for Twitter to ignore these security issues and not pay the whitehats. The architecture and design patterns also need to be corrected.

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Chaofan Shou

Chaofan Shou Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @shoucccc

May 9
How to make $800k every day by rug pulling?

A tutorial 🧡[1/7] Image
Create an ERC20 token, preferably with some funky names.

Some examples πŸ‘‡

[2/7] Image
Make your scam token tradeable by creating a liquidity pool (LP). You can use Uniswap / PancakeSwap for this.

You initially need to add ~$50k value of assets to LP to get victims' attention.

[3/7] Image
Read 8 tweets
May 8
gg! Our fuzzer can solve all challenges automatically in <16hrs on single core with some fine tunings πŸ”₯πŸ”₯

Will share the writeup

Try it out: github.com/fuzzland/ityfu…
And kudos to @publicqi for solving even faster than the fuzzer and using less gas
and big thank you to @merklejerk @dragonfly_xyz for organizing such a fun CTF!
Read 4 tweets
Apr 20
🈹 Stop buying #pepedao / #pipipump / #bobcoin, owner can rug you.

Scammer deployed >67 malicious tokens. These contracts are obfuscated and designed to bypass @GoplusSecurity & @Token_Sniffer's rugpull analysis.

~$300k funds have already been rugged.

#ScamAlert #rugpull twitter.com/i/web/status/1… Image
@GoplusSecurity @Token_Sniffer So, what's going on?

1. The attacker uses "oowner" to define the owner so that analysis considers the contract has no owner -- really benign in the eye of static analysis! twitter.com/i/web/status/1…
@GoplusSecurity @Token_Sniffer 2. The code for rug pull is inside "transfer" and "Approve" functions, very unconventional.
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(