Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Microsoft Security Software IT

Microsoft To Release Emergency Fix For ASP.NET Bug 73

Trailrunner7 writes "Microsoft on Tuesday will release an emergency out-of-band patch for the ASP.NET padding oracle attack that was disclosed earlier this month. The patch will only be available on the company's Download Center for the time being, however. The company is taking the step of releasing an emergency fix for the bug because of the seriousness of the vulnerability — which potentially affects millions of Web applications — and the fact that there are attacks ongoing against it already. The patch will fix the flaw in all versions of the .NET framework. Although Microsoft issued guidance about workarounds to defend against attacks on the ASP.NET bug shortly after it was publicly disclosed, the researchers, Juliano Rizzo and Thai Duong, said that the workarounds did not fully protect users against their attack."
This discussion has been archived. No new comments can be posted.

Microsoft To Release Emergency Fix For ASP.NET Bug

Comments Filter:
  • by TheLink ( 130905 ) on Monday September 27, 2010 @09:57PM (#33719116) Journal

    Microsoft is investigating a new public report of a vulnerability in ASP.NET. An attacker who exploited this vulnerability could view data, such as the View State, which was encrypted by the target server, or read data from files on the target server, such as web.config.

    Why would decrypting a cookie allow you to read data from files on the target server?

    What if you just use cookies for storing session ids?

    Using cookies to store lots of secrets seems like a stupid idea to me. Server-side secrets belong server-side.

    Furthermore what if the user wants to use more than one browser window? If you are too reliant on cookies to store state it means the webapp would get confused in that scenario.

    • by D Ninja ( 825055 ) on Monday September 27, 2010 @10:16PM (#33719208)

      First off...it's not a "decrypted cookie" - it's not that at all. The entire bug allows an attacker to download server-side information (such as web.config) which can potentially contain (and often does) information that should not be public.

      Scott Guthrie wrote up a very detailed post on the vulnerability [asp.net]. It's fairly easy to exploit (there are videos available showing the ease in which it can be exploited), so it should be of concern to administrators and individuals writing websites/web applications running on ASP.NET.

      • I really don't understand why some random client can access such information, even after breaking any encryption mechanism.

        From http://blogs.technet.com/b/srd/archive/2010/09/17/understanding-the-asp-net-vulnerability.aspx [technet.com]

        "For example, if the ASP.Net application stores sensitive information, such as passwords or database connection strings, in the ViewState object this data could be compromised. The ViewState object is encrypted and sent to the client in a hidden form variable, so it is a possible target of

        • If the ASP.Net application is using ASP.Net 3.5 SP1 or above, the attacker could use this encryption vulnerability to request the contents of an arbitrary file within the ASP.Net application.

          Breaking the encryption is one thing, that is just !!!! GAH !!!

          Does that mean that a client that is authorized with a key to decrypt the encryption has access to "an arbitrary file within the ASP.Net application"?

          This would then seem like 2 very different issues: the oracle helping break the encryption, and the "request

      • Re: (Score:1, Troll)

        by ls671 ( 1122017 ) *

        But, but...

        Being an equal opportunity fan and enjoying playing the devil advocate, I went to search for an instance where a remote attacker could read web.xml to no avail.

        web.xml is used by multiple application server implementations offering the most prevalent alternative to ASP.NET.

        So did anybody ever heard of a security hole that allowed a remote attacker to read web.xml ?

      • by TheLink ( 130905 )
        Does that really mean if anyone knows the secret they can get any file the webserver can access?

        If that's true about ASP.NET in general, then ASP.NET's _design_ is broken.

        In contrast, with sane designs, I could even tell you the db password that the webapps use to access data/state from the db, but if you're outside, you can't touch anything (unless you're one of those elite hackers who have dozens of "zero days" stored up for a rainy day).

        You could even have the ssh login credentials, but you'd have to get
    • Re: (Score:3, Informative)

      by spongman ( 182339 )

      the padding oracle vulnerability allows you to do two things:
      1) decrypt cyphertet that has been encrypted using the site's machineKey
      2) encrypt arbitrary plaintext as if you knew the machineKey

      it doesn't give you the machineKey, but you can encrypt/decrypt as if you had it.

      There's another vulnerability that allows you to download arbitrary files (even 'protected' ones) if you are able to encode plaintext with the site's machineKey. ScriptResource.axd is used by asp.net to compress/bundle scripts, and it tak

      • You are wrong. This vulnerability is actually an artifact of the underlying encryption algorithm, and as such other products are also vulnerable, e.g. JSF (for which attacks were demonstrated before the ASP.NET one) and Ruby-on-Rails. It allows you to retrieve the full key. And the key is symmetrix, meaning that you can both decrypt and encrypt.

        The attacker can gradually learn the exact machine key by manipulating something he knows to be encrypted. By padding the encrypted text from the end, and watching t

        • Re: (Score:3, Informative)

          by spongman ( 182339 )

          You are wrong. This vulnerability is actually an artifact of the underlying encryption algorithm, and as such other products are also vulnerable, e.g. JSF (for which attacks were demonstrated before the ASP.NET one) and Ruby-on-Rails.

          the vulnerability isn't in the encryption algorithm, it's in the implementation of the CBC [wikipedia.org] operation of the block cypher.

          It allows you to retrieve the full key. And the key is symmetrix[sic], meaning that you can both decrypt and encrypt.

          No, the oracle doesn't give you the key. The key and the encryption algorithm are irrelevant. The oracle allows you to retrieve the IV [wikipedia.org] for a given cypher block, but most importantly it allows you to encrypt/decrypt without the key.

          The attacker can gradually learn the exact machine key by manipulating something he knows to be encrypted. By padding the encrypted text from the end, and watching to see whether the server decryption fails or he hits something which *can* actually decrypt (but which may causes the app to fail), he can learn something about the key. Presumably this is because he knows that the last part of the key is used to encrypt the last part of the text. Anything encrypted will do. Even the timing of the failure may offer the attacker valuable information, e.g. failure to decrypt results in faster fails than the application trying to run with something which actually decrypted without error only to fail a little later.

          The above is mostly correct, but again, the attacker doesn't learn the key, just the IV required to generate correct padding.

          This is not specific to ASP.NET. But ASP.NET happens to use the machine key to encrypt authentication tickets.

          The built-in authentication methods

  • by Anonymous Coward on Monday September 27, 2010 @10:19PM (#33719224)

    Better link for details and workarounds:

    http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx

  • by 93 Escort Wagon ( 326346 ) on Monday September 27, 2010 @10:23PM (#33719248)

    So does this involve an Oracle database somehow - in which case "Oracle" should have been capitalized - or are we talking about a real, honest-to-goodness oracle? Did the attack originate in Greece?

    • Re: (Score:1, Informative)

      by Anonymous Coward

      Oracle in the sense of an oracle telling you information.
      The delay in the response among other things reveals the key.

    • by jamesh ( 87723 )

      So does this involve an Oracle database somehow - in which case "Oracle" should have been capitalized - or are we talking about a real, honest-to-goodness oracle?

      For a moment I thought we were talking about _the_ Oracle, although that also should have been capitalized. I think it's unwise to draw any conclusions from spelling or grammatical forms that you might see on the internet though. Even more unwise if the source is slashdot :)

      For instance, if you saw the phrase "I had to help my uncle Jack off a horse" [urbandictionary.com] on slashdot, it would be probably still be a story about equine masturbation.

    • Re: (Score:1, Funny)

      by ardeez ( 1614603 )

      Did the attack originate in Greece?

      Yeah, it was written in Dephi

    • No, it was developed by Atreyu in Fantasia. Falkor helped.
  • Release it as an optional download in the download center. I'm sure that the vast majority of Windows admins (especially shared web hosts, but ) will get that installed right away! While I understand why they have to do it this way (forcing an update on your enterprise clients is generally Very Bad for some very valid reasons), I would think that they (and those who could be impacted) would be better served if they said "This will be available for 3 days on the download center for you to download and test
    • by Anpheus ( 908711 )

      It will be released as the highest level of critical update on Windows Update for home and small business users and for WSUS for small to large enterprise users that control patch distribution in-house. The former will be able to choose to ignore the update (but if they ever called support, the question "Are you up to date?" could come up) and the latter can even choose to require the update by a deadline in their business. If some department neglects to schedule and manually install at an appropriate time,

  • A quick explanation (Score:5, Informative)

    by rabtech ( 223758 ) on Monday September 27, 2010 @10:45PM (#33719360) Homepage

    First, the ViewState is encrypted so figuring out the key allows you to inject your own data into the ViewState. The worse an app's code, the worse the exploit on this because some apps even store their "IsAdmin" flag in the ViewState and other such nonsense, so this lets you impersonate any user you like. DotNetNuke is one example of a crappy system. Worse, it allows you to upload ZIP files of themes and whatnot, so you can use this to impersonate the superuser, upload some hacks, then try to execute them. Depending on what account ASP.Net runs under and whether you are fully patched, this can lead to escalation to admin and owning the box. If you have followed all the other in-depth security practices (and for coders don't store any sensitive info in the ViewState) then this isn't nearly as big of a deal.

    The big hole is that starting with 3.5 SP1 (and also in 4.0) the WebResource.axd handler takes an encrypted filename as its parameter, so you can encrypt say "web.config" and get it to happily pipe web.config to you... or any other file. It completely bypasses the normal restricted file handler. In previous releases this was not the case, the stuff it would let you download was much more limited. Granted, there are facilities to encrypt connection strings/etc in web.config, but a lot of people are lazy and just deploy with plaintext passwords and whatnot. Again, following defense in-depth practices greatly restricts the scope of any potential attack.

    IMHO the WebResource.axd issue is inexcusable. There is no legitimate reason for allowing the new behavior.

    • by ls671 ( 1122017 ) *

      WTF ?

      Is this serious ? I thought rule 1 of using cookies was to only put meaningless data into one. I am still having a hard time to believe this is occurring out of the box in an enterprise platform like ASP.NET.

      • by Anonymous Coward on Monday September 27, 2010 @11:04PM (#33719416)

        Seriously? This is the second reply to this story that seems to think that it's about cookies.

        Please listen carefully: this has NOTHING to do with cookies!

        As the GP post and Scott Guthrie's post linked elsewhere (so helpfully) explain, this affects two encrypted elements in use by most (if not all) ASP.NET apps: the ViewState (not a cookie, rather a hidden, encrypted field for storing state across postbacks) and encrypted web.config files which tend to store sensitive connection info (among other things) that needs to be protected from attackers. The flaw allows attackers to decrypt these storage mechanisms and so get at (potentially) sensitive data, depending on how the app was coded.

        • Re: (Score:3, Interesting)

          by ls671 ( 1122017 ) *

          > not a cookie, rather a hidden, encrypted field for storing state across postbacks

          Thanks a lot for the clarification, it seriously helps me understand the problem better and I really mean it.

          Now I will re-phrase my post:

          WTF ?

          Is this serious ? I thought rule 1 of using hidden form fields was to only put meaningless (OK: or already submitted data by the user) data into one. I am still having a hard time to believe this is occurring out of the box in an enterprise platform like ASP.NET.

          A hidden form field

          • Re: (Score:1, Interesting)

            by Anonymous Coward

            Hey, you won't find me disagreeing on your point about not storing sensitive things in cookies or ViewState and, as the OP pointed out, with proper security practices in place, this is less of an issue than having your encrypted web.config file exposed.

            As for your disbelief, I honestly can't imagine having the foresight to protect against an attack that involves:

            This allows an attacker to send cipher text to the web server and learn if it was decrypted properly by examining which error code was returned by the web server. By making many such requests (and watching what errors are returned) the attacker can learn enough to successfully decrypt the rest of the cipher text.

            and the TechNet site even mentions that an attacker can use the timing of the response to deduce the type of error (devious!) even if you use the

            • by ls671 ( 1122017 ) *

              > but can affect other frameworks that use similar mechanisms.

              Yep, JSF included apparently ;-)

              Some people tend to forget rule 1...

              I mean it must be just too easy to store a meaningless token in a cookie or hidden form field and to map it to something meaningful on the server. Why adopt the easy way when we can do more complicated stuff some would say ?

            • Since modern ciphers appear to be completely unbreakable when used properly, people have been turning to "side-channel" attacks, such as observing the timing or where the CPU heats up or such things to break into the processing of the cipher and getting clues about the key. These are becoming increasingly common and important.

              There are reasonable people out there who trust AES just fine when all encryption and decryption is done off-line, but don't if a possible attacker can get timing information or so

              • by ls671 ( 1122017 ) *

                > completely unbreakable

                By design, they are meant to be broken so why take a risk that brings you nothing when an easy alternative is available ?

                There is many stories about encryption being broken and attackers taking advantage of it.

                Only rely on encryption when you have no other choices. See poster below about best practices.

          • Making up rules after the fact when an exploit is found doesn't make you wise, it makes you look like a smart ass. Please point up to where somebody that matters said that posting encrypted data was not good enough BEFORE this was know. Encrypted data seems pretty meaningless to me.

    • by Yaur ( 1069446 )
      It isn't WebResource.axd... its ScriptResource.axd that has the file download vulnerability.
      The purposes of this (mis)feature is to allow the ScriptManager to prevent clients from using stale versions of a script from cache. The problem is that ScriptResource.axd doesn't sanity check what kind of files it is serving up. Furthermore, since this behavior is out in the field it is impossible for MS to know if anyone is using it, so "fixing" it might break some unknown customers' sites in a way that is non t
    • Re: (Score:1, Informative)

      by Anonymous Coward

      First, the ViewState is encrypted so figuring out the key allows you to inject your own data into the ViewState.

      The hidden ViewState field is not encrypted. It's base-64 encoded, which is a big difference. You can view any .NET page's ViewState field contents by simply running it through a base 64 decoder. THAT'S why you're not supposed to store sensitive shit in it...it was never encrypted in the first place, and any jackass willing to read the documentation to .NET can explore it freely.

      "This combined, saved state is then serialized into a base-64 encoded string. In stage 7, when the page's Web Form is rendered, th

      • by Shados ( 741919 )

        Its not encrypted (by default: it -CAN- be encrypted using features out of the box), but there is a hash to prevent tempering of the viewstate.

        However you have to be careful, by default this is still vulnerable to a replay attack, so its still better not to push your luck with it.

  • must be larry who's behind all this ...
  • am I just overlooking it?

Technology is dominated by those who manage what they do not understand.

Working...