Slashdot Mirror


Cross-Site Scripting Hits Major Sites

An anonymous reader writes "Dark Reading and SC Magazine covered a story about hackers posting cross-site scripting (XSS) vulnerabilies en mass on dozens of high profile websites including Dell, MSN, HP, Apple, Myspace, YouTube, MSN, Cingular, etc. The media coverage drew the hacker's attention to the publication's websites where they got a taste first-hand. On message board wall-of-shame is PC World, MacWorld, Fox News, the Independent, and ZDNet UK. "...not only did we get the "scoop" on the XSS site problems, but we also got the message loud and clear: Don't assume you're immune to XSS vulnerabilities. They're everywhere." The news comes shortly after Mitre (CVE) released statistics showing XSS has become the most popular exploit. Unfortunately new XSS attacks are growing increasingly severe and scanners are unable to find many of the issues on modern websites."

20 of 161 comments (clear)

  1. The Cross Site Scripting FAQ by mrkitty · · Score: 5, Informative
    --
    Believe me, if I started murdering people, there would be none of you left.
    1. Re:The Cross Site Scripting FAQ by Dwonis · · Score: 4, Interesting

      I particularly like this example.

      Here's the spoiler.

    2. Re:The Cross Site Scripting FAQ by blowdart · · Score: 5, Informative
      No it doesn't. Cross site scripting works by adding a script tag to the source page. For example, imagine you have allowed scripts from slashdot because you can't use the new comments system without it.

      Now an evil hax0r manages to insert an XSS attack on slashdot what would happen is the attack would be embedded in a normal slashdot page, as a block. So the source would be from slashdot.org, and noscript would view it as being allowed.

    3. Re:The Cross Site Scripting FAQ by blowdart · · Score: 3, Informative

      I was talking generically; anyway the redirect is not an XSS attack at all.

  2. Scripting? by Anonymous Coward · · Score: 3, Funny

    document.write("It's very hard to check for XSS. I can understand why most people don't bother.")

  3. In soviet russia.. by djuuss · · Score: 4, Funny

    .. XSS links YouTube

    --

    my capcha was condom
  4. Re:I don't get XSS by truthsearch · · Score: 3, Interesting

    Actually, CS 101 is data types and algorithms. Earning my CS degree taught me little of input validation. Most programmers learn security in one of two ways: proactively reading up on it or having one of their applications hacked. Unfortunately I think many average programmers don't consider input validation as much of a priority until after a hole they provided is exploited. When I ask many web developers what they do to prevent SQL injection attacks, for example, only about half have even considered it. Scary.

  5. scanners by rilian4 · · Score: 3, Interesting
    ...and scanners are unable to find many of the issues on modern websites
    Obviously the hackers can find systems with this vulnerability...ergo there exists a means to scan for it...

    Draw you own conclusions from there...
    --

    ...quicker, easier, more seductive the darkside is...but more powerful, it is not.
  6. But of course Slashdot... by Billosaur · · Score: 3, Funny

    ...remains unaffec... FOJSF{09fiE*EU90av['vlwIOA934MAwadpskf[aepfkfa[-09 u9a

    --
    GetOuttaMySpace - The Anti-Social Network
    1. Re:But of course Slashdot... by _xeno_ · · Score: 4, Interesting

      A while ago, someone posted a link to a webpage that, when clicked, caused their post to be moderated up. Their post was at +5 for quite a while until enough replies got moderated up pointing out that the link wasn't what it claimed to be.

      So, in a sense, Slashdot has already been hit by a cross-site scripting vulnerability. The fix for XSS vulnerabilities like that involves requiring a secret token to be sent to take user actions, to prevent people from creating forms off-site and submitting them as the user. I suppose checking the referrer may work too, but I wouldn't count on it.

      --
      You are in a maze of twisty little relative jumps, all alike.
  7. Re:I don't get XSS by Yvanhoe · · Score: 3, Informative

    That's it. They allow users in forum to post links, and URL. URL can have a lot of strange characters in it, & ? ! # etc... Apparently, the basis of XSS is to make a link that appears like a valid URL but that will, in some clients, execute as a javascript code, usually in order to steal cookies (therefore, an opened session) of the user watching the post. There seems to be a shield vs sword thing growing between attackers and web developers. You have numerous ways of "hiding" a code in an URL, hexadecimal notation, strange utf-8 characters and so on. Here again, an incomplete implementation of a standard is the cause of major headaches.

    --
    The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
  8. JavaScript/browser design flaw by oohshiny · · Score: 4, Insightful

    Before web designers blame themselves for this, the existence of XSS is really a fundamental design flaw in the way JavaScript and browsers work. It should have been obvious as soon as JavaScript came out that these kinds of attacks would become a major issue over time, but the "ooh shiny" attitude of the computer industry meant that people adopted JavaScript without knowing what the implications were. In fact, the other big security hole and productivity drain of the industry, C/C++, got adopted in a similar way.

    Writing any substantial piece of software in C, C++, or JavaScript without creating safety or security issues is extremely expensive and beyond the ability or resources of most developers. For C and C++, there are alternatives you can choose today. For JavaScript, you just have to minimize its use or simply not worry about it and let the client fix it with tools like NoScript.

  9. Re:Why? by Schraegstrichpunkt · · Score: 3, Insightful
    What we have is total morons passing themselves off as web developers, just like we have thousands of "web designers" who don't know the meaning of the word "design".

    "Web design" is for aesthetics and graphics people, like "interior design". Of course you run into problems when you have a web designer doing development work!

    As for "No web developer has written XSS vulnerable code since 2002", I refer you to The Daily WTF.

  10. I do my duty and report them. . . by Hero+Zzyzzx · · Score: 5, Insightful

    but it's probably pointless. Not enough developers care about their craft.

    There's a prominent "popular science" website out there (no, it's not this one that I'm thinking of) that has ENORMOUS XSS vulnerabilities in its image gallery. They pass captions and img src in URL encoded query string parameters. Yuck.

    I noticed this about a year ago and reported it to the development team, with a demonstration link that put in a (sorta not nice) image and caption. No response, and when I checked six months ago the vulnerability was still there. So much for being a nice guy.

  11. Re:I don't get XSS by RevDobbs · · Score: 3, Interesting
    Earning my CS degree taught me little of input validation.

    Maybe I lucked out with a particularly cluefull teacher, but input validation was beaten into me learning Basic on an Apple II(e?) in high school: everyone fails the first round of the Craps game assignment when the teacher asks "what happens when I bet a negative amount?".

  12. Re:Web 2.0 anyone? by blowdart · · Score: 4, Insightful

    Bad assumption. If you're assuming everything is coming down correctly encoded you're a fool, all it takes is a bit of javascript that submits to your back end without encoding and *bang*

  13. You get what you pay for with developers... by queenb**ch · · Score: 3, Insightful

    The biggest problem is farming everything in the world out to $8/hr guys in some foreign country. If you pay $8/hr, you're going to get an $8/hr guy. Keep in mind that Wal-Mart starts at $9/hr. Given these two statements, I fail to see why it's surprising that such simply fixed vulnerabilities continue to plague software.

    2 cents,

    QueenB

    --
    HDGary secures my bank :/
  14. Re:I don't get XSS by Jerf · · Score: 3, Interesting
    Apparently, the basis of XSS is to make a link that appears like a valid URL but that will, in some clients, execute as a javascript code
    No, that's just one way to do it. XSS is any insertion of Javascript code into a site that shouldn't be there, and there are a surprising number of ways to do that. <a href="javascript:alert('hi!')">text</a> is just one of the easier ones.

    I say this because people need to be aware that links are not the only vector. My favorite one I've seen so far is <bgsound src='javascript:bad_code()'>. If you choose poorly and are trying to filter out bad tags (instead of what you should be doing, specifying only exactly what tags and attributes are allowed and forbidding anything else that looks like a tag), did you remember to block out the BGSOUND tag? If not, that auto-executes; it doesn't even need to be clicked. (IE may have closed that; I saw this in the IE 4 era.)
  15. Validate, Validate AND Validate by Joe+U · · Score: 5, Insightful

    I'm a web developer and I've said this dozens of times.

    VALIDATE ALL INPUT EVERYWHERE.

    Validate on the client. (For bandwidth reduction)
    Validate at the APP Tier (For security)
    Validate at the Data Tier(For security and integrity)

    If you accept input from a web page, scrub it, and that doesn't mean stripping brackets or quotes, it means putting in a list of valid characters and tossing or replacing absolutely everything else.

    Yes, you might wind up validating something that doesn't need to be validated or scrubbing something that doesn't need to be, the performance hit is worth it.

    Also, Stored Procedures are a great resource, if you design them properly you add an extra layer of security that can actually improve your application performance. (All my recent projects have Stored Procedure execute only rights.

    If your db code has select * from table in it, you're doing it wrong.

    Ok, enough ranting from me.

  16. XSS attempts I've noticed by trevdak · · Score: 4, Interesting

    As a content manager for the U of Rochester when I was a student there, I witnessed thousands of attempts at XSS every month. All of this thanks to one idiot who decided he wanted to put a mambo website up on the student activities server, we had our main server breached and multiple websites defaced. once you're breached, everyone wants to try to hack you again. One interesting thing I noticed is that the majority of XSS attempts will try to call a script in a file with a .gif or .jpg name. This way, if a curious person sees the attempt and tries to visit the linked script, all they get is a broken image. However, the file_get_contents php function, or other such functions, will read those as PHP. I've seen these scripts uploaded to government websites, university servers and many other places. The one that was put on the U of Rochester server attempted to delete all of the files on the server and put in code for what looked like a perl proxy server (i dunno, it was kinda obfuscated, and I'm not too good at perl yet). The XSS scripts are quite complex, too. Some of them create HTML/javascript console interfaces for people to interact with the server as if they had an SSH connection. And they're all over the place. I've got a website that's had less than 1000 hits, and I've seen three separate attempts to use XSS on it.