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

Поделиться
HTML-код
  • Опубликовано: 10 июн 2014
  • 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

Комментарии • 3,6 тыс.

  • @Radium_Alarie
    @Radium_Alarie 2 года назад +1550

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

    • @jamesharding3459
      @jamesharding3459 2 года назад +40

      Awesome

    • @CodaMission
      @CodaMission Год назад +30

      What a flex

    • @crewrangergaming9582
      @crewrangergaming9582 Год назад +6

      why shouldn't it be

    • @MeiinUK
      @MeiinUK Год назад +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 10 месяцев назад +7

      He outlived Twitter

  • @chris-hayes
    @chris-hayes 4 года назад +5495

    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 3 года назад +1080

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

    • @__8120
      @__8120 3 года назад +188

      Anything as long as it fit into 140 characters

    • @chris-hayes
      @chris-hayes 3 года назад +499

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

    • @78Shockwave87
      @78Shockwave87 3 года назад +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 3 года назад +50

      @@__8120 No you can just do

  • @naverilllang
    @naverilllang 6 лет назад +9163

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

    • @Mr.FastZombie
      @Mr.FastZombie 4 года назад +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 4 года назад +160

      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 4 года назад +297

      @@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 4 года назад +81

      @@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 4 года назад +315

      ​@@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

  • @datar0t273
    @datar0t273 4 года назад +5947

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

  • @jacobjp5487
    @jacobjp5487 4 года назад +10416

    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.

    • @xuhuiming2694
      @xuhuiming2694 4 года назад +85

      Jacob JP nevernevernevernevernevernevernever

    • @sxes
      @sxes 4 года назад +14

      Never

    • @lordfrog5740
      @lordfrog5740 4 года назад +20

      substitute*

    • @EddieKMusic
      @EddieKMusic 4 года назад +3

      "cool"

    • @TomboyCEO
      @TomboyCEO 4 года назад +16

      I got those before. One was a jeopardy champion.

  • @Saganpie8922
    @Saganpie8922 9 лет назад +5821

    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 9 лет назад +446

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

    • @vengefulenigma
      @vengefulenigma 7 лет назад +25

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

    • @RWoody1995
      @RWoody1995 7 лет назад +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 7 лет назад +143

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

    • @quakducc2274
      @quakducc2274 4 года назад +12

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

  • @SiveenO
    @SiveenO 4 года назад +1795

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

    • @alicialay166
      @alicialay166 4 года назад +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 3 года назад +15

      @@chy4e431
      That's called sanitazation.

    • @dexterhaxxor
      @dexterhaxxor 3 года назад +21

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

    • @cameronwebster6866
      @cameronwebster6866 3 года назад

      Mrs. Roberts would be proud.

    • @stroopwafelfalafel
      @stroopwafelfalafel 2 года назад +14

      did you just call pikachu a magic cat?

  • @mayu-go3gz
    @mayu-go3gz 3 года назад +567

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

    • @thaichicken0210
      @thaichicken0210 Год назад +5

      how so?

    • @Zlysium
      @Zlysium Год назад +29

      @@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 3 месяца назад +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"

  • @kopissimooo
    @kopissimooo 7 лет назад +5333

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

    • @Karaboo7
      @Karaboo7 7 лет назад +248

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

    • @joshbuck1586
      @joshbuck1586 6 лет назад +5

      *_-why-_*

    • @kaaaallll
      @kaaaallll 6 лет назад +45

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

    • @oliversmith1842
      @oliversmith1842 6 лет назад +32

      Nah it’s definitely “AND it works!”

    • @sacchar1n3
      @sacchar1n3 5 лет назад +2

      ON MERCH

  • @-anton
    @-anton 8 лет назад +5199

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

    • @thesmellofpinetrees7688
      @thesmellofpinetrees7688 7 лет назад +395

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

    • @operator8014
      @operator8014 7 лет назад +334

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

    • @gredangeo
      @gredangeo 7 лет назад +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 6 лет назад +18

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

    • @kuipert4195
      @kuipert4195 6 лет назад +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.

  • @Sollace
    @Sollace 5 лет назад +2752

    Up next: The self-liking RUclips video.

    • @0_-
      @0_- 4 года назад +14

      please do that

    • @inactive6200
      @inactive6200 4 года назад +47

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

    • @p0xygen
      @p0xygen 4 года назад +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 4 года назад +9

      I hate your pfp

    • @h-Films
      @h-Films 4 года назад +16

      Master I hate u

  • @JontyLevine
    @JontyLevine 2 года назад +696

    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 Год назад +64

      2022: It Got Worse!

    • @silasunger
      @silasunger Год назад +36

      @@antfarmer2227 now: it got *even* worse

    • @toludaree
      @toludaree Год назад +4

      @@silasunger 🤣😂

    • @southernflatland
      @southernflatland Год назад +12

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

    • @eTiMaGo
      @eTiMaGo Год назад +5

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

  • @willdedoo6529
    @willdedoo6529 3 года назад +843

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

  • @iirelu
    @iirelu 10 лет назад +65

    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.

  • @pugpuggle3327
    @pugpuggle3327 5 лет назад +3962

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

    • @wolbobus2130
      @wolbobus2130 4 года назад +220

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

    • @jimmyjim5yearsago376
      @jimmyjim5yearsago376 4 года назад +62

    • @mothlastname2413
      @mothlastname2413 4 года назад +14

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

    • @evaahh9584
      @evaahh9584 4 года назад +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 4 года назад +14

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

  • @109Rage
    @109Rage 3 года назад +431

    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 2 года назад

      Hey, what is that flag in your profile picture?

    • @109Rage
      @109Rage 2 года назад +8

      @@oscarpetersson5324 Anarcho-Texas.

    • @oscarpetersson5324
      @oscarpetersson5324 2 года назад

      @@109Rage oh, thanks

    • @PwnZombie
      @PwnZombie 2 года назад +1

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

    • @109Rage
      @109Rage 2 года назад +7

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

  • @mckennacisler01
    @mckennacisler01 9 лет назад +1772

    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 9 лет назад +85

      He could've just linked to an external script

    • @KobraArboc
      @KobraArboc 9 лет назад +168

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

    • @uuu12343
      @uuu12343 6 лет назад +17

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

    • @hanshearth7745
      @hanshearth7745 6 лет назад +1

      *what*

    • @antediluvianspy5371
      @antediluvianspy5371 6 лет назад +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.

  • @GibusWearingMann
    @GibusWearingMann 7 лет назад +1119

    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 4 года назад +11

      oof where

    • @myjorts
      @myjorts 4 года назад +64

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

    • @yanis7336
      @yanis7336 4 года назад

      Hi

    • @zyugyzarc
      @zyugyzarc 3 года назад +1

      a flutter- what?

    • @GibusWearingMann
      @GibusWearingMann 3 года назад +3

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

  • @jackdavenport5011
    @jackdavenport5011 5 лет назад +136

    Additional technical note: At 5:21, the closing script tag isn't optional. 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 :)

  • @GogiRegion
    @GogiRegion 5 лет назад +2996

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

    • @Jono997
      @Jono997 5 лет назад +407

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

    • @nuklearboysymbiote
      @nuklearboysymbiote 5 лет назад +233

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

    • @markloydcatalo
      @markloydcatalo 5 лет назад +24

      -test-

    • @MrJaniman12
      @MrJaniman12 4 года назад +37

      *what do you mean by that?*

    • @yojoehojo4291
      @yojoehojo4291 4 года назад +20

      I mean, making everything bold is harmless.

  • @DonVitoCS2workshop
    @DonVitoCS2workshop 6 лет назад +582

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

  • @TheCanterlonian
    @TheCanterlonian 8 лет назад +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.

  • @znefas
    @znefas 4 года назад +1066

    I've never seen Tom so angry, seriously.

    • @Netugi
      @Netugi 4 года назад +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 4 года назад +26

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

    • @extrahourinthepit
      @extrahourinthepit 4 года назад +16

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

    • @trubiso
      @trubiso 3 года назад +3

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

    • @nilen
      @nilen 3 года назад

      Google Cendrum Yep, the email was of bad character

  • @imperialfish454
    @imperialfish454 4 года назад +666

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

    • @Puzzelism
      @Puzzelism 4 года назад +10

      beauty

    • @Asdayasman
      @Asdayasman 4 года назад +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 2 года назад

      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 2 года назад

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

    • @Asdayasman
      @Asdayasman 2 года назад

      @@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".

  • @astro4355
    @astro4355 7 лет назад +4735

    ❤️

  • @Selur91
    @Selur91 9 лет назад +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 5 лет назад +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 5 лет назад +2

      not anything else, bc javascript is a limited language

    • @danlarkman2450
      @danlarkman2450 3 года назад

      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 Год назад +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

  • @BananaLizard
    @BananaLizard 3 года назад +33

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

  • @deanobeany
    @deanobeany 4 года назад +49

    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 3 года назад +1

      yep never ever ever ever ever EVER turned off

  • @thenerdyouknowabout
    @thenerdyouknowabout 8 лет назад +788

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

    • @theywalkinguptoyouand4060
      @theywalkinguptoyouand4060 6 лет назад +7

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

    • @Dorumin
      @Dorumin 6 лет назад +4

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

    • @abdelrahmangamalmahdy
      @abdelrahmangamalmahdy 6 лет назад

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

    • @thebaseandtriflingcreature174
      @thebaseandtriflingcreature174 5 лет назад +1

      A simple spelly,yet quite unbreakable.

    • @danlarkman2450
      @danlarkman2450 3 года назад

      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]..

  • @BakerbrothertvOfficial
    @BakerbrothertvOfficial 10 лет назад +320

    So anybody who looked at the tweet retweeted it?

    • @Fennoman12
      @Fennoman12 10 лет назад +76

      Yes.

    • @BakerbrothertvOfficial
      @BakerbrothertvOfficial 10 лет назад +35

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

    • @TomScottGo
      @TomScottGo  10 лет назад +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 10 лет назад +20

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

    • @JackBond1234
      @JackBond1234 7 лет назад +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)

  • @edsrule
    @edsrule 6 лет назад +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.

  • @HolyEcoly
    @HolyEcoly 4 года назад +139

    5 years later and RUclips is finally recommending me this.

    • @Salzui
      @Salzui 3 года назад +3

      *6

    • @EmbyTheEnby
      @EmbyTheEnby 3 года назад

      @@Salzui it was 5 for them, 6 for us

  • @haider4899
    @haider4899 8 лет назад +817

    never EVER EVER EVA EVAAAAA

    • @paintspot
      @paintspot 7 лет назад +9

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

    • @Stallnig
      @Stallnig 5 лет назад +1

      Fo eva? For eva eva?

  • @debjitpaul8580
    @debjitpaul8580 4 года назад +239

    Neverevereverevereverever
    - Tom Scott

  • @Echo024
    @Echo024 4 года назад +407

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

    • @ausnetting
      @ausnetting 4 года назад +38

      I love little Bobby tables!

    • @elliottsampson1454
      @elliottsampson1454 4 года назад +17

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

  • @MisterOptimous
    @MisterOptimous 5 лет назад +49

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

  • @HaustierYui
    @HaustierYui 7 лет назад +299

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

    • @Tagglink
      @Tagglink 4 года назад +3

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

  • @VoidSixx
    @VoidSixx 7 лет назад +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

    • @jandusek882
      @jandusek882 7 лет назад +71

      *test* _test_ -test-
      it worked, thanks! :D

    • @VoidSixx
      @VoidSixx 7 лет назад +38

      Jan Dusek
      Np ;)
      *Np ;)*
      _Np ;)_
      -NP ;)-

    • @axid8354
      @axid8354 7 лет назад

      -test-

    • @isaacfwpc3508
      @isaacfwpc3508 7 лет назад +1

      AirCommando12 *test*

    • @kodama3725
      @kodama3725 7 лет назад

      -test-

  • @SanicStudios
    @SanicStudios 4 года назад +159

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

  • @jauxro
    @jauxro Год назад +6

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

  • @glitcher880
    @glitcher880 9 лет назад +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 :)

  • @azenetmc
    @azenetmc 10 лет назад +175

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

    • @MandrakeHorse
      @MandrakeHorse 10 лет назад +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 3 года назад +24

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

  • @Bildungsromancuddy
    @Bildungsromancuddy 5 лет назад +52

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

  • @ArturoStojanoff
    @ArturoStojanoff 10 лет назад +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.

  • @Nixitur
    @Nixitur 7 лет назад +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.

  • @warpedmjia
    @warpedmjia 3 года назад +51

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

  • @dannya5690
    @dannya5690 6 лет назад +31

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

  • @arooobine
    @arooobine 7 лет назад +2182

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

    • @Lou_0b1
      @Lou_0b1 7 лет назад +28

      Can you actually increment and decrement with js?

    • @Akronymus_
      @Akronymus_ 7 лет назад +214

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

    • @commentator3513
      @commentator3513 7 лет назад +136

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

    • @Lou_0b1
      @Lou_0b1 7 лет назад +23

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

    • @itsthesola10
      @itsthesola10 7 лет назад +41

      END IF

  • @jarnMod
    @jarnMod 10 лет назад +201

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

    • @Axel-ro7dn
      @Axel-ro7dn 9 лет назад +12

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

    • @raskr8137
      @raskr8137 5 лет назад

      I find a smiley!
      ;

  • @hats1642
    @hats1642 3 года назад +9

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

  • @Shazzkid
    @Shazzkid 5 лет назад +27

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

  • @skhtrm
    @skhtrm 9 лет назад +404

    Love how the original tweet has a Fluttershy profile picture

    • @skhtrm
      @skhtrm 8 лет назад +2

      Iggy Tubmen ?

    • @Chrnan6710
      @Chrnan6710 8 лет назад +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 8 лет назад

      +BigGamer2525 You should go back to school.

    • @BigGamer2525
      @BigGamer2525 8 лет назад +3

      SquidPlays no ur a back to school night

    • @commentator3513
      @commentator3513 8 лет назад

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

  • @uuhamm
    @uuhamm 10 лет назад +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.

  • @jamesdaniel4975
    @jamesdaniel4975 4 года назад +19

    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 4 года назад +1

      Welcome to the team

    • @mushahidhussain1516
      @mushahidhussain1516 3 года назад

      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.

  • @BailsDaCableMan
    @BailsDaCableMan 6 лет назад +79

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

    • @ryannorthup3148
      @ryannorthup3148 3 года назад +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 3 года назад

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

    • @abc-li7cq
      @abc-li7cq 3 года назад +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 2 года назад

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

  • @NijosoSefzaps
    @NijosoSefzaps 10 лет назад +3

    I liked andy's picture. That's rather great that he noticed this vulnerability and figured out how to use it.

  • @DuncanJMcMillan
    @DuncanJMcMillan 9 лет назад +28

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

  • @leBAT54
    @leBAT54 2 года назад +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 Год назад

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

  • @Alex_Eicher
    @Alex_Eicher 3 года назад +12

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

  • @adamweishaupt3733
    @adamweishaupt3733 7 лет назад +167

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

  • @kaylasolace
    @kaylasolace 7 лет назад +25

    I love how the person who made this is a brony

  • @CZghost
    @CZghost 4 года назад +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.

  • @kenkenowo420
    @kenkenowo420 3 года назад +3

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

  • @xtzyshuadog
    @xtzyshuadog 10 лет назад +6

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

  • @Megapixel8063
    @Megapixel8063 5 лет назад +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.

  • @jmejuniper
    @jmejuniper 3 года назад

    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

  • @codingwithk5725
    @codingwithk5725 Год назад +4

    Normies : Self-Retweeting Tweet
    CS Students : Recursive Tweet

  • @Thiefree
    @Thiefree 9 лет назад +3

    That is absolutely fascinating. Such a simple oversight, and it could have been so much worse for tweetdeck! Kudos. Would that be greyhat, in old-speak?

  • @johnnysteward709
    @johnnysteward709 3 года назад +3

    Tom Scott hasn't aged a day in 6 years

  • @tech0494
    @tech0494 3 года назад

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

  • @PattyManatty
    @PattyManatty 4 года назад +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 7 лет назад +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 5 лет назад +4

      That's how i use RUclips

  • @jeffirwin7862
    @jeffirwin7862 7 лет назад +32

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

  • @Isaac_Stuart
    @Isaac_Stuart 2 года назад +2

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

  • @FyonixYT
    @FyonixYT Год назад +6

    3:17 sippin on orphan tears

  • @Minitomate
    @Minitomate 4 года назад +14

    This is what I call self-promoting a tweet.

  • @lukenoble2539
    @lukenoble2539 10 месяцев назад +3

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

  • @shugaroony
    @shugaroony 4 года назад

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

  • @jameslacey01
    @jameslacey01 2 года назад

    Tom you are a great teacher, so easy to follow. Have you ever considered offering a course?

  • @dcallstar51
    @dcallstar51 10 лет назад +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).

  • @Fennoman12
    @Fennoman12 10 лет назад +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 10 лет назад +2

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

    • @joeytje50
      @joeytje50 10 лет назад +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 10 лет назад +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 10 лет назад +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 10 лет назад

      joeytje50 You could make an exception.

  • @alien4320
    @alien4320 4 месяца назад

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

  • @keesalemon
    @keesalemon 6 лет назад

    I don't think I've seen Tom so worked up in a while!

  • @TaiTheDoggo
    @TaiTheDoggo 10 лет назад +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?'

  • @bettercalldelta
    @bettercalldelta Год назад +3

    The fix is literally replace "

  • @My1xT
    @My1xT 6 лет назад

    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.

  • @UltimatePerfection
    @UltimatePerfection 5 лет назад +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.

  • @ToastGreeting
    @ToastGreeting 3 года назад +3

    I like their profile picture, Fluttershy is good

  • @lewinskydan
    @lewinskydan 8 лет назад +546

    _test_

    • @TomScottGo
      @TomScottGo  8 лет назад +137

      I've no idea how you did that, but you appear to have successfully got tags into a RUclips comment. If you can do that consistently, with more than just the tags, then report it to RUclips'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 8 лет назад +137

      +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_ 8 лет назад +34

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

    • @alexw28349
      @alexw28349 8 лет назад

      +Max Mouse (Mmouse) _wow_

    • @LilShpee
      @LilShpee 8 лет назад +4

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

  • @zachogilman7397
    @zachogilman7397 6 лет назад

    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 5 лет назад

      both , , and are newlines

  • @michaelrandall4862
    @michaelrandall4862 2 года назад

    Not there yet but I NOW understand everything regarding. new subscriber for sure.

  • @jbcrocuta4236
    @jbcrocuta4236 4 года назад +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.

  • @Wraithling
    @Wraithling 6 лет назад +139

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

    • @bananya6020
      @bananya6020 4 года назад +4

      the weebs and mlp fans always thr smort

    • @DMack6464
      @DMack6464 4 года назад +1

      How about furries

    • @bananya6020
      @bananya6020 4 года назад

      @@DMack6464 also yes

    • @ZaHandle
      @ZaHandle 3 года назад

      You’ve betrayed your own kinds
      just kidding it’s okay as long as no one is offended

  • @thetruemizukageyagura9061
    @thetruemizukageyagura9061 5 лет назад

    God, Tom the end of this video gave me chills.

  • @originalfrosties1088
    @originalfrosties1088 Год назад +1

    You've aged well Tom ;). Genius work btw.

  • @PwinoP
    @PwinoP 7 лет назад +803

    *im gay*

    • @TGKcraft
      @TGKcraft 7 лет назад +19

      _me too_

    • @Alex-pf4ps
      @Alex-pf4ps 7 лет назад +84

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

    • @Lou_0b1
      @Lou_0b1 7 лет назад +102

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

    • @phgoil
      @phgoil 7 лет назад +18

      *i'm not*

    • @taxevasionconnoisseur4499
      @taxevasionconnoisseur4499 6 лет назад +26

      *_-bold italic strikethrough-_*

  • @MyNameIsNidos
    @MyNameIsNidos 8 лет назад +1250

    deletesys32.exe

    • @gavros9636
      @gavros9636 8 лет назад +83

      That is not a proper script, and I'm fairly sure the command to delete anything would not be named delete for this very reason.

    • @MyNameIsNidos
      @MyNameIsNidos 8 лет назад +475

      +D Wells Look in the sky! It's a bird! It's a plane! It's the joke flying over your head!

    • @KingHalbatorix
      @KingHalbatorix 8 лет назад +82

      +MyNameIsNidos that was a joke? your standards of humor are lower than I knew possible

    • @MyNameIsNidos
      @MyNameIsNidos 8 лет назад +194

      +KingHalbatorix a few people here disagree with you

    • @alexesther787
      @alexesther787 8 лет назад +111

      come on guys it's a joke. No need to get so serious about it. just laugh and move on.

  • @thecharmingnavigator9946
    @thecharmingnavigator9946 4 года назад

    I don't understand but somehow still enjoyed the video.
    You're a wizard Tommy

  • @anduro7448
    @anduro7448 5 лет назад

    A gift that keeps on giving