XSS on Google Search - Sanitizing HTML in The Client?

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024

ความคิดเห็น • 587

  • @alexc8992
    @alexc8992 5 ปีที่แล้ว +1409

    I blame Tom Scott for this since he said that Google was fine in a video about XSS. He probably inspired people to try it.

    • @LiveOverflow
      @LiveOverflow  5 ปีที่แล้ว +216

      Google is constantly changing, so errors can always pop-up. But that's also why Google invests a lot of money into bug-bounty, so researchers like Masato get paid for it ;)

    • @Thect
      @Thect 5 ปีที่แล้ว +13

      blame Tom Scott

    • @nilsirl
      @nilsirl 5 ปีที่แล้ว +6

      Can you give us a little bit of context? What did Tom Scott do?

    • @whydoineedausername1386
      @whydoineedausername1386 5 ปีที่แล้ว +35

      He made a video explaining XSS (using an XSS bug in a twitter client as an example because it was recent at the time) and in it claimed that google is trustworthy as a company that is safe and wouldn't allow XSS. That inspired people to try and get XSS working on google

    • @fluent_styles6720
      @fluent_styles6720 5 ปีที่แล้ว +16

      It was the self-retweeting tweet video, wasn't it?

  • @DustDaAnt
    @DustDaAnt 4 ปีที่แล้ว +208

    Google: HEY HEY! STOP!
    Me: What?
    Google: 1

  • @karlkastor
    @karlkastor 5 ปีที่แล้ว +458

    Unbelievable that Google had an XSS like that. Really interesting attack and great explanation, was really easy to understand. I hope Masato got a big bug bounty.

    • @abc321meins
      @abc321meins 5 ปีที่แล้ว +23

      @M. de k. Don't you think thats way to little? He could have overtaken the internet and make Billions with this XSS in less than a day...

    • @abc321meins
      @abc321meins 5 ปีที่แล้ว +3

      @M. de k. Hmm, yeah you're right I guess.

    • @abc321meins
      @abc321meins 5 ปีที่แล้ว +22

      @M. de k. But to be honest, for 3000$ I'd have kept it a secret and used it to rickroll as manny people as possible. The faces of my coworkers would have been priceless.

    • @miguelricardosobong4927
      @miguelricardosobong4927 5 ปีที่แล้ว +14

      @@abc321meins then you'd be persecuted and no money...

    • @trieulieuf9
      @trieulieuf9 5 ปีที่แล้ว +4

      M. de k. Hi, i am curious, who does he get the bounty? Google see his tweet and verify it is a bug then give him money? Or he needs to report it to google?

  • @NicholasFagan
    @NicholasFagan 5 ปีที่แล้ว +239

    Amazing vulnerability! Loosely parsing html always seems silly to me. If browsers started being strict about displaying html, people would start being strict when writing it.

    • @mirradric
      @mirradric 5 ปีที่แล้ว +19

      Sadly xhtml died a sad death

    • @WoolieOG
      @WoolieOG 5 ปีที่แล้ว +21

      or just give option to websites to opt-out from corrections, and make browser render html 1:1.

    • @omri9325
      @omri9325 5 ปีที่แล้ว +32

      That's kind of a feedback loop, browser vendors do not want their browsers to stop working on a lot of site unexpectedly.

    • @rogercruz1547
      @rogercruz1547 5 ปีที่แล้ว +6

      @@omri9325 Maybe we can write some extensions/plugins for major browsers that parse everything as xhtml...

  • @nobody7557
    @nobody7557 5 ปีที่แล้ว +322

    I got goosebumps when the alert(1) opened.

  • @문동선-j7d
    @문동선-j7d 5 ปีที่แล้ว +368

    When you literally hacked Google and everyone else thinks it's just an April fool's joke.
    Achievement unlocked: Hacking Google.

    • @alandosman5002
      @alandosman5002 5 ปีที่แล้ว +15

      문동선 you can’t hack websites with XSS

    • @문동선-j7d
      @문동선-j7d 5 ปีที่แล้ว +9

      @@alandosman5002 yet you know you're hacking it when you find an exploit like that

    • @cyborggoat2467
      @cyborggoat2467 5 ปีที่แล้ว +6

      @@문동선-j7d its an exploit, more of a bug or easter egg of sorts, not hacking

    • @MrGrazyD96
      @MrGrazyD96 5 ปีที่แล้ว +1

      @@cyborggoat2467 what do you think is hacking then?

    • @cyborggoat2467
      @cyborggoat2467 5 ปีที่แล้ว +2

      @@MrGrazyD96 literally getting into their servers, being able to see what they see, break it if you so chose

  • @mtssvnsn
    @mtssvnsn 5 ปีที่แล้ว +113

    So, in conclusion:
    1.) Sanitizing should be done on the client, because its hard to do on the the server.
    2.) Woops!

    • @renakunisaki
      @renakunisaki 5 ปีที่แล้ว +9

      3) The noscript tag is parsed differently depending on context.

    • @JochemKuijpers
      @JochemKuijpers 5 ปีที่แล้ว +7

      4) replacing all with their appropriate html entities before DOM insertion would have fixed this.

    • @otesunki
      @otesunki 4 ปีที่แล้ว +2

      5) ok lets filter & and " but not < or > .

    • @unarei
      @unarei 4 ปีที่แล้ว

      @@JochemKuijpers or adding textnodes instead of using innerhtml in the first place. there was probably some reason they needed a limited set of tags though.

    • @NetheriteMiner
      @NetheriteMiner 4 ปีที่แล้ว

      wouldn't filtering < do everything?
      I'm new at XSS please help

  • @devttyUSB0
    @devttyUSB0 5 ปีที่แล้ว +288

    I always use regular expressions to parse HTML! :P

    • @twistedsim
      @twistedsim 5 ปีที่แล้ว +8

      😂🤣

    • @karlkastor
      @karlkastor 5 ปีที่แล้ว +12

      I actually do that a lot for webscrapers. It is faster than an actual XML/HTML parser and it doesn't make much of a difference when it doesn't have to be hundred percent accurate. Although, if one of my download tool gets outside input, I should abstain from these methods, because someone could inject something. Although the worst case scenario in that case is that wrong data gets downloaded.

    • @takivilmos
      @takivilmos 5 ปีที่แล้ว +9

      I think they are using it too. Most language parsers somehow use regex. 😁 BTW I think regex is one of the perfect examples on how amazing things were created in the old days, when they had no clue how important it will be, and they cared to do these algorithms the best possible way.

    • @alphatier4919
      @alphatier4919 5 ปีที่แล้ว +31

      "Regex" and "parse" in 1 sentence... My hearth stopped beating.....

    • @WolfrostWasTaken
      @WolfrostWasTaken 5 ปีที่แล้ว +1

      Evil RegEx input is coming at you muahahahaahah

  • @youtubekackejr.3817
    @youtubekackejr.3817 5 ปีที่แล้ว +60

    i was looking at memes how i am here?

    • @Jcraft153
      @Jcraft153 5 ปีที่แล้ว +12

      Stay a while, this dude does some cool stuff.

    • @NoName-gs9mb
      @NoName-gs9mb 5 ปีที่แล้ว +2

      @@Jcraft153
      Is he German, because he sounds so.

    • @useodyseeorbitchute9450
      @useodyseeorbitchute9450 5 ปีที่แล้ว +1

      He must be using some unknown exploit in youtube recommend algorithm. ;)

  • @domaincontroller
    @domaincontroller 3 ปีที่แล้ว +14

    00:52 basics XSS 05:10 mutation XSS 05:35 Client-side sanitization, DOMPurifiy 07:47 masato, noscript element 10:38 DOM XSS

  • @PurplProto
    @PurplProto 4 ปีที่แล้ว +59

    LiveOverflow: "Google search is arguably the front page of the internet"
    Reddit: *sad noises*

  • @Zooiest
    @Zooiest 5 ปีที่แล้ว +132

    He’s not the copypaste machine, he’s the one who makes the exploits
    Reference to your older video 🙃

    • @LiveOverflow
      @LiveOverflow  5 ปีที่แล้ว +27

      Masato is a browser bug machine!!!

    • @Zooiest
      @Zooiest 5 ปีที่แล้ว +1

      LiveOverflow thanks for the heart and reply :3

    • @Dakta96
      @Dakta96 5 ปีที่แล้ว

      Copypasting is also boring just create something to do it for you if you really want to

  • @DarkOverFlowOverflow
    @DarkOverFlowOverflow 5 ปีที่แล้ว +59

    Keep making websecurity videos keep up the good work

  • @PAhmad99
    @PAhmad99 5 ปีที่แล้ว +33

    Idk how I got here... Idk what's going on. I feel incredibly stupid.

  • @_DeProgrammer
    @_DeProgrammer 5 ปีที่แล้ว +26

    I think this is honestly, one of the best channels on TH-cam. The time you put in to explain and share what you learn with us is GOLDEN! thanks dude. I'll support.

  • @dominiksulzer1338
    @dominiksulzer1338 5 ปีที่แล้ว +23

    Thankfully there is a javascript framework for everything :D

  • @madghostek3026
    @madghostek3026 5 ปีที่แล้ว +16

    Now this is scary how many sites use the template parser, which appears to be vulnerable

    • @10F2C
      @10F2C 2 ปีที่แล้ว

      attacker's dream

  • @TheSweMaster
    @TheSweMaster 5 ปีที่แล้ว +11

    Anyone else who had their Google assistant Google JavaScript for you at 12:23 ?!

  • @machinexa1
    @machinexa1 4 ปีที่แล้ว +3

    Did you guys notice at 0:05, when @LiveOverflow puts quote it says "I put ' it gives bug" (a video by Liveoverflow, easter egg)

    • @adityyyaaa
      @adityyyaaa 3 ปีที่แล้ว +1

      Actually 🤔

  • @Rossilaz58
    @Rossilaz58 4 ปีที่แล้ว +6

    "Google search is arguably the front page of the Internet"
    *reddit ceo is angry*

  • @Ikxi
    @Ikxi 5 ปีที่แล้ว +6

    I don't understand anything but it's still sooooo interesting xD
    Gutes Video

  • @theohallenius8882
    @theohallenius8882 5 ปีที่แล้ว +60

    HTML has reached a critical mass of bloat that there will always be a XSS vulnerability discovered every year.

    • @renakunisaki
      @renakunisaki 5 ปีที่แล้ว +3

      Yeah, it's a real fustercluck. I think there are other tags that parse differently, such as xmp.

    • @omri9325
      @omri9325 5 ปีที่แล้ว +2

      Feature toggles are there to fix it in the future, you will be able to remove the old browser features that you don't use to prevent potential vulnerabilities.

    • @ExEBoss
      @ExEBoss 5 ปีที่แล้ว +2

      At this point, I wish that XML5 would be worked on: github.com/whatwg/html/issues/4436
      That would solve a lot of these problems.

    • @mattf.2142
      @mattf.2142 5 ปีที่แล้ว +1

      I think it's been on the OWASP top 10 for years. All of the bugs I've found through hackerone, or what have you have been XSS vulnerbilities. Some found within 30 minutes. More like there will be a few XSS vulns discovered every day. (perhaps not on Google, though).

    • @theohallenius8882
      @theohallenius8882 5 ปีที่แล้ว

      @@tf2excession I know, some Intel cpus even have a "god mode" instruction that can execute any instruction, and it wasn't even in the manual, it was probably there for debug purposes and they forgot to remove it.

  • @vladomaimun
    @vladomaimun 5 ปีที่แล้ว +45

    Browsers should only parse strict and correct HTML.

    • @LiEnby
      @LiEnby 5 ปีที่แล้ว +38

      That would break the internet

    • @UltraNyan
      @UltraNyan 5 ปีที่แล้ว +8

      @@LiEnby where are the days of XHTML, those sitty hipster kids with their shitty HTML5 and fancy CSS3

    • @IOwnThisHandle
      @IOwnThisHandle 5 ปีที่แล้ว +3

      In a perfect world.

    • @LiEnby
      @LiEnby 5 ปีที่แล้ว +4

      @@UltraNyan what we would like and what we can acturally do are completely different things..

    • @kidbomb
      @kidbomb 5 ปีที่แล้ว +11

      We should at least have the option of only parsing correct HTML. I wouldn't mind having an experimental flag in my browser for it which I could turn on whenever I see fit.

  • @boahneelassmal
    @boahneelassmal 5 ปีที่แล้ว +7

    search encrypt as an interesting approach to sanitizing their search requests.... it just takes out any < and > :D

  • @petermarshall1634
    @petermarshall1634 5 ปีที่แล้ว +4

    Just escape the quotes and "greater than"/"less than" tags. Google doesn't need to parse HTML anyways.

    • @xBZZZZyt
      @xBZZZZyt 3 ปีที่แล้ว +1

      agree

    • @lucaspelegrino1
      @lucaspelegrino1 3 ปีที่แล้ว

      Yeah, it really doesnt make sense to even handle html at that point. But the vulnerability was only possible on the querystring tho, if I understood correctly, there must be a reason for accepting html there.

  • @mobile_ingou
    @mobile_ingou 5 ปีที่แล้ว +4

    With the second example with the invalid code, the browser was correct. tags are CDATA, meaning that the contents will never be interpreted as HTML. It also means they cannot be self closing.
    It is not because of parsers.
    With both examples, the browser is not being "weird". It is following the W3C spec, which states that scripts are CDATA, and that browsers must auto-close tags.
    BTW, great video!!!

  • @gabiold
    @gabiold 5 ปีที่แล้ว +4

    Browsers should phase-out HTML correction.
    If a website requires inserting HTML tags, it should inform the user with some yellow bars at the top like the "prevented to open a window" message. There should be a config option to this like "notify", "ask", "reject", making the notify the default now, then after a year or two, making the "ask" the default, which should be as hard to click through as an invalid TLS cert. window.
    Really, pages without matching open/close tags and with syntactically bad javascripts are a major thing, errors should really be show up to the users, which will motivate companies to fix their annoying websites, then after a time it should not be allowed to work like nothing happened.
    No need to be as strict as certain required attribute missing or something semantically wrong trigger it, but if the structural syntax is broken, missing closing tag, closing braket, closing quote or so happens, it should not be rendered to the user at all.

    • @LuLeBe
      @LuLeBe 2 ปีที่แล้ว +1

      Nah it will just make users angry at the browser. They don't understand this and they don't have to. Opening up some old forums page from 2005 (which is way more likely to have these issues than sites that are actually still maintained well enough to fix it) is no hazard (unless you download stuff) and yet you wanna show the users all kinds of warnings? Worst idea I've ever heard. On the web, "breaking" stuff is a bad idea. Even just making https the default with warnings for http sites was a major discussion, and that's much less obtrusive than what you propose.

  • @cr9pr3
    @cr9pr3 5 ปีที่แล้ว +59

    having paused the video at 2:50
    What the browser _should_ do, is saying:
    "Malformed document. Aborting execution."
    :P

    • @karlkastor
      @karlkastor 5 ปีที่แล้ว +14

      If they do that a lot of websites won't work. Just run any HTML validator on almost any website and you will get dozens of errors. One of the pains of these web architectures is that they should be backwards compatible and cross-browser.

    • @Madinko12
      @Madinko12 5 ปีที่แล้ว +27

      @@karlkastor yeah, that's why versioning was invented at some point. Just put some "strict" flag, tell non-strict is deprecated and support will be dropped by browsers starting from 2030, don't add new features in permissive mode, and you just improved the web by 999%.

    • @cr9pr3
      @cr9pr3 5 ปีที่แล้ว +10

      ​@@karlkastor
      Yes I know. That's why I made the half-ironic :P at the end.
      I know browser vendors won't do it, because ultimately their product will be the one "that does not work", but in my opinion the idea of accepting a word that isn't in the formal language you are parsing is absolutely insane. I mean we _say_ we use this particular language (html) but in practice every vendor implements a client for a MUCH broader language that isn't even close to the original one. And this behavior isn't even a bug but absolutely intentional. I just don't like it :D

    • @Asdayasman
      @Asdayasman 5 ปีที่แล้ว +1

      Karl Kastor Haha, nah. Fuck them.

    • @-morrow
      @-morrow 5 ปีที่แล้ว +2

      It depends on the what makes the html invalid. e.g. ignoring some mandatory attributes (img alt) may be fine, but guessing/closing tags is just plain evil imho.

  • @nathankrehbiel105
    @nathankrehbiel105 4 ปีที่แล้ว +2

    "Google is obviously the front page of the internet"
    Reddit? You're not going to argue?

  • @oldbootz
    @oldbootz 5 ปีที่แล้ว +4

    This is brilliant, and the vid goes so deep and thorough on the topic. You really are the best security channel on YT.

  • @skysunset877
    @skysunset877 5 หลายเดือนก่อน +1

    I Love It! Your explanation is intuitive and easy. It is very helpful for studying!

  • @Napert
    @Napert 4 ปีที่แล้ว +1

    Why not use xhtml so if something breaks you don't get anything at all?

  • @thebosscrystal
    @thebosscrystal 4 ปีที่แล้ว +1

    Can this be used for malicious stuff?

  • @threeMetreJim
    @threeMetreJim 4 ปีที่แล้ว +2

    New Facebook games may be an opportunity to hunt down bugs similar to this, they are quite often hurried through, especially the ones by smaller teams of programmers. I got one before, managed to insert html to play a TH-cam video offscreen (for the sound effects). It actually got a laugh out of the programmers of the game before they fixed the issue - there were a ton of other bugs too, that I helped get removed before the game was attacked by someone else. No reward money though, but earned some kudos, none-the-less.

  • @winstonlopez6117
    @winstonlopez6117 3 ปีที่แล้ว +1

    Im pretty new to all this but from what can follow. The writes the script in a way that the paser fixs rewrites the script. Now the wbsite thinks its okay put it just help script to work and take over .

  • @krzysztof-ws9og
    @krzysztof-ws9og 5 ปีที่แล้ว +33

    Is there any benefit of fixing invalid html code?
    I cannot find any. I think that pages should be blocked by browser.

    • @luizzeroxis
      @luizzeroxis 5 ปีที่แล้ว +8

      It's less annoying when you just wanna make a quick and dirty page. I don't even use the html, head, and body tags, they don't really have a purpose.

    • @TheLolilol321
      @TheLolilol321 5 ปีที่แล้ว +27

      We need a "use strict" for html

    • @semanticsyntax
      @semanticsyntax 5 ปีที่แล้ว +2

      @@luizzeroxis Yeah but quick and dirty pages mean the browser has to guess what you actually meant, and introduces these security issues. Why should your convenience come at the cost of others security? Obviously this isn't just targeted at you, half the web probable contains invalid HTML etc., but if people actually took the time to check their code was well formed then browsers wouldn't have to 'guess', removing an entire class of security exploit.

    • @amunak_
      @amunak_ 5 ปีที่แล้ว +9

      Backwards compatibility.
      However there should definitely be a mechanism to disable this behaviour, just like we have CORS headers.

    • @phasm42
      @phasm42 5 ปีที่แล้ว +3

      @@amunak_ The saying used to be, "Be conservative in what you send, be liberal in what you accept". But experience has shown that this leniency in what you accept results in bad data getting incorporated into future versions and standards. It sets up an incentive to make an effort to parse bad data so you're not the program that can't display site X. Over time, it gets rolled into standards.

  • @danielc7205
    @danielc7205 5 ปีที่แล้ว +10

    April Fools? (Idk for real)
    EDIT: Wow! 8 likes?!

  • @roskelpletnick9660
    @roskelpletnick9660 5 ปีที่แล้ว +4

    Wait... I can get the point of needing styles in HTML emails, there one would need to have some HTML tags. But why did they not just escape any and all unsafe characters in the search bar - you know, replace "

    • @LiEnby
      @LiEnby 5 ปีที่แล้ว +4

      Was thinking the same Google search doesn't let you do custom styling anywhere lol

    • @IOwnThisHandle
      @IOwnThisHandle 5 ปีที่แล้ว +1

      Just ...

    • @xBZZZZyt
      @xBZZZZyt 3 ปีที่แล้ว

      agree

    • @xBZZZZyt
      @xBZZZZyt 3 ปีที่แล้ว

      just why??????

  • @M1stersupersonic8
    @M1stersupersonic8 5 ปีที่แล้ว +25

    "Google is arguably the front page of the internet"
    Reddit would to have a word with you.

    • @tormenmashi_
      @tormenmashi_ 5 ปีที่แล้ว +1

      PFFT

    • @berthold64
      @berthold64 5 ปีที่แล้ว +2

      epic upbboated xD
      edit: thanks for the gold sir

    • @alevfalse7963
      @alevfalse7963 5 ปีที่แล้ว

      r/ihavereddit

  • @lordtylus9262
    @lordtylus9262 5 ปีที่แล้ว +2

    Hello,
    thank you for the very informative video, it was well explained, but I havent quite grasp the point about the XSS problem in that case. I see that you basically alter the HTML of the server to get some JavaScript executed. But as long as you dont get googles servers to execute that it should be relatively harmless right?
    You could even use like ctrl+shift+i in google Chrome to get your browers debugging and can change any HTML attribute add Scripts and what not which would get to the same result. As you have shown in the video.
    I am aware that if you happen to be able get your scripts embedded into the youtube comment section by just posting it there it will be executed by the clients of every user that watches the comments. So this indeed is a huge problem. But what exactly do you gain by executing java script on your client in your googles search bar? Because there is only you who would see it.
    Sending someone a link similar to what you got at the start of the video is of course an option, but so would any other link of a site you have control over. with a similar looking URL also its not quite seamless as you had to click into the search bar to get it executed.
    could you or someone else please explain it to me?

  • @JJ-hl5zi
    @JJ-hl5zi 5 ปีที่แล้ว +3

    Humans still working on google, don´t expect everything to be perfect...

  • @meoteormonter4582
    @meoteormonter4582 5 ปีที่แล้ว +2

  • @ibrahimimran5318
    @ibrahimimran5318 4 ปีที่แล้ว +1

    How do i Remove Code? I just add a bunch of letter to ruin the code. Like instead of id do lol

  • @martint1775
    @martint1775 5 ปีที่แล้ว +3

    Isn't there like a big bounty on exploiting Google? Did he get any money?

  • @MattZelda
    @MattZelda 5 ปีที่แล้ว +11

    Can confirm that this also works on Firefox version: 66.0.2 (64-bit)

  • @LegacyVision.
    @LegacyVision. 5 ปีที่แล้ว +4

    This is a newly exploitable bug due to fixes for IE that were coded incorrectly, so it was never always possible, just a recent change that has been reverted.

    • @JochemKuijpers
      @JochemKuijpers 5 ปีที่แล้ว

      Recent change? IE hasn't been updated for years. That bug fix was pretty old too.

    • @LegacyVision.
      @LegacyVision. 5 ปีที่แล้ว

      @@JochemKuijpers incorrect, it was badly coded compatibility fixes made to address rendering for Nintendo switch. It was about 5months in prod before rollback.
      Edit: my bad english on first comment, I meant Googles js had fixes to address IE compatibility 5/6months ago.

  • @zanidd
    @zanidd 5 ปีที่แล้ว +2

    interesting exploit, it shows that even big companies can suffer from these things

    • @renakunisaki
      @renakunisaki 5 ปีที่แล้ว

      A few years ago TH-cam had an issue where if you just put two script tags in a row (I think?) one could slip through.
      Lots of sites also just do a single pass stripping bad tags, which fails when given [scr[script butts]ipt ...]

  • @WoolieOG
    @WoolieOG 5 ปีที่แล้ว +2

    Browsers should add support to new optional header, which would fully disable any DOM corrections - for companies like google it only produces problems.

  • @fusseldieb
    @fusseldieb 5 ปีที่แล้ว +3

    One day I'll open a LiveOverflow video and suddenly a alert will pop up. One day some random user will make it.

    • @probably9085
      @probably9085 5 ปีที่แล้ว

      I will remember your words

  • @Junhexeocara
    @Junhexeocara 5 ปีที่แล้ว +7

    i always use markdown to style text inputed by user

  • @StarRayMC
    @StarRayMC 4 ปีที่แล้ว +1

    Why doesn't this work for me?

  • @Squire3555
    @Squire3555 5 ปีที่แล้ว +4

    What blows my mind is the bounty he'll probably get on this. XSS in Google's home page is a no-no.
    Browsers are kind of those weird machines. So much going on.

  • @metaorior
    @metaorior 5 ปีที่แล้ว +2

    I Just Hope something replaces HTML

  • @dnns1896
    @dnns1896 5 ปีที่แล้ว +1

    So maybe I missunderstood something, but why is it possible to enter HTML inside the Google Search bar that gets interpreted somehow? Is there any valid reason? From a Search Engine I expect, that everything that is entered in the search field gets "interpreted" as Text I am searching for.
    And the example with Webmailers shows me, that we definitely need a different Standard for those types of Input, that is not HTML. Something like Markdown or so. But not HTML that can cause Problems in Browsers.

    • @dnns1896
      @dnns1896 5 ปีที่แล้ว +1

      @Michael Murphy But why the heck is google still trying to do so? That doesn't make any sense to me. Because from how I understood that, by default the text inside a input field is not interpreted anyway.

  • @poincareless105
    @poincareless105 3 ปีที่แล้ว +1

    Every time i watch your videos i keep another mind as a spare, to replace the blown mind. thank you

  • @yarrraamm
    @yarrraamm 5 ปีที่แล้ว +1

    yeah but why not, you know, htmlentities?

  • @itaybron
    @itaybron 5 ปีที่แล้ว +1

    Me: - not knowing dick about programming -
    TH-cam: yo watch this video about programming.

  • @kartoffelwaffel
    @kartoffelwaffel 5 ปีที่แล้ว +4

    holy f that debugger tip at 10:26 blew my mind! thanks!

    • @thatLukeKneller
      @thatLukeKneller 5 ปีที่แล้ว

      I've worked in javascript for too many years and not known that... god damn

    • @bensaputra1567
      @bensaputra1567 5 ปีที่แล้ว

      Same here :D lol

  • @klyplays
    @klyplays 5 ปีที่แล้ว +2

    How come the biggest tech companies still get these kind of errors?

  • @noanyobiseniss7462
    @noanyobiseniss7462 4 ปีที่แล้ว +1

    I'ts a full time job to find backdoors and bugs snuck into systems we rely on every day.

  • @swedishstudiosgaming
    @swedishstudiosgaming 5 ปีที่แล้ว +1

    I know what you are coming from, Because that string does not make any sense even for a developer like me, The end-tags are on the wrong places & it are two end-tags missing!
    It should look like this:
    ''
    ''
    If this wasn't an *xss* script!
    // Swedenstyle34

  • @Blazagg
    @Blazagg 5 ปีที่แล้ว +2

    So then my question is: Why, in God's name, should the browser still interpret bad code? Wouldn't be easier if everything was always interpreted using whatever strict/pedantic flag the interpreter has?

    • @niter43
      @niter43 5 ปีที่แล้ว

      Because you can't just cut out half of the web if you want someone to use your browser.

    • @Blazagg
      @Blazagg 5 ปีที่แล้ว

      @@niter43 But then, why would the browsers allow such things in the first place? (speaking about the very early days)

    • @niter43
      @niter43 5 ปีที่แล้ว

      @@Blazagg I have no idea where/how it started, but it's so deep that some of them are part of HTML5 specification.
      html.spec.whatwg.org/multipage/parsing.html#parse-errors
      My best bet is that in early days there was no formal standart and/or sophisticated html editors, so browsers implemented very loose parsers, so non tech-savy users have less problems with creating their home pages.

  • @blackAngel88it
    @blackAngel88it 5 ปีที่แล้ว +5

    2:53 neither html, head or body are required elements for valid html. in a minimalistic webpage, only the title element is required. Also, we're kinda talking here about code embedded into an already existing site, so the validity only comes down to "broken" tags and non escaped characters () inside an attribute.

  • @GegoXaren
    @GegoXaren 5 ปีที่แล้ว +1

    The first example should not work at all. It should not be interpreted at all.
    That is the reason why I always send the XHTML header.

  • @otesunki
    @otesunki 4 ปีที่แล้ว

    But its in a [string]- ohhhhh.
    EDIT: ...wait search bar only filters & and " ?
    uh-oh
    Uh-Oh
    UH-OH
    EDIT 2: hmm nvm looks secure, also the unit tests were sanitizing & and "

  • @neoqueto
    @neoqueto 5 ปีที่แล้ว

    I'm so fucking not ready for anything front-end related. Front-end used to be so simple, there was nearly no need for security measures...

  • @derelictmanchester8745
    @derelictmanchester8745 4 ปีที่แล้ว

    Good tutorial, interesting title music...who is it BTW?...👍👍👍👍👍

  • @threeMetreJim
    @threeMetreJim 4 ปีที่แล้ว

    According to the Mozilla page on document.template, Internet Explorer doesn't support it. Does that mean no-one should be using Internet Explorer? I certainly don't use it, and haven't for years, with it's reputation for being the most attacked browser. I always thought the use of IE was just to download a much better browser... (Windows users only of course, but there are millions out there). I though IE had been replaced with the 'Edge' browser now, but IE is still downloadable from Microsoft.

  • @rianhasiando
    @rianhasiando 5 ปีที่แล้ว +1

    But, can i just do htmlspecialchars() to prevent it ??

  • @cunijoeme
    @cunijoeme 5 ปีที่แล้ว +1

    i was realy interested in this until i realised he sounds a little like Claus from American dad. i cant concentrate now

  • @diskpoppy
    @diskpoppy 5 ปีที่แล้ว

    It seems XSS is just basically impossible to prevent, the only solution is to dump HTML and JavaScript and PHP and replace them with something much more simple and sane that treats user input string as a string and nothing fucking else, not a tag, not a script. Like normal not-web based programs. It baffles me how web standards are so bloated and insecure when Internet is the place where the most critical security is arguably needed.

  • @mitallast
    @mitallast 4 ปีที่แล้ว

    So, js developers still don't read the documentation, but teach others. Just use document.createTextNode("")!

  • @simoneesposito5166
    @simoneesposito5166 5 ปีที่แล้ว +7

    Instructions unclear
    Ended up DoS Google servers

  • @mizistein8084
    @mizistein8084 5 ปีที่แล้ว +1

    How did i get here?
    I dont understand anything

    • @sgtsayz8636
      @sgtsayz8636 4 ปีที่แล้ว

      Mizistein Welcome... Red Pill or Blue Pill? This is where you decide

  • @ericnyamu5249
    @ericnyamu5249 4 ปีที่แล้ว

    i think he got $13,337 max. that akward comment google's love for l33t language cut down your bug bounty payout, lol

  • @mateja176
    @mateja176 5 ปีที่แล้ว

    To understand the strictness ( or lack of it ) of html we've gotta go back in time, check out this video with Prof. Brailsford th-cam.com/video/RH0o-QjnwDg/w-d-xo.html

  • @mdatheeb
    @mdatheeb 2 ปีที่แล้ว

    The payload

  • @Autom_te
    @Autom_te 5 ปีที่แล้ว

    And to noone's surprise the fix that introduced XSS was to support Internet fucking Explorer..

  • @lookingforshell2423
    @lookingforshell2423 4 ปีที่แล้ว

  • @heycherry100
    @heycherry100 5 ปีที่แล้ว +1

    Nice video

  • @powershellaxp64
    @powershellaxp64 4 ปีที่แล้ว +1

    0:05 I put ' it gives bug

  • @hereticstanlyhalo6916
    @hereticstanlyhalo6916 5 ปีที่แล้ว

    The link www.google.de/search?q=&cad=h doesn't do anything when I click in the search bar

  • @DK-ym9zv
    @DK-ym9zv 3 หลายเดือนก่อน

  • @YamekDrope
    @YamekDrope 5 ปีที่แล้ว

    How can i get to understand what is this dude is talking about? This sound so advanced that i couldn’t understand this whole thing. Where should i start at? 💔

  • @AbdelrahmanRashed
    @AbdelrahmanRashed 5 ปีที่แล้ว +2

    why do we still have XSS Vulnerabilities in 2019 ?

    • @fmattia99
      @fmattia99 5 ปีที่แล้ว

      Because HTML is bloated, XSS is one of the vulnerabilities that still happens because of a reason, SQL Injections for example are easy to avoid, and they happen only when programmers knows nothing about security, but until we will replace HTML with something less bloated and maybe a little bit more strict, we will have XSS

    • @renakunisaki
      @renakunisaki 5 ปีที่แล้ว

      Because the web is a huge pile of spaghetti and legacy cruft that's become so bloated and complex that it's impossible to do correctly.

  • @xBZZZZyt
    @xBZZZZyt 4 ปีที่แล้ว

    Why did Google do sanitizing for search field that just wants plain text (not any html tags)?

  • @32353235e
    @32353235e 5 ปีที่แล้ว

    I want to put this into face to people who shot down XHTML 5 and strict parsing by default

  • @MrNotSelc
    @MrNotSelc 5 ปีที่แล้ว +2

    April Fool?

  • @rishi8413
    @rishi8413 4 ปีที่แล้ว

  • @Kevin-rk3ef
    @Kevin-rk3ef 4 ปีที่แล้ว

    Wait a second. Youre telling me go-
    Google.com doesnt have a cross site scripting filter??

  • @henz6868
    @henz6868 2 ปีที่แล้ว

  • @esoij
    @esoij 4 ปีที่แล้ว

  • @Drqonic
    @Drqonic 4 ปีที่แล้ว

    Curious to know why they aren't using htmlspecialchars or entities :|

  • @AbwasserAbdul
    @AbwasserAbdul 5 ปีที่แล้ว +2

    Im very noob but can someone maybe say what someone could do with this vulnerability?

    • @Mar_Ten
      @Mar_Ten 5 ปีที่แล้ว +2

      timmithan letting someone click a google link and execute JS on that.

    • @AbwasserAbdul
      @AbwasserAbdul 5 ปีที่แล้ว

      ahh okay, thx 👍@@Mar_Ten

  • @germimonte
    @germimonte 3 ปีที่แล้ว

    Xss only exists bc the browser assumes all web devs are ****, which is tough but fair

  • @oReMoDuLaTex
    @oReMoDuLaTex 5 ปีที่แล้ว

    Fucking ELITE HAXOR GOD

  • @yusufislek3669
    @yusufislek3669 5 ปีที่แล้ว +2

    0:05
    *flackback*
    i try put '
    it gives bug

  • @hotbarango
    @hotbarango 3 ปีที่แล้ว

    I wonder if this guy (Nick Reid) is still allowed to make commits.

  • @RovelStars
    @RovelStars 3 ปีที่แล้ว

    Browsers are not wierd, but the way programmers code are.

  • @Asumji
    @Asumji 4 ปีที่แล้ว

    Aha google offered in Deutsch are you german?