Cracking Websites with Cross Site Scripting - Computerphile

Audible free book: www.audible.com/computerphile
JavaScript is dangerous! Why? How are websites vulnerable to it? Find out about bug-bounties from Tom Scott.
More from Tom Scott: / enyay and / tomscott
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computerphile is a sister project to Brady Haran's Numberphile. See the full list of Brady's video projects at: bit.ly/bradychannels

Пікірлер: 905

  • @Computerphile
    @Computerphile10 жыл бұрын

    now, should we keep that end graphic? :)

  • @Tokkemon
    @Tokkemon9 жыл бұрын

    That's Javascript! I'm gonna run that!!! -Quote of the year.

  • @SpencerGreenDotNet
    @SpencerGreenDotNet8 жыл бұрын

    "That's JavaScript code! I'm gonna run that!" Gotta love the childlike enthusiasm of this personification of web browsers.

  • @Wrswest
    @Wrswest8 жыл бұрын

    There's a comment in a Javascript project I worked on that says: [bunch of checks for user input] //You know, if the users could just be more considerate //I wouldn't have to do any of this.

  • @idamontede
    @idamontede8 жыл бұрын

    *-html styling does not work in youtube comments. believe me-*

  • @PrivatePaul
    @PrivatePaul9 жыл бұрын

    why in the world are you doing this in a hotel lobby?

  • @zwz.zdenek
    @zwz.zdenek10 жыл бұрын

    The guy who found the Facebook vulnerability was actually rudely rejected by Facebook and got his well deserved money as donations!

  • @DavidChipman
    @DavidChipman8 жыл бұрын

    I love Tom Scott's enthusiasm for this stuff!

  • @Computerphile
    @Computerphile10 жыл бұрын

    In a very dark place that wouldn't let us use a light! - its the Renaissance Hotel at St Pancras, London >Sean

  • @ComputersAreRealCool
    @ComputersAreRealCool9 жыл бұрын

    *Apparently HTML Works in KZread Comments, judging by the large amount of bold comments* Can I put bootstrap into my comments to make them look pretty?

  • @iLikeKittens
    @iLikeKittens8 жыл бұрын

    "Which is not entiiiirely legal under the computer misuse act, but no one pressed charges" I didn't know he was such a rebel XD

  • @capnapalm
    @capnapalm10 жыл бұрын

    I love these videos because they explain how people have broken into webpages to re-write them, steal info, etc. You always hear how vulnerable stuff can be but never the specifics about how people get in. Great videos as usual, Brady!

  • @aspermwhalespontaneouslyca8938
    @aspermwhalespontaneouslyca893811 ай бұрын

    The ending doesn't have a dash because you are supposed to binge the next 20 computerphile videos after it...

  • @joeytje50
    @joeytje5010 жыл бұрын

    Another cool thing for input dropdowns, is changing the value of one of the s in the , and then submitting. Especially if the output does something with the value of the dropdown, for example with an age input where the output has control over the date format, it completely screws up. Example: I change my birthday to "Cake Pie 1000BC". That will, on a lot of sites with profiles that use this dropdown system for birthdays, completely break the thing when it's trying to convert the month number for example to the month name, since there is no "Pie"th month in the year. It's quite harmless, unless the site actually displays the thing you entered in the input directly on the page, in which case you might indeed be able to insert a script tag. PS: I've managed to cause my profile to completely break by doing this on a site once, after which it just gave me back an error 500. Great fun. I decided to change it back afterwards though. (keep in mind that if your birthday is loaded onto your settings page too, you might also get an error on the settings page, and you won't be able to change it back)

  • @hakeemgreen8788
    @hakeemgreen87889 жыл бұрын

    I love this guys enthusiasm when explaining. Makes it more interesting.

  • @maurerpe
    @maurerpe10 жыл бұрын

    Client side filtering is a good idea because it can make it easier on the legitimate user. E.g. tell them the phone number is invalid before they hit submit, saving them time. But client side prefiltering does not add any additional security. All inputs must be fully validated at the server. There is no guarantee that an attacker will be using a polite client that follows your prefiltering rules. An attacker can download the page and remove the rules.

  • @el__monke
    @el__monke8 жыл бұрын

    *bold* _slant_ -strike- *_-Magic-_*

  • @henhouse
    @henhouse8 жыл бұрын

    This video just helped me notice an XSS vulnerability on one of my sites. Thank you. :|

  • @kimbosprite
    @kimbosprite8 жыл бұрын

    This man has a lot of energy and enthusiasm for this topic.

  • @_Super_Hans_
    @_Super_Hans_10 жыл бұрын

    I didn't understand a single word of what that guy just said but he's super engaging and the 8 minutes flew by.

  • @RichardMurrie
    @RichardMurrie10 жыл бұрын

    Great video. I wish I had been taught at school by someone speaking passionately about their subjects like he does!

  • @DivinityStripes
    @DivinityStripes10 жыл бұрын

    Tom Scott is really good at explaining things and I LOVE the concepts he explains. More from Mr. Scott? :3

  • @imagedezach
    @imagedezach5 жыл бұрын

    Tom explains this in 8 mins better than my Network security professor in an entire lecture

  • @won1853
    @won185310 жыл бұрын

    He's so funny yet so informative. More of this guy!

  • @hoon4tw
    @hoon4tw10 жыл бұрын

    Tom Scott is definitely my new favorite, especially considering all of Brady's other channels have slowed down. Tom is making a very good showing. Keep it up.

  • @juan193
    @juan1937 жыл бұрын

    So Wikipedia describes him as a comedian to which I agree, but... Does he have a Masters in computer science or a title alike? He's got an amazing skill to explain complex stuff!

  • @Hiimstring3
    @Hiimstring310 жыл бұрын

    Defiantly the most ecstatic video you've done, really entertaining, whilst also quite educational.

  • @ShellmanDeluxe
    @ShellmanDeluxe10 жыл бұрын

    I like the dark lighting. Makes it feel more laid back and down to earth :D

  • @EliPerelman
    @EliPerelman10 жыл бұрын

    XSS is even more dangerous when coupled with Cross-site Request Forgery (CSRF). A video on CSRF would probably be a nice follow-up to this.

  • @vuralmecbur9958
    @vuralmecbur99589 жыл бұрын

    2:35 I've never seen a JavaScript code that looks like "i+i=2", it looks more like an equation :D

  • @tinkerttoy
    @tinkerttoy10 жыл бұрын

    Absolutely! I adore how he speaks so strongly about these things, his rhetorical skills are very well-developed and he's a joy to listen to.

  • @TehGordonFreeman
    @TehGordonFreeman10 жыл бұрын

    I like the darkness, it adds to the atmosphere, and (at least I can) still see everything just fine...

  • @illustriouschin
    @illustriouschin10 жыл бұрын

    I would just like to thank who ever's idea it was to do the Audible promotion because audio books are expensive and getting a free one was a really nice gesture.

  • @UberJamesMan
    @UberJamesMan9 жыл бұрын

    wut wut

  • @Azure1992
    @Azure199210 жыл бұрын

    I liked the little touch of you guys putting the / in the closing tag at the end of the show.

  • @mayur1234560
    @mayur123456010 жыл бұрын

    This is amazing! That guy should have more videos!

  • @runescaper1333
    @runescaper13339 жыл бұрын

    So if I typed *and closed it with* , youtube will make it bold?

  • @Macfanize
    @Macfanize10 жыл бұрын

    The passion and enthousiasm is great ! More please :)

  • @hidalginator21
    @hidalginator2110 жыл бұрын

    Make more of these type of videos! They are very interesting and incredibly informative.

  • @voxlvalyx
    @voxlvalyx9 жыл бұрын

    The white balancing in this video confuses me.

  • @nandoflorestan
    @nandoflorestan8 жыл бұрын

    The content of this video is true, however, none of it is about cross-site scripting.

  • @idevilousbho5491
    @idevilousbho54915 жыл бұрын

    I'm a BS Physics student(first year) I really want to learn more about Cyber Security, I want to shift but I would waste my scholarship so yeah I'm watching your videos...Thank you!

  • @coreytk
    @coreytk10 жыл бұрын

    Excellent video! I learned a lot and the enthusiasm of the speaker made it even more exciting!

  • @BrendtWaters
    @BrendtWaters10 жыл бұрын

    Between the SQL holes video and this one, I sure am glad that Tom Scott is on our side.

  • @vacklinge
    @vacklinge10 жыл бұрын

    I love this guy. He really seems to love what he's doing.

  • @AdamYarris
    @AdamYarris9 жыл бұрын

    You have ruined my internet searching for life. Not every time I see a user input box i need to put in code xD

  • @faizanshariff7246
    @faizanshariff7246 Жыл бұрын

    Watching this in 2022 and this still feels so relevant.

  • @pcpmtiservicos9855
    @pcpmtiservicos98554 жыл бұрын

    Amazing explanations Tom. Thank you very much dude.

  • @icewallowcome3023
    @icewallowcome302310 жыл бұрын

    "never trust user input" This should have been this video's conclusion! =)

  • @_multigrin
    @_multigrin10 жыл бұрын

    "That is Javascript code I'm gonna run that!" love it!

  • @codebeatr
    @codebeatr10 жыл бұрын

    Please, talk this guy into having his own channel, or make more videos with him, he is awesome!

  • @TheVanapapi
    @TheVanapapi10 жыл бұрын

    This guy is so enthusiastic. Love it!

  • @alpenwasser6869
    @alpenwasser686910 жыл бұрын

    Ah yes, Bobby Tables. Definitely one of the more amusing tech jokes I've come across, still gets a good chuckle from me every time I read it. :)

  • @therattman
    @therattman9 жыл бұрын

    Its funny how many people are actually trying to do XSS on KZread just because they saw a video explaining about it xD

  • @Kissdaboss
    @Kissdaboss6 жыл бұрын

    I really enjoy your videos! Well done!

  • @hecanylmz
    @hecanylmz8 күн бұрын

    Another great explanation fulfilled by highly understandable and educated content!

  • @IceMetalPunk
    @IceMetalPunk10 жыл бұрын

    Omegle had that same problem for a bit when they introduced Spy Mode. They weren't sanitizing their question inputs, so for a while I would go around sticking JS in there that froze the computers of whoever got stuck with my question XD They fixed it in a few days, though.

  • @NehalemUnleashed
    @NehalemUnleashed10 жыл бұрын

    That is JavaScript! I'm gonna RUN that!

  • @NottheBoson
    @NottheBoson10 жыл бұрын

    Wow, I was literally about to send a request for a video on this, I have to do an assignment on this for college, Thank you!

  • @Nixitur
    @Nixitur10 жыл бұрын

    That end graphic is really clever and I like it.

  • @danielsimmons3956
    @danielsimmons39567 жыл бұрын

    Where did you even get dot matrix printer paper?

  • @tajultonim
    @tajultonim6 ай бұрын

    "Cross site scripting is the number one vulnerability on the web today" me watching in 2023: hmmmm, sounds legit...

  • @DarkYuan
    @DarkYuan10 жыл бұрын

    Its worth mentioning (and possibly a future video topic) that even if your website's forms are supposedly "secure" anybody can make a form on their own site that submits to yours. No matter what make sure ALL input processed by your website is properly escaped.

  • @mr-osama-mustafa
    @mr-osama-mustafa11 ай бұрын

    The best and simplest explanation ever in XSS :)

  • @rlamacraft
    @rlamacraft10 жыл бұрын

    Great video! More please :) Also, love his impression of a web browser at 5:33 :)

  • @shazbots
    @shazbots8 жыл бұрын

    This reminds me of Bobby Tables.

  • @RyanHansen_101
    @RyanHansen_10110 жыл бұрын

    4:03 "Because myspace hadn't quite filtered javascript properly". Brilliant!

  • @LeeroyEst
    @LeeroyEst10 жыл бұрын

    Very interesting, Tom Scott explains really well.

  • @prestonferry
    @prestonferry4 жыл бұрын

    Tom “You should know this” Scott

  • @Falconcoder
    @Falconcoder9 жыл бұрын

    *_GUYS IT WORKS!_*

  • @jasonneu81

    @jasonneu81

    9 жыл бұрын

    Nope.

  • @midsummerstation3345

    @midsummerstation3345

    9 жыл бұрын

    ***** *i think so*

  • @Seegalgalguntijak
    @Seegalgalguntijak10 жыл бұрын

    Now that I come to think of it, the closing tag </computerphile> at the end of each video makes total sense. Just never thought of it, I guess it wasn't important enough to notice.

  • @BrunoGarciaB
    @BrunoGarciaB10 жыл бұрын

    Depends on the case: You can use bold if you want the text to be just bold, you can use the strong that if you want it to be bold and also be a "hint" for search engines like google to take that "strong" as something important to include on their web-crawler.

  • @Alex2Buzz
    @Alex2Buzz8 жыл бұрын

    "Someone *at Netscape* comes along and invents JavaScript!"

  • @PrimusProductions
    @PrimusProductions10 жыл бұрын

    test

  • @kunai2391
    @kunai239110 жыл бұрын

    you guys deserve more views/subscribers :) thank you

  • @Florensia8
    @Florensia810 жыл бұрын

    This was very good! He should be in more videos like this!

  • @misterbasic
    @misterbasic5 жыл бұрын

    5:33 My favourite moment in this entire video.

  • @011azr
    @011azr9 жыл бұрын

    Test *Test* Test

  • @011azr

    @011azr

    9 жыл бұрын

    011azr -Test- *_Test_* _Test_ Um, okay *:O*

  • @elminz
    @elminz10 жыл бұрын

    Yeah, I phrased it badly, I meant to say that validation/filtering server side is 100% essential for any input. Client side validation is more of a latency thing for the client, since the person won't need to wait for it to come back invalid (saves server load as well).

  • @KieranNoble
    @KieranNoble10 жыл бұрын

    i love this guy, he is so enthusiastic about computers :)

  • @4226sniper
    @4226sniper9 жыл бұрын

    Just trying to see if the bold tag works here

  • @davidj2826
    @davidj28268 жыл бұрын

    Dot Matrix paper for notes!?! Someone's got funding!

  • @EdPwnz
    @EdPwnz10 жыл бұрын

    this guy's my favorite in computerphile

  • @NetgearProductions
    @NetgearProductions9 жыл бұрын

    So how on earth could you use javascript to make a webpage send users info to your pc if it only affects you?

  • @durchschnittlich
    @durchschnittlich8 жыл бұрын

    Computerphile can just have a self-closing one:

  • @craigharkins4669
    @craigharkins46698 жыл бұрын

    bold text: *test*

  • @Celrador
    @Celrador10 жыл бұрын

    One example would be WebKit only partially making use of the "min-" & "max-height" and "-width" properties. If you want more examples check the Wiki page "Comparison of layout engines (CSS)"

  • @puladebili
    @puladebili10 жыл бұрын

    this guy and the graphics guys are the best

  • @noredine
    @noredine7 жыл бұрын

    Googled Rick Astley, rick rolled again :/

  • @TechyBen
    @TechyBen10 жыл бұрын

    The camera sways so much, I thought it was a ferry. :D

  • @fostena
    @fostena10 жыл бұрын

    finally! the closing tag!! Thanks.

  • @AbdulKhaleed
    @AbdulKhaleed10 жыл бұрын

    Great video! More of this dude!

  • @xSCOOTERx2
    @xSCOOTERx29 жыл бұрын

    alert("hi");

  • @MrHyde-fu5sr
    @MrHyde-fu5sr8 жыл бұрын

    don't understand how this could be dangerous.For example anyone can click inspect element and type some text into their web browser and change a COPY of the page they're looking at no one else will ever use that copy you have changed.In this same manner, how would me writing a script inside of my copy of a webpage effect someone else's copy?

  • @lolbajset

    @lolbajset

    8 жыл бұрын

    +Curran Hyde If i understood the video correctly it is when someone else visits your webpage that the script gets executed. If I make a website and add a script in the middle of its html, it will run when you or anyone else loads the page, thus enabling attacks. Again, that's at least how I understood it, could be wrong

  • @MrAntiKnowledge

    @MrAntiKnowledge

    8 жыл бұрын

    +Curran Hyde It only becomes a problem for sites which allow users to post something which gets displayed to other users. Like this comment here (only that youtube is smart enought to filter out code). If you don't have a filter active that say... replaces "" with "<script>"* then whatever the user writes in between and will be run as code in the Browser of another user who happens to get that text either because it was send to his account, or cause he visited the page where it was posted. *("<script>" would be displayed as to the user, but the browser understands that it shouldnt be run as code)

  • @iabervon
    @iabervon10 жыл бұрын

    These are everywhere. I was recently reading a book about the programming language Go, and found a XSS vulnerability in a simple statistics program used as an example.

  • @charlesderek7107
    @charlesderek71074 жыл бұрын

    How would you address the company? Would you tell them upfront, or mention something needs to be fixed?

  • @martonlovas4583
    @martonlovas45834 жыл бұрын

    5:58 not TECHNICALLY ENTIRELY LEGAL

  • @crazymelon213
    @crazymelon2139 жыл бұрын

    Does it

  • @MikeJDelira
    @MikeJDelira10 жыл бұрын

    I love this guy. He's so enthusiastic!

  • @seyu8666
    @seyu8666 Жыл бұрын

    My god...Tom Scott is GOAT