Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Cross-Site Scripting Hits Major Sites

Posted by CmdrTaco on Mon Sep 25, 2006 10:09 AM
from the scriptdidy-doo-daa-scriptdidy-day dept.
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."
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • The Cross Site Scripting FAQ (Score:5, Informative)

    by mrkitty (584915) on Monday September 25 2006, @10:12AM (#16185615)
    (http://www.cgisecurity.com/)
  • Scripting? (Score:3, Funny)

    by Anonymous Coward on Monday September 25 2006, @10:16AM (#16185667)
    <script language="javascript">document.write("It's very hard to check for XSS. I can understand why most people don't bother.")</script>
    • Re:Scripting? by loquacious d (Score:1) Monday September 25 2006, @02:15PM
    • 1 reply beneath your current threshold.
  • Finally (Score:2)

    by suso (153703) * on Monday September 25 2006, @10:21AM (#16185741)
    (http://suso.suso.org/ | Last Journal: Tuesday March 09 2004, @12:03AM)
    You know, I've been waiting for this feature on weather.com
    • 1 reply beneath your current threshold.
  • Scanners not able to find XSS (Score:3, Informative)

    by possible (123857) on Monday September 25 2006, @10:22AM (#16185751)
    The reason most vuln scanners can't find XSS vulns on modern sites is because of the increased amount of JavaScript and Flash (with ActionScript) that's in use. But some scanners [rapid7.com] can grok this stuff to varying degrees of completeness.
  • Move on... (Score:2, Informative)

    by 955301 (209856) on Monday September 25 2006, @10:30AM (#16185899)
    (Last Journal: Thursday December 08 2005, @11:00PM)

    So would it be technically possible at this point to move away from the web application and back to the client server app? Here's a path example:

    * Java Client
    * Servlet Interface for the client
    * Java webstart deployment
    * Java plugin on the clients

    For this path the questions would surround authenticating the client and the hassle of installing the java plugin.

    Rinse and repeat for the obligatory Microsoft solution.

    I've never been a fan of web applications and form given the simplicity of creating an SQL injection attack or XSS for that matter. At least if the client application was built for the specific application you expose yourself to less or more obscure security vulnerabilities by nature.

    • Re:Move on... by CommandNotFound (Score:2) Monday September 25 2006, @11:04AM
    • Re:Move on... by dwarfking (Score:1) Monday September 25 2006, @11:04AM
    • Re:Move on... by a.d.trick (Score:2) Monday September 25 2006, @11:18AM
      • Re:Move on... by 955301 (Score:2) Monday September 25 2006, @02:42PM
    • Re:Move on... by profplump (Score:2) Monday September 25 2006, @11:42AM
      • Re:Move on... by 955301 (Score:2) Monday September 25 2006, @02:33PM
        • Re:Move on... by profplump (Score:1) Monday September 25 2006, @04:08PM
    • 1 reply beneath your current threshold.
  • In soviet russia.. (Score:4, Funny)

    by djuuss (854954) on Monday September 25 2006, @10:30AM (#16185909)
    .. XSS links YouTube
  • scanners (Score:3, Interesting)

    by rilian4 (591569) on Monday September 25 2006, @10:34AM (#16185953)
    (Last Journal: Saturday December 30 2006, @09:44PM)
    ...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...
    • Re:scanners by From A Far Away Land (Score:3) Monday September 25 2006, @10:37AM
    • 1 reply beneath your current threshold.
  • But of course Slashdot... (Score:4, Funny)

    by Billosaur (927319) * <wgrother&optonline,net> on Monday September 25 2006, @10:35AM (#16185965)
    (Last Journal: Wednesday November 07, @10:09AM)

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

    • Re:But of course Slashdot... (Score:5, Interesting)

      by _xeno_ (155264) on Monday September 25 2006, @10:48AM (#16186163)
      (http://www.xenoveritas.org/ | Last Journal: Monday September 24, @04:04PM)

      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.

      [ Parent ]
  • Web 2.0 anyone? (Score:2, Insightful)

    by griffon666 (1005489) on Monday September 25 2006, @10:39AM (#16186015)
    Web 1.0: Simple fishing scam
    Web 2.0: Cross-Site Scripting
  • JavaScript/browser design flaw (Score:5, Insightful)

    by oohshiny (998054) on Monday September 25 2006, @10:49AM (#16186185)
    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.
  • 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 [popularscience.com] 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.

  • Too Lazy? (Score:2, Informative)

    by Anonymous Coward on Monday September 25 2006, @11:07AM (#16186425)
    It looks like the attacks can be prevented by simple user input validation. Are the above mentioned high profile website developers/architects being too lazy or nobody knew about this type of vulnerability until recently ? I cant see how Joe Average will know about this exploit because he will not bother to read the query string(or even understand what it does) if it points to major website.
  • Experienced this firsthand. (Score:2, Interesting)

    by Anonymous Coward on Monday September 25 2006, @11:07AM (#16186439)
    I've seen the interesting effects of this first hand with a customers server, which I was tasked to unhack. Took a while to spot the reason the server was hacked because stupidly I didn't think of XSS when I considered the range of hacks that had occurred. When I did finally start grepping the access_logs and saw the rather odd things being passed through an enquiry form script things started to piece together. I've filched a copy of the script passed and its quite impressive, though its probably reasonble to stake a claim on the hacker not being the script writer given the sheer wealth of comments and how to customize tips present. n00bishly (but then I'm not employed to harden boxes, nor am I a website programmer) I didn't expect a site to be quite so vulnerable to such a range of exploitation through XSS. The script I have includes stuff to exploit unpatched mysql to create new users, passes a load of hex strings I won't even hazard a guess at their purpose etc. etc.
    As a geek I appreciate it the technical qualities, as the guy who had to unhack an exploited server however.. :)
  • Where is the law in these cases?

    I'm sure there are ways to know who the hacker is, so why don't they use the information to catch the criminals and put them on trial?
  • Which is why I always use SafeHTML [pixel-apes.com] whenever my applications ask for input.
    • 1 reply beneath your current threshold.
  • Validate, Validate AND Validate (Score:5, Insightful)

    by Joe U (443617) on Monday September 25 2006, @12:09PM (#16187251)
    (http://slashdot.org/ | Last Journal: Monday August 20, @10:21AM)
    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.
  • XSS attempts I've noticed (Score:5, Interesting)

    by trevdak (797540) on Monday September 25 2006, @12:17PM (#16187347)
    (http://www.trevoroldak.com/)
    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.
  • PayPal had it yesterday (Score:1, Interesting)

    by Anonymous Coward on Monday September 25 2006, @01:25PM (#16188395)
    PayPal had it yesterday. I went there and got a cert pop up. The cert was for ebayobject.com, not www.paypal.com. Needless to say, I ran, and I ran fast.
  • by Dom2 (838) on Monday September 25 2006, @03:52PM (#16191095)
    (http://happygiraffe.net/blog/)

    How many "web" templating systems do you know that automatically escape HTML unless told otherwise? I know of one that can be made to do so: Mason [masonhq.com]. Even then, you have to enable it, as it's not turned on by default.

    What about PHP, ASP, JSP and so on? Will they ever grow up and automatically escape HTML by default? I doubt it very much.

    In the meantime, there's always mod_security [modsecurity.org] if you're willing to invest the time configuring it. But it's no guarantee...

    -Dom

  • I quite often see people using $PHP_SELF ( or better $_SERVER['PHP_SELF'] ) in their php applications (for example, for the form action on a self posting form). What most  of them don't realise is that it is user input, and very easy to inject any content into this.

    I think this is a major XSS vector, because this is unknown (really now, wouldn't you expect a $_SERVER variable to be safe?)

    For example:

    <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="get">
       <input type="text" name="field" />
       <input type="submit" />
    </form>

    Going to - page.php/"<script>alert('xss');</script> will work quite nicely (note the trailing slash after the page name).

    There's a good discussion of it at <URL:http://blog.phpdoc.info/archives/13-guid.html >
  • by utube (1006255) on Tuesday September 26 2006, @09:14PM (#16209663)
    (http://utubevideos.blogspot.com/)
    They've been around much longer than this report suggests.
  • Any solution (Score:1)

    by vz3phyre (1003163) on Thursday September 28 2006, @09:13AM (#16228773)
    Hi guys! I am still learning to build a trusted websites for my own used... any recommended sites for me to refer?
  • Re:Why? (Score:2, Insightful)

    by RevDobbs (313888) * on Monday September 25 2006, @10:30AM (#16185901)
    (http://slashdot.org/)
    For most contracts, if you aren't paying experienced developers, there should still be money in the budget for a pro to give the code the once over and do a sign-off.

    Have you ever read poorly-written, newbish code?

    For anything non-trivial, it would probably be quicker and cheaper to have the "pro" write the code in the first place than to pay him for his time to read, understand, and correct a steaming pile of turd spaghetti.

    [ Parent ]
    • Re:Why? by mcfuddlerucker (Score:1) Monday September 25 2006, @10:34AM
      • Re:Why? by Schraegstrichpunkt (Score:2) Monday September 25 2006, @11:30AM
    • Re:Why? by w00f (Score:1) Monday September 25 2006, @10:49AM
    • Re:Why? by suggsjc (Score:2) Monday September 25 2006, @11:02AM
      • Re:Why? by msuzio (Score:2) Monday September 25 2006, @11:07AM
    • Been there, done that. by Medievalist (Score:3) Monday September 25 2006, @11:11AM
    • 1 reply beneath your current threshold.
  • Re:Why? (Score:4, Insightful)

    by Schraegstrichpunkt (931443) on Monday September 25 2006, @10:59AM (#16186321)
    (http://www.faqs.org/rfcs/rfc3675.html)
    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 [thedailywtf.com].

    [ Parent ]
    • 1 reply beneath your current threshold.
  • Re:FUD (Score:2)

    by julesh (229690) on Monday September 25 2006, @01:40PM (#16188627)
    who cares `bout XSS when we have IE 0dayz around...

    People who only browse trusted sites and are suddenly having their IE installations exploited via those 0-days because somebody used an XSS attack to insert them into those sites.
    [ Parent ]
    • Re:FUD by utube (Score:1) Tuesday September 26 2006, @09:08PM
      • Re:FUD by julesh (Score:2) Wednesday September 27 2006, @02:19PM
  • 5 replies beneath your current threshold.