Slashdot Mirror


XML Encryption Broken, Need To Fix W3C Standard

gzipped_tar writes "Researchers from Ruhr University Bochum demonstrated the insecurity of XML encryption standard at ACM Conference on Computer and Communications Security in Chicago this week. 'Everything is insecure,' is the uncomfortable message from Bochum. As pointed out by the Ars Technica article, XML Encryption is used widely as part of server-to-server Web services connections to transmit secure information mixed with non-sensitive data, based on cipher-block chaining. But it is apparently too weak, as demonstrated by Juraj Somorovsky and Tibor Jager. They were able to decrypt data by sending modified ciphertexts to the server by gathering information from the received error messages. The attack was tested against a popular open source implementation of XML Encryption, and against the implementations of companies that responded to the responsible disclosure — in all cases the result was the same: the attack worked. Fixing the vulnerability will require a revision of the W3C XML encryption standard, Somorovsky said. The researchers informed all possibly affected companies through the mailing list of W3C, following a clear responsible disclosure process."

16 of 80 comments (clear)

  1. Never was a good idea by inglorion_on_the_net · · Score: 3, Funny

    XML is like violence: if it doesn't solve the problem, use more!

    --
    Please correct me if I got my facts wrong.
    1. Re:Never was a good idea by Anonymous Coward · · Score: 2, Insightful

      XML is like violence: if it doesn't solve the problem, use more!

      Is it just me, or did this saying lose its pithiness about 6 months ago?

      I'm afraid it's just you. For the rest of us, it lost its pithiness 6 years ago.

    2. Re:Never was a good idea by Darinbob · · Score: 4, Funny

      No, it's more like alcohol in that sense. The more you use the less you worry about the underlying problems.

  2. Why is there such a thing as XML encryption? by SpazmodeusG · · Score: 4, Insightful

    Use encryption algorithms to encrypt data.

    Use document formats to contain data.

    But don't go creating specific encryption algorithms for specific document formats. That's just reinventing the wheel.

    1. Re:Why is there such a thing as XML encryption? by Schmorgluck · · Score: 4, Insightful

      XML is very useful as an unified markup language. I'm fond of its versatility, relative legibility, and yeah, the various applications that are made to apply to itself especially Schema and XSLT. But it's not relevant to everything, and theres a fad to use it even where it's stupid.

      Some times ago, in GNU/Linux Magazine France, someone who signed "Jean-Pierre Troll" wrote an article to protest against the tendancy to put XML everywhere. He for example rightfully shot down XML as a programming language, and as a way to carry binary data. Even for the transmission of structured text data, JSON is a better solution in most cases.

      Said Jean-Pierre Troll wrote that the best reason to use XML is to be able to transform the data with XSLT. I tend to agree. If this possibility is not to be considered, then XML may not be the best solution.

      --
      There's nothing like $HOME
    2. Re:Why is there such a thing as XML encryption? by mysidia · · Score: 2

      But don't go creating specific encryption algorithms for specific document formats. That's just reinventing the wheel.

      XML-Enc does not create specific encryption algorithms for specific document formats.

      It sounds to me like a server-side application of some sort is using XML-Enc and CBC mode in a poor way.

      Don't pick one shared key which you reuse every time and give the user error messages based on the ciphertext.

      Use public key crypto and a different shared key every time you encrypt a document.

      Personally... I think the XML-Enc folks ought to have piggy backed on a proven cryptosystem such as OpenPGP as the basis on which ciphertext and signature XML elements are to be built.

  3. The abstract of the article is here by fgrieu · · Score: 5, Informative

    http://dl.acm.org/citation.cfm?id=2046756

    "..we describe a practical attack on XML Encryption, which allows to decrypt a ciphertext by sending related ciphertexts to a Web Service and evaluating the server response. We show that an adversary can decrypt a ciphertext by performing only 14 requests per plaintext byte on average."

    Impressive!

  4. Re:....What??? by EdIII · · Score: 5, Interesting

    I was thinking the exact same thing. W.T.F....

    XML is used in my projects all the time to transfer data around between processes but security is typically provided by SSL via HTTPS. Some of the extra security we have added is by encrypting specific fields, and we do that with AES 256.

    Till today I did not even know there *was* an encryption standard for XML docs and I still don't know *where* to use it. Is it built in to PHP? Is it part of the standard parsers out there?

    My biggest question is why was the standard even developed in the first place and who actually uses it?

  5. Re:....What??? by Darinbob · · Score: 2

    Feature creep...

  6. More layers required by dutchwhizzman · · Score: 3, Insightful

    Depending on only encryption in this case proves to be weak. Using more layers, like IP firewalls and authorization will help mitigate this. The attacker needs to inject XML into the server to get error responses. If that's not possible due to a firewall, or replies will not be generated due to lack of authorization, it will be a lot harder to get data required to crack the encryption.

    --
    I was promised a flying car. Where is my flying car?
  7. Re:....What??? by dkf · · Score: 4, Informative

    Till today I did not even know there *was* an encryption standard for XML docs and I still don't know *where* to use it. Is it built in to PHP? Is it part of the standard parsers out there?

    It's certainly not in a majority of them.

    My biggest question is why was the standard even developed in the first place and who actually uses it?

    It was developed to allow a document to be handed round with parts of it shrouded so that only one individual (or service) can read it while still allowing other parts of the document to be read by anyone. AIUI, it's relevant in complex uses of SOAP where you've got a complex message bus in use and where the endpoints don't particularly trust the conveying services. Some of the B2B stuff is a bit that way inclined. I've never needed it myself though (unlike XML Signature, which is closely related and much more relevant since guaranteeing document integrity makes a lot of sense for things like invoices).

    I bet IBM has a full implementation of this. It's exactly the heavyweight thing that's right up their street.

    --
    "Little does he know, but there is no 'I' in 'Idiot'!"
  8. Re:....What??? by gzipped_tar · · Score: 3, Informative

    The details are here --> http://dx.doi.org/10.1145/2046707.2046756 (as posted by a commenter below) Subscription is required to read the full paper, I suppose.

    I'm not a security expert, just an enthusiastic, so what scarce bits I understood from the article may be wrong but they're here. The attack is a side-channel exploit. It doesn't matter what underlying encryption algorithm one actually use as long as it's a block cipher. The exploit relies on two things, i.e. the cipher-blocking chaining (CBC) and the error messages returned by the server. The CBC has weakness, i.e. a recursion relation between the ciphertext and the plaintext that allows the latter to be figured out by the attacker. The error messages returned by the server are usually too informative so that the attacker can use the information to find the initial values required to break CBC. I guess both CBC and this smart behavior of the error handling are mandated by the standard, and that's why they're calling for a rewrite of the standard itself.

    --
    Colorless green Cthulhu waits dreaming furiously.
  9. Re:....What??? by Anonymous Coward · · Score: 2, Informative

    The attack isn't waged against a specific cypher. Rather, it's waged against how partially filled data blocks (at the end of the encrypted stream) are handled.
    Also, HTML is not a type of XML (although XHTML is) but a dented subset of SGML.

  10. Padding Oracle by cachimaster · · Score: 5, Informative

    For those without access to the ACM paywall, this is an extension of Rizzo-Duong practical padding oracle attack published last year (citation needed in the ACM paper?)

  11. Re:....What??? by BZ · · Score: 2

    This, like many W3C specs from the early to mid 2000s, has nothing to do with the web and everything to do with enterprise backend stuff.

  12. Re:....What??? by grcumb · · Score: 2, Funny

    Some one corret this! :

    Okay: Someone correct this:

    --
    Crumb's Corollary: Never bring a knife to a bun fight.