How The Self-Retweeting Tweet Worked: Cross-Site Scripting (XSS) and Twitter

Sdílet
Vložit
  • čas přidán 29. 08. 2024
  • tomscott.com - / tomscott - It should never have happened. Defending against cross-site scripting (XSS) attacks is Web Security 101. And yet, today, there was a self-retweeting tweet that hit a heck of a lot of people - anyone using Tweetdeck, Twitter's "professional" client. How did it work? Time to break down the code. (Remember the old Myspace worms? They worked the same way.)
    THE SELF-RETWEETING TWEET: / 476764918763749376

Komentáře • 3,6K

  • @Radium_Alarie
    @Radium_Alarie Před 3 lety +1606

    7 years later, the creator's account is still around, and this is his pinned tweet

    • @jamesharding3459
      @jamesharding3459 Před 2 lety +42

      Awesome

    • @CodaMission
      @CodaMission Před 2 lety +31

      What a flex

    • @crewrangergaming9582
      @crewrangergaming9582 Před 2 lety +8

      why shouldn't it be

    • @MeiinUK
      @MeiinUK Před rokem +2

      If it is removed, the market will crash.... OooOoooOoooOoo... But I think some bigger sandboxes have been created now, hasn't it ? We can relax.

    • @Jessev741
      @Jessev741 Před rokem +9

      He outlived Twitter

  • @kopissimooo
    @kopissimooo Před 8 lety +5339

    "I'm simplifying massively, here..." is Tom's catch-phrase.

    • @Karaboo7
      @Karaboo7 Před 7 lety +248

      Tom thinks we're dumb. (and he's correct)

    • @joshbuck1586
      @joshbuck1586 Před 7 lety +5

      *_-why-_*

    • @kaaaallll
      @kaaaallll Před 6 lety +45

      "So today we're talking about the physics of a swing set and *im simplifying massively here* ..."

    • @oliversmith1842
      @oliversmith1842 Před 6 lety +33

      Nah it’s definitely “AND it works!”

    • @sacchar1n3
      @sacchar1n3 Před 5 lety +2

      ON MERCH

  • @chris-hayes
    @chris-hayes Před 4 lety +5525

    What I find so hilarious about this they could've done anything. This gave the initial tweeter the power to log into any Twitter account using Tweetdeck in the world, send every twitter user to a website for ad-revenue, show an ad, do literally anything. No, they made it retweet itself because it would be funny.

    • @JetFalcon710
      @JetFalcon710 Před 4 lety +1086

      They made the tweet as a warning to the Devs, and didn't want to do anything malicious

    • @__8120
      @__8120 Před 4 lety +188

      Anything as long as it fit into 140 characters

    • @chris-hayes
      @chris-hayes Před 4 lety +503

      @@__8120 linking an external script wouldn't have that constraint, could've written a novel.

    • @78Shockwave87
      @78Shockwave87 Před 3 lety +292

      That’s being a responsible programmer. An experienced coder has the power to potentially cause a LOT of damage, but it’s the ability to decide whether or not to do the right thing with said knowledge which is important. They did the (almost) right thing and disclosed the bug in a mostly non-destructive way. It’s the whole “just because you can doesn’t mean you should” argument.
      TL;DR - Not all programmers are dicks who want to break everything!

    • @ammyvl1
      @ammyvl1 Před 3 lety +51

      @@__8120 No you can just do

  • @naverilllang
    @naverilllang Před 6 lety +9176

    It looks like this guy made the code as a warning to the devs to fix it, and not malicious.

    • @Mr.FastZombie
      @Mr.FastZombie Před 4 lety +228

      It did not happen in this case it seems, but even when it is non-malicious sometimes they still try to punish you.

    • @JulzDrogenstube
      @JulzDrogenstube Před 4 lety +158

      the problem is, someone experienced who sees this might do a haarmful tweet just like this, before twitter shuts the feature down. I'd still do it for the fun of it though

    • @JesusMowsMaLawn
      @JesusMowsMaLawn Před 4 lety +298

      @@JulzDrogenstube Right, but that's exactly why this tweet needed to be made. If Andy never made the tweet and twitter didn't know about it, then someone could've done something malicious. Security through obscurity does not work

    • @58book
      @58book Před 4 lety +80

      @@JesusMowsMaLawn A call/email/message to twitter support could have been made. That way the cybersecurity team could have fixed it privately. Publicly exploiting the bug could have attracted people with malintent.

    • @JesusMowsMaLawn
      @JesusMowsMaLawn Před 4 lety +317

      ​@@58book Nine times out of ten they just ignore your message. With this tweet, they were forced to fix it immediately, hopefully before anything malicious could be done
      Obviously I'm not going to say if it was objectively right or wrong, because I'm not the judge of that, but I personally feel that this was justified

  • @mayu-go3gz
    @mayu-go3gz Před 3 lety +583

    the heart emoji was actually necessary because it took advantage of how that unicode was processed by tweetdeck at the time

    • @thaichicken0210
      @thaichicken0210 Před rokem +5

      how so?

    • @Zlysium
      @Zlysium Před rokem +38

      @@thaichicken0210 Tweetdeck did sanitize user input except for a bug with emoji that broke the sanitation.
      Without the emoji the XSS didn't work.

    • @Sage_the_Turt
      @Sage_the_Turt Před 6 měsíci +1

      @@thaichicken0210 from the author: "The ❤ was one of the UTF8 characters that got an visual upgrade that day. Before the update it would've displayed in the same font & color as the rest of the tweet. With the released update it was turned into an inline image. To display that HTML code was allowed within a tweet"

  • @datar0t273
    @datar0t273 Před 5 lety +5958

    "find the parents" ...
    I've been trying

  • @KorvusAracen
    @KorvusAracen Před 9 lety +5827

    You know, if you think about it, this probably wasn't done with any malicious intent. The guy probably read the changelog for the emoji update, noticed the massive security hole it caused, and because a report to Tweetdeck's developers would take very long to notice or get a response (and in that time somebody could do something truly problematic with it), he made it incredibly and immediately noticeable with a completely innocuous script. What a nice guy!

    • @chsxtian
      @chsxtian Před 9 lety +447

      ***** Rather this than something that shows a fake login form or secretly mines your data

    • @vengefulenigma
      @vengefulenigma Před 7 lety +25

      didn't the guy get like 5 years in prison or something like that for this?

    • @RWoody1995
      @RWoody1995 Před 7 lety +315

      since the account has still been tweeting since (and the tweet itself wasn't even so much as removed) i doubt it.

    • @baymax1550
      @baymax1550 Před 7 lety +143

      white hat+illegal stuff = grey hat
      good intention then he is a nice guy :)

    • @quakducc2274
      @quakducc2274 Před 5 lety +12

      @92Dups would YOU want someone rummaging around with your websites code with no idea on there intent?

  • @SiveenO
    @SiveenO Před 4 lety +1800

    ->doesn't sanitize user input
    ->something bad happens
    ->surprised magic cat face

    • @alicialay166
      @alicialay166 Před 4 lety +9

      Ik u didn't ask but I'm taking gcse computer science and the fact that I understood this comment makes me really happy, thanks

    • @dexterhaxxor
      @dexterhaxxor Před 4 lety +15

      @@chy4e431
      That's called sanitazation.

    • @dexterhaxxor
      @dexterhaxxor Před 4 lety +21

      @@chy4e431 sanitizing user input means replecing special characters with escape sequences, such as
      '

    • @cameronwebster6866
      @cameronwebster6866 Před 3 lety

      Mrs. Roberts would be proud.

    • @stroopwafelfalafel
      @stroopwafelfalafel Před 3 lety +14

      did you just call pikachu a magic cat?

  • @jacobjp5487
    @jacobjp5487 Před 5 lety +10408

    I swear Tom Scott is that cool subsitute teacher you never got Edit: thanks for all of the likes! I never imagined that I would get so much attention.

  • @-anton
    @-anton Před 8 lety +5192

    I'm happy he didn't use it for something malicious.

    • @thesmellofpinetrees7688
      @thesmellofpinetrees7688 Před 8 lety +394

      It's kinda sad he didn't make it retweet something offensive about a politician.

    • @operator8014
      @operator8014 Před 8 lety +334

      All modern politicians are offensive enough on their own, there's no more that it could have done.

    • @gredangeo
      @gredangeo Před 7 lety +88

      Just follow a politician on Twitter if you feel like reading some obnoxious tweets. There are some really stupid people out there.

    • @BlockOfRed
      @BlockOfRed Před 6 lety +18

      I know him, he's a nice guy and very friendly :)

    • @kuipert4195
      @kuipert4195 Před 6 lety +16

      @MikatGaming yes, if the website or app is not properly protected from it. That script would most likely be longer than the maximum allowed characters though.

  • @willdedoo6529
    @willdedoo6529 Před 3 lety +845

    I ADORE how Tom talks about big scale companies like the Lockpicking lawyer talks about lock designers

  • @109Rage
    @109Rage Před 3 lety +435

    Just gonna point out that TweetDeck *did* sanitize their user input usually, but in this one case, the emoji broke something inside of TweetDeck's sanitation software, and so the script was rendered as a true script tag. There are often bugs like this, where in some edge case, the "safeties" are accidentally turned off, and a lot of cyber attacks revolve around finding these bugs, and exploiting them.

    • @oscarpetersson5324
      @oscarpetersson5324 Před 2 lety

      Hey, what is that flag in your profile picture?

    • @109Rage
      @109Rage Před 2 lety +8

      @@oscarpetersson5324 Anarcho-Texas.

    • @oscarpetersson5324
      @oscarpetersson5324 Před 2 lety

      @@109Rage oh, thanks

    • @PwnZombie
      @PwnZombie Před 2 lety +1

      Under anarchism you'd be dying of typhoid under a rock.

    • @109Rage
      @109Rage Před 2 lety +7

      @@PwnZombie under capitalism, you instead >checks notes<
      die of starvation before having to worry about typhoid.

  • @mckennacisler01
    @mckennacisler01 Před 9 lety +1774

    Despite being an attack and all (and the fact he could have just sent a request for a longer script), kudos to him for programming a retweeting tweet that could fit in 140 characters!

    • @sundhaug92
      @sundhaug92 Před 9 lety +85

      He could've just linked to an external script

    • @KobraArboc
      @KobraArboc Před 9 lety +168

      sundhaug92 *cough*(and the fact he could have just sent a request for a longer script)*cough*

    • @uuu12343
      @uuu12343 Před 6 lety +17

      Mckenna Cisler
      Very true, I'm actually just impressed he managed to do that

    • @hanshearth7745
      @hanshearth7745 Před 6 lety +1

      *what*

    • @antediluvianspy5371
      @antediluvianspy5371 Před 6 lety +64

      I don't believe his intentions were malicious I believe he was just pointing out an error in a way someone who isn't being paid to do so should.

  • @pugpuggle3327
    @pugpuggle3327 Před 5 lety +3963

    "It should nevernevernevernevernevernever be turned off" *everyone tries code like CZcams forgot that never^6*

    • @wolbobus2130
      @wolbobus2130 Před 5 lety +221

      I think i just had a stroke while trying to read that.

    • @jimmyjim5yearsago376
      @jimmyjim5yearsago376 Před 5 lety +62

    • @mothlastname2413
      @mothlastname2413 Před 5 lety +14

      Or you could not because its a felony to even attempt it

    • @evaahh9584
      @evaahh9584 Před 4 lety +52

      TIMΞ СнΛИGΣ which law exactly? Because there are very few things that are illegal to even attempt that aren’t just a separate crime.

    • @stacklysm
      @stacklysm Před 4 lety +14

      @@wolbobus2130 Lmao, I was starting to get angry at myself for not understanding

  • @JontyLevine
    @JontyLevine Před 2 lety +700

    2014: _"Some fairly significant disruption to what has unbelievably become an important part of how the world communicates. Worrying, isn't it?"_
    2021: This is one of the LEAST worrying things about Twitter.

    • @antfarmer2227
      @antfarmer2227 Před 2 lety +65

      2022: It Got Worse!

    • @silasunger
      @silasunger Před rokem +36

      @@antfarmer2227 now: it got *even* worse

    • @toludaree
      @toludaree Před rokem +4

      @@silasunger 🤣😂

    • @southernflatland
      @southernflatland Před rokem +12

      @@toludaree I see you folks are staying warm watching the dumpster fire too... 😂

    • @eTiMaGo
      @eTiMaGo Před rokem +5

      @@southernflatland how much worse can it get? we'll find out :p

  • @jackdavenport5011
    @jackdavenport5011 Před 5 lety +139

    Additional technical note: At 5:21, the closing script tag isn't optional as he is sorta implying. It is required for the attack to work, otherwise the rest of the page would also be inside the script tag and it would ruin both the attack and the web page :)

  • @iirelu
    @iirelu Před 10 lety +66

    The biggest and most important detail of this bug is that whatever they used to parse unicode emoji into pictures accidentally made the rest of the tweet get read as HTML. The heart was the most crucial part of that tweet.

  • @GogiRegion
    @GogiRegion Před 5 lety +2995

    People in the comments trying out as if filtering out XSS isn’t cyber security 101 level stuff.

    • @Jono997
      @Jono997 Před 5 lety +407

      Tfw you forget the video revolves around someone forgetting that 101.

    • @nuklearboysymbiote
      @nuklearboysymbiote Před 5 lety +233

      It should nevah evah evah evah evah evah evah evah evah happen

    • @markloydcatalo
      @markloydcatalo Před 5 lety +24

      -test-

    • @MrJaniman12
      @MrJaniman12 Před 5 lety +37

      *what do you mean by that?*

    • @yojoehojo4291
      @yojoehojo4291 Před 4 lety +20

      I mean, making everything bold is harmless.

  • @GibusWearingMann
    @GibusWearingMann Před 7 lety +1118

    Andy's profile picture and tweet still exist on Twitter. He's changed his profile picture to a different Fluttershy, even.

    • @user-cl6jp5vj1g
      @user-cl6jp5vj1g Před 4 lety +11

      oof where

    • @myjorts
      @myjorts Před 4 lety +64

      i know this comment is dead, but link in description to self-retweeting tweet

    • @yanis7336
      @yanis7336 Před 4 lety

      Hi

    • @zyugyzarc
      @zyugyzarc Před 3 lety +1

      a flutter- what?

    • @GibusWearingMann
      @GibusWearingMann Před 3 lety +3

      @@zyugyzarc the yellow pegasus pictured is named Fluttershy. Also, the tweet is still up four years later.

  • @Sollace
    @Sollace Před 5 lety +2749

    Up next: The self-liking CZcams video.

    • @0_-
      @0_- Před 4 lety +14

      please do that

    • @inactive6200
      @inactive6200 Před 4 lety +47

      Well someone did make a CZcams video that knows it’s own url

    • @p0xygen
      @p0xygen Před 4 lety +31

      @@inactive6200 thats very easy though..multiple people have done it years ago and it's not an exploit

    • @Slave-of-the-most-merciful
      @Slave-of-the-most-merciful Před 4 lety +9

      I hate your pfp

    • @h-Films
      @h-Films Před 4 lety +16

      Master I hate u

  • @DonVitoCS2workshop
    @DonVitoCS2workshop Před 7 lety +581

    "worrying isn't it?"
    *starts grinning*

  • @TheCanterlonian
    @TheCanterlonian Před 8 lety +213

    What a nice guy to not do anything malicious with this knowledge. He specifically did a harmless thing instead of querying usernames and injecting stuff to release password hashes. A really nice guy and deserving of recognition.

  • @thenerdyouknowabout
    @thenerdyouknowabout Před 8 lety +788

    That's a marvellous little bit of code... Simple but elegant in its execution :)

    • @theywalkinguptoyouand4060
      @theywalkinguptoyouand4060 Před 7 lety +7

      Why do I use marvelous (not marvellous) but also cancelled (not canceled) ?

    • @Dorumin
      @Dorumin Před 6 lety +4

      It's also jQuery, and it sucks :D
      (I'm kidding, it has its uses, but I like to avoid it)

    • @abdelrahmangamalmahdy
      @abdelrahmangamalmahdy Před 6 lety

      With plane JS, the code wouldn't run on twitter xD

    • @thebaseandtriflingcreature174
      @thebaseandtriflingcreature174 Před 5 lety +1

      A simple spelly,yet quite unbreakable.

    • @danlarkman2450
      @danlarkman2450 Před 4 lety

      Despite several attempts,methods,techniques & even the people pretending to be hackers I've encountered,i was finally refereed to this hacker on Instagram who finally gave me all i wanted from my partners mobile phone.If you are in the same shoe as me,i'm referring you to his Instagram page for help[@elitecoding007]..

  • @znefas
    @znefas Před 4 lety +1064

    I've never seen Tom so angry, seriously.

    • @Netugi
      @Netugi Před 4 lety +58

      You should check out some of his Computerphile videos, like timezones, internationalis(z)ation, and electronic voting. Those are the rants of the century.

    • @extrahourinthepit
      @extrahourinthepit Před 4 lety +26

      I’ve read him that angry, certainly.
      Really shouldn’t have sent him that email.

    • @extrahourinthepit
      @extrahourinthepit Před 4 lety +16

      To those wondering whether I’m joking, I’m not. I REALLY should not have sent him that email

    • @trubiso
      @trubiso Před 4 lety +3

      @@extrahourinthepit ???????????

    • @nilen
      @nilen Před 3 lety

      Google Cendrum Yep, the email was of bad character

  • @deanobeany
    @deanobeany Před 4 lety +50

    I don't really understand what we're talking about here, but I know that the filter should never ever ever ever ever EVER have been off.

    • @xlorrix-6320
      @xlorrix-6320 Před 3 lety +1

      yep never ever ever ever ever EVER turned off

  • @Selur91
    @Selur91 Před 9 lety +294

    That guy, the one who made the self-retweeting tweet was awfully nice, with the abilty to run a script in your browser he could have redirected you to an add, or even place it on your page and make tons of money, or make you download a virus, or anything else they wanted. Note:those or are the mathematical one, not the normal one.

    • @coolguy284_2
      @coolguy284_2 Před 5 lety +3

      @maskyschannel dang, i know, because its totally false. modern js parsers are better than that, with all the exploits fixed

    • @coolguy284_2
      @coolguy284_2 Před 5 lety +2

      not anything else, bc javascript is a limited language

    • @danlarkman2450
      @danlarkman2450 Před 4 lety

      Despite several attempts,methods,techniques & even the people pretending to be hackers I've encountered,i was finally refereed to this hacker on Instagram who finally gave me all i wanted from my partners mobile phone.If you are in the same shoe as me,i'm referring you to his Instagram page for help[@elitecoding007].

    • @joshyoung1440
      @joshyoung1440 Před rokem +2

      @@danlarkman2450 referees? Shoes? My word association algorithm thinks you're looking for soccer cleats. Is this correct? Oh, no, you don't wear shoes, because you're a bot

  • @HolyEcoly
    @HolyEcoly Před 5 lety +139

    5 years later and CZcams is finally recommending me this.

  • @glitcher880
    @glitcher880 Před 9 lety +94

    I like how he's so into what hes saying lol "you shoudn't ever ever ever everrr..."
    He explains so well, really good job man! Keep up your perfect work :)

  • @HaustierYui
    @HaustierYui Před 7 lety +299

    A very good and easy to understand explanation of XSS. Very worthwhile watching. Keep up the good work.

    • @Tagglink
      @Tagglink Před 4 lety +3

      The explanation of XSS should be credited to the person who wrote the tweet. That was their purpose.

  • @BananaLizard
    @BananaLizard Před 3 lety +33

    tom isn't angry, he's just disappointed.

  • @astro4355
    @astro4355 Před 7 lety +4733

    ❤️

  • @edsrule
    @edsrule Před 7 lety +16

    Doing the math, working off the screenshot from the BBC Twitter at 0:18, that tweet got roughly 108 retweets per second on average. I'm sure the actual rate was exponential and not linear, but that's still devastatingly impressive.

  • @imperialfish454
    @imperialfish454 Před 5 lety +665

    "jQuery ... and it works!"
    yo citation needed on that one because jquery has done it's best to disprove that statement.

    • @Puzzelism
      @Puzzelism Před 4 lety +10

      beauty

    • @Asdayasman
      @Asdayasman Před 4 lety +69

      There are two versions of jQuery - the current version, and vulnerable versions.
      And the current version is also vulnerable - we'll find out how in, say, two weeks.

    • @TheLukasz032
      @TheLukasz032 Před 3 lety

      With all ES6 and ES7 additions, there is currently no reason to use JQuery at all. Except if someone actually enjoys its counterproductive syntax that violates all OO-languages (which JS actually is) principles.

    • @LibertyMonk
      @LibertyMonk Před 2 lety

      @@Asdayasman plus there's jquery-latest which hasn't been up-to-date in years, because people were abusing it.

    • @Asdayasman
      @Asdayasman Před 2 lety

      @@TheLukasz032 While I agree that JQuery should be discarded from maintained projects and never included into new projects, I disagree with your implication that "OO" means "better".

  • @azenetmc
    @azenetmc Před 10 lety +176

    AFAIK, the heart was mandatory for the injection to work.

    • @MandrakeHorse
      @MandrakeHorse Před 10 lety +155

      Emoji support was added to Tweetdeck only two days ago, which they managed to screw up by not processing them safely. Without the heart emoji stuck on after the closing script tag, the tweet would have been sanitised and all would have been well.

  • @Banditxam4
    @Banditxam4 Před 4 lety +24

    As a guy who's just learning about JavaScript this video was recommended at the perfect time

  • @debjitpaul8580
    @debjitpaul8580 Před 4 lety +238

    Neverevereverevereverever
    - Tom Scott

  • @ArturoStojanoff
    @ArturoStojanoff Před 10 lety +8

    I don't know if you're still making them, but I am a linguistics enthusiast and I have to say your videos on that topic are ABSOLUTELY BRILLIANT. Seriously they're amazing.
    Cheers.

  • @BakerbrothertvOfficial
    @BakerbrothertvOfficial Před 10 lety +320

    So anybody who looked at the tweet retweeted it?

    • @Fennoman12
      @Fennoman12 Před 10 lety +76

      Yes.

    • @BakerbrothertvOfficial
      @BakerbrothertvOfficial Před 10 lety +35

      It's a shame that you can only tweet 140 characters otherwise he could have done a lot more!

    • @TomScottGo
      @TomScottGo  Před 10 lety +195

      ***** The thing is, you can do a lot more: you only need about twenty characters to embed an external script file hosted elsewhere. That file can be as long as you like, as long as the hosting's up to it...

    • @BakerbrothertvOfficial
      @BakerbrothertvOfficial Před 10 lety +20

      They could have had it retweet an advert and wrote @justinbieber @ pewdiepie

    • @JackBond1234
      @JackBond1234 Před 7 lety +5

      Though, most browsers have something called the same-origin policy, which will automatically block any attempts to load an external javascript file from a different domain than the page you're on. Typically the best you'll get out of an XSS attack these days is unfiltered input from a form, or from the URL string (a "reflected" vulnerability), or if you're lucky, you'll find a situation like the one in the video where you save your malicious code on the server, and it's loaded up even on simple pages, and neither when you save it, nor when you load it does it filter out risky characters (a "persistent" vulnerability)

  • @jauxro
    @jauxro Před 2 lety +6

    Breaking Twitter while decked out in a fancy little Fluttershy profile pic,

  • @VoidSixx
    @VoidSixx Před 8 lety +894

    Just for everyone here trying to use HTML in their comments, etc. doesn't work in the comments. You need to use Google's tags
    *Bold* - put * either side of the text
    _Italics_ - put _ either side of the text
    -Strikethrough- - put - either side of the text

  • @Nixitur
    @Nixitur Před 8 lety +17

    I'm pretty happy to see that *andy was apparently not banned and is actually still actively tweeting. They also link followers to your video for explanation which is nice.

  • @SanicStudios
    @SanicStudios Před 5 lety +159

    “Im oversimplifying here”
    “never ever EVER”
    “Well done (insert name here)”

  • @haider4899
    @haider4899 Před 8 lety +817

    never EVER EVER EVA EVAAAAA

    • @paintspot
      @paintspot Před 7 lety +9

      GETTING BACK TOGETHER
      -Paintspot Infez
      Wasabi!
      Like if you agree
      Reply if you've heard of me

    • @Stallnig
      @Stallnig Před 5 lety +1

      Fo eva? For eva eva?

  • @jamesdaniel4975
    @jamesdaniel4975 Před 4 lety +20

    I came back now, 6 years later and now I'm able to analyze all of this by myself. I sure learned lots about HTML, JavaScript etc

    • @sethadkins546
      @sethadkins546 Před 4 lety +1

      Welcome to the team

    • @mushahidhussain1516
      @mushahidhussain1516 Před 3 lety

      Hahaha, same here. I had watched this video before but didn't understand it much. Now that I have learned HTML, JS and much more, I can understand it all.

  • @MisterOptimous
    @MisterOptimous Před 5 lety +49

    Sanatizing outputs is actually so tedious as you need to do it litterally anywhere where an individual might have touched a string.

  • @Echo024
    @Echo024 Před 5 lety +407

    I bet Andy’s real name is Robert “Bobby” Tables
    XKCD #327

    • @ausnetting
      @ausnetting Před 5 lety +38

      I love little Bobby tables!

    • @elliottsampson1454
      @elliottsampson1454 Před 4 lety +17

      Actually in XKCD 342 it says that Bobby was not much for computers unlike his mother and sister

  • @dannya5690
    @dannya5690 Před 7 lety +31

    "I'm overly simplifying this"
    > Bonds text
    Tom, tom, please.

  • @warpedmjia
    @warpedmjia Před 4 lety +51

    “And then, just to be lovely, a heart.”

  • @skhtrm
    @skhtrm Před 9 lety +404

    Love how the original tweet has a Fluttershy profile picture

    • @skhtrm
      @skhtrm Před 9 lety +2

      Iggy Tubmen ?

    • @Chrnan6710
      @Chrnan6710 Před 8 lety +34

      +Iggy Tubmen Hey look, a tweet by a brony. Let's ignore what the tweet says and hate on something that ISN'T EVEN RELEVANT!

    • @commentator3513
      @commentator3513 Před 8 lety

      +BigGamer2525 You should go back to school.

    • @BigGamer2525
      @BigGamer2525 Před 8 lety +3

      SquidPlays no ur a back to school night

    • @commentator3513
      @commentator3513 Před 8 lety

      BigGamer2525 Your grammar is atrocious. What are you, 9?

  • @Bildungsromancuddy
    @Bildungsromancuddy Před 5 lety +52

    1:40 The Dangerous thing, the really dangerous thing is that he’s filming with blinds behind him which makes everything Moiré-aey

  • @Shazzkid
    @Shazzkid Před 5 lety +27

    "worrying, isn't it?" Tom said with a smile...

  • @uuhamm
    @uuhamm Před 10 lety +4

    Just to be clear: the solution to preventing XSS is not to sanitize input and remove something that looks like an html tag. The solution is to correctly encode text before you spit it out into an HTML document.

  • @hats1642
    @hats1642 Před 3 lety +9

    As of March 2021, the original tweet is still up!

  • @leBAT54
    @leBAT54 Před 2 lety +1

    Wait, I just realized that the tweet got sent at 5pm (UK) but you still managed to upload that video on that day.
    Big cheers Tom!

    • @MeiinUK
      @MeiinUK Před rokem

      Suspicious isn't it ? In "real time" !

  • @arooobine
    @arooobine Před 8 lety +2183

    $('.xss').for(int i = 0; i < script.size(); i++){alert("How to make someone read nonsense code.");}END IF

    • @Lou_0b1
      @Lou_0b1 Před 8 lety +28

      Can you actually increment and decrement with js?

    • @Akronymus_
      @Akronymus_ Před 8 lety +214

      of course you can. thats one of the most basic instructions

    • @commentator3513
      @commentator3513 Před 8 lety +136

      How do you think cookie clicker works? That thing is pure js

    • @Lou_0b1
      @Lou_0b1 Před 8 lety +23

      Commentator Instead of increment you could just say X=X+1.

    • @itsthesola10
      @itsthesola10 Před 7 lety +41

      END IF

  • @xtzyshuadog
    @xtzyshuadog Před 10 lety +6

    I learned some HTML, CSS, and JavaScript. And now I learned what $ means. Thank you.

  • @CZghost
    @CZghost Před 4 lety +1

    Hey, this is actually very clever way to spread the word. Making an XSS script as a test if it actually works, and it then turns into a self retweeting tweet. Fits nicely into the limited space and lets the users know about it and they don't even need to spread it further, the script does that for them automatically. Nice.

  • @DuncanJMcMillan
    @DuncanJMcMillan Před 9 lety +28

    I like the guy who tweeted this, he was like, ha! Bug! Time to screw with people while also helping the community!

  • @kenkenowo420
    @kenkenowo420 Před 4 lety +3

    looks like when I have to take my programming class for college I'll be coming back to you for anything

  • @BailsDaCableMan
    @BailsDaCableMan Před 6 lety +79

    wait till Tom hears about the root user without a password in MACOS High sierra

    • @ryannorthup3148
      @ryannorthup3148 Před 3 lety +1

      Or the fact that there's an exploit in Windows 10 to create a user with admin privileges through the recovery boot command line (X:).

    • @realjameskii
      @realjameskii Před 3 lety

      @@ryannorthup3148 well that would have been nice to know regaining access of my computer

    • @abc-li7cq
      @abc-li7cq Před 3 lety +4

      @@ryannorthup3148 and on Linux you can add init=/bin/sh to your boot options.
      Needless to say, if you have physical access to a computer you can do a lot more than people would assume.

    • @nodell8729
      @nodell8729 Před 3 lety

      @@ryannorthup3148 Again? Like c'mon windows, it has been already in 7

  • @jarnMod
    @jarnMod Před 10 lety +200

    alert('Yeah, I know it wont work');

    • @Axel-ro7dn
      @Axel-ro7dn Před 9 lety +12

      Here's why: special characters (like < which are needed for tags) are replaced by entities. They render the same as '

    • @raskr8137
      @raskr8137 Před 6 lety

      I find a smiley!
      ;

  • @Megapixel8063
    @Megapixel8063 Před 5 lety +3

    You’re way better at cop,wining code than my actual computer science teacher. If you made a Java programming tutorial I would be doing way better in this class.

  • @Isaac_Stuart
    @Isaac_Stuart Před 2 lety +2

    Well, it came back again across the internet in 2021, Tom way ahead of the game again

  • @RevsAndWheels
    @RevsAndWheels Před rokem +4

    Normies : Self-Retweeting Tweet
    CS Students : Recursive Tweet

  • @kaylasolace
    @kaylasolace Před 8 lety +25

    I love how the person who made this is a brony

  • @jmejuniper
    @jmejuniper Před 3 lety

    I already knew about JQuery and HTML and CSS, etc. but that little bit of code and your explanation helped me learn SO much JQuery

  • @Alex_Eicher
    @Alex_Eicher Před 3 lety +12

    2:19 This is where someone starts to sweat...
    2:23 Twitter is hiring new people

  • @adamweishaupt3733
    @adamweishaupt3733 Před 8 lety +167

    does anyone *know* how to change the _font_ on a -CZcams- -Google+- apparently CZcams again comment?

  • @tech0494
    @tech0494 Před 3 lety

    I have taken many courses about bug Bounty, but this guy is the only one who explained it crystal clear 🔥❤️

  • @Fennoman12
    @Fennoman12 Před 10 lety +18

    Great video Tom! Quick to put out and quality content, as usual. But wouldn't they have to actively remove it for that filter to drop off? Was it a spelling error or did someone do it on purpose? Hrm...

    • @thepiggrinder
      @thepiggrinder Před 10 lety +2

      Was not expecting to find you here! Computer science ftw :D

    • @joeytje50
      @joeytje50 Před 10 lety +5

      Generally, the most likely cause of XSS in professional websites is someone adding an output without first filtering it. So, if someone creates a new kind of output, like when they implement a new way of adding emojis for example, and they forget to add the encoding command, it will create a vulnerability. This doesn't mean the filter was turned off manually, but it was simply forgotten when adding a new feature.

    • @Fennoman12
      @Fennoman12 Před 10 lety +2

      joeytje50 ah, true. You'd think that a filter like that is in the in the base-tweet, and not on smaller parts that make out the tweet. I mean a simple htmlentities() could have prevented this from happening as a whole.

    • @joeytje50
      @joeytje50 Před 10 lety +1

      Fennoman yeah it could have, but it only takes _one_ mistake to be completely vulnurable to XSS. If someone forgets that once, they're vulnurable.
      And I don't know what their internal structure is, so I can't say how they could have prevented it. Simply removing any < and > wouldn't work though, because then you'd also filter out all the tags required for the emojis.

    • @RonWolfHowl
      @RonWolfHowl Před 10 lety

      joeytje50 You could make an exception.

  • @dcallstar51
    @dcallstar51 Před 10 lety +4

    You should do a follow-up on what the author could have done if he was more malicious. Perhaps he could have redirected people to another page on Twitter with more malicious tweets. The initial tweet would just retweet and redirect, then subsequent tweets would do things like follow/unfollow people, steal cookies, collect account information, include other scripts, maybe even mine bitcoin or send a bunch of requests to a specific server (DDoS).

  • @alien4320
    @alien4320 Před 7 měsíci

    Andy even recommended this video to someone who wanted an explanation. Does not seem malicious at all. He brought attention to the error.

  • @johnnysteward709
    @johnnysteward709 Před 3 lety +3

    Tom Scott hasn't aged a day in 6 years

  • @lukenoble2539
    @lukenoble2539 Před rokem +3

    Correction: how the self-reXing X worked: Cross-Site Scripting (XSS) and X

  • @shugaroony
    @shugaroony Před 4 lety

    Love Tom's channel, but there is nothing duller than programming.

  • @bettercalldelta
    @bettercalldelta Před rokem +3

    The fix is literally replace "

  • @jeffirwin7862
    @jeffirwin7862 Před 8 lety +31

    That is some impressive code golf '); DROP TABLES CZcams;--

  • @My1xT
    @My1xT Před 7 lety

    this is a good reminder. it isnt like when building a site completely from the beginning that there's some kind of preinstalled filter you have to turn off to make the xss possible but you have to check any user input and html-escape it yourself, something that can quickly be forgotten when doing MANY other security things, like storing passwords safely and so on.

  • @PattyManatty
    @PattyManatty Před 5 lety +3

    I think you could have gone into more detail about *why* this is so important. Your viewers may just shrug off a self-retweeting treat as something kind of benign, and it is. But the tweet could have done so much more, like stealing login sessions of the user. This reason this is a big deal is because it exposes an XSS vulnerability, not that someone's tweet can retweet

  • @Gunbudder
    @Gunbudder Před 8 lety +60

    does anyone actually communicate with twitter? or do they just all talk at the same time and hope everyone else is listening?

    • @the1exnay
      @the1exnay Před 6 lety +4

      That's how i use CZcams

  • @hazardeur
    @hazardeur Před rokem

    this is as emotional as i have ever seen this guy get. it's a topic dear to his heart

  • @TaiTheDoggo
    @TaiTheDoggo Před 10 lety +5

    Oh, hey look. Its Fluttershy!
    But seriously: That is something that should not have happened.
    Thats one basic thing the QA should have checked: HTML-Injections (It can be pretty harmless but would have been enough to see this error.)
    Many Frameworks that are used now a days even do that for you. They just don't let this happen.
    But still it happens now and then that someone finds an error in a well know and well used software, where other Software-Devs just ask 'How could have this happened?'

  • @sarahlikestreez
    @sarahlikestreez Před 4 lety +2

    I watch your videos because they make me feel smart.

  • @FyonixYT
    @FyonixYT Před rokem +6

    3:17 sippin on orphan tears

  • @PwinoP
    @PwinoP Před 8 lety +804

    *im gay*

    • @TGKcraft
      @TGKcraft Před 8 lety +19

      _me too_

    • @Alex-pf4ps
      @Alex-pf4ps Před 8 lety +84

      thats not how it works
      the html tags wouldnt appear if it worked
      silly goose

    • @Lou_0b1
      @Lou_0b1 Před 8 lety +102

      He did that on purpose, so people try to put in the

    • @phgoil
      @phgoil Před 8 lety +18

      *i'm not*

    • @taxevasionconnoisseur4499
      @taxevasionconnoisseur4499 Před 7 lety +26

      *_-bold italic strikethrough-_*

  • @zachogilman7397
    @zachogilman7397 Před 7 lety

    More HTML:
    is a paragraph
    is a break between paragraphs
    serves as italics
    serves as bold
    Makes you type in the title font of your page
    is a divider inside text
    I could go on and on, but I won't.

    • @groszak1
      @groszak1 Před 5 lety

      both , , and are newlines

  • @Minitomate
    @Minitomate Před 4 lety +14

    This is what I call self-promoting a tweet.

  • @jbcrocuta4236
    @jbcrocuta4236 Před 4 lety +4

    @Tom Scott: i just found this video even though i subscribed years ago. anyway: the twitter account still exists and his tweet as well, its pinned actually.

  • @cole5411
    @cole5411 Před 5 lety

    Honestly, I learned more about code in this video than most tutorials on here

  • @PhillipH-san
    @PhillipH-san Před 8 lety +5

    Nice profile pic there, Andy! Lmao

  • @lewinskydan
    @lewinskydan Před 8 lety +546

    _test_

    • @TomScottGo
      @TomScottGo  Před 8 lety +136

      I've no idea how you did that, but you appear to have successfully got tags into a CZcams comment. If you can do that consistently, with more than just the tags, then report it to CZcams's security team quick. If you're the first (and you don't abuse it or cause damage), there will be a significant bug bounty coming your way.

    • @lewinskydan
      @lewinskydan Před 8 lety +136

      +Tom Scott I didn't _actually_ write in italics by using test, but by using _ test _ without the spaces, the same way you'd write *test* with * test * or -test- with - test -, so there's no reason to worry.
      By the way, I just discovered your channel, and I love your videos. You can explain things in a very understandable and witty way, keep up the great work!

    • @Mmouse_
      @Mmouse_ Před 8 lety +34

      +Tom Scott youtube looks for action characters and formats text appropriately _as_ *you* -can- _see_ *here*

    • @alexw28349
      @alexw28349 Před 8 lety

      +Max Mouse (Mmouse) _wow_

    • @LilShpee
      @LilShpee Před 8 lety +4

      +Tom Scott you can do *this* in youtube by putting the word in asterisks(these things ->*)

  • @Wraithling
    @Wraithling Před 6 lety +139

    i love how the person who actually did that was a brony

  • @heronfountain6215
    @heronfountain6215 Před 4 lety +6

    I wish I knew how to switch my handwriting to that font.

  • @keaare9478
    @keaare9478 Před 6 lety

    Tom Scott had just forgot about acustics, i mean this should never happen, this is video basics 101 and yet here we are

  • @TwoGoblinsInATrenchCoat
    @TwoGoblinsInATrenchCoat Před 5 lety +3

    Thanks. I'm an idiot, so it's nice to be walked through the process of how it all went down.

  • @JoseGonzalez-rt5fk
    @JoseGonzalez-rt5fk Před 7 lety +20

    Is it weird that I smelled the sharpie he was writing with and I thought he was using a pen? I did not have any open sharpie near me either.

  • @alluviumboar
    @alluviumboar Před 4 lety +4

    Wait
    Tom writes H like a backwards N

  • @KingDevyn
    @KingDevyn Před 9 lety +9

    So, what exactly did this do? Did the people who posted it flood their profile with hearts and cause the servers to crash or something?

    • @Vengir
      @Vengir Před 9 lety +18

      Luckily, one person can only retweet once per tweet. Everyone had only one retweeded heart on their profile, but it spread like virus: if you visited with Tweet Deck either the original profile OR other profile that already retweeted, you would retweet as well.

  • @Maffoo
    @Maffoo Před 9 lety +82

    ?? You mean , Tom! Deprecation yo.

    • @Yacliveable
      @Yacliveable Před 9 lety +11

      And !

    • @calaphone1
      @calaphone1 Před 9 lety +6

      NaiveAmoeba WORKS TOO YA KNOWWW!!!!!!

    • @Maffoo
      @Maffoo Před 9 lety +10

      David Yue You do know what I mean by deprecation, yeah? As in, works, but it won't forever; they will deprecate it. has been highly recommended for use for *years* because "bold" is a stylistic attribute whilst "strong" is a functional one, hence the separation of layout and style.

    • @Maffoo
      @Maffoo Před 9 lety +4

      Tim Stahel Browsers still show tags as being bold, but not necessarily forever. The idea is that you can override it, and make something that's "strong" by making it bigger, or a different colour, or anything. It isn't tied in with a specific visual type. It also means that it's more descriptive of its function rather than style. For example, what does "bold text" mean to a blind person? Nothing. What does "strong" or "emphasised" language mean? Exactly what it says on the tin. That's the idea, and although it's mostly about terminology, it's the early stages of separating lots of stuff out so that it has the same meaning for all devices, people, etc and is more future-proof!

    • @kraio-sfu
      @kraio-sfu Před 6 lety +8

      Nothing like adding unnecessary bytes!

  • @UltimatePerfection
    @UltimatePerfection Před 5 lety +1

    That's why in all my web projects (consisting mainly of simple cms and highscore system for few freeware games) I've filtered it out server-side (there's that htmlspecialchars php function - basically it replaces quotes and angle brackets with their &something; equivalents, also prevents SQLi as a bonus, very useful) just to be sure.