Re: [xmpp] IQ Handling vulnerabilities

"Joe Hildebrand (jhildebr)" <jhildebr@cisco.com> Mon, 10 February 2014 19:33 UTC

Return-Path: <jhildebr@cisco.com>
X-Original-To: xmpp@ietfa.amsl.com
Delivered-To: xmpp@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 61B231A07EF for <xmpp@ietfa.amsl.com>; Mon, 10 Feb 2014 11:33:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.049
X-Spam-Level:
X-Spam-Status: No, score=-10.049 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.548, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PiaqgGS9tscE for <xmpp@ietfa.amsl.com>; Mon, 10 Feb 2014 11:33:32 -0800 (PST)
Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) by ietfa.amsl.com (Postfix) with ESMTP id BA7171A06AF for <xmpp@ietf.org>; Mon, 10 Feb 2014 11:33:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=772; q=dns/txt; s=iport; t=1392060812; x=1393270412; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=thsvPpBvdnFTIRTQLJLkJsYj/6AliXnVy1EgpUDP+Gc=; b=jVk+rgJNeyWsaufMO2Td/FtwRUm7mH/L6LcIuOJRCTBCuyTc92lLoX95 iFY5YrgD8A6Qs//Np85Vec4cSBJ+kiUgg6wz5T5NXSbCTKsEY80FviSQC YrtIL+kqBfYBh7tg6/a8ewxOZgNcku7wY7Zqpv51JLq4V+d6n+H4cTDT1 o=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhQFAMEo+VKtJXG8/2dsb2JhbABZgwyBD79hgRUWdIImAQEEOj8QAgEINhAyJQIEDgUbh2rJPBeOGxEBUAeEOAEDmCuSIIMtgXE5
X-IronPort-AV: E=Sophos;i="4.95,819,1384300800"; d="scan'208";a="19353915"
Received: from rcdn-core2-1.cisco.com ([173.37.113.188]) by alln-iport-8.cisco.com with ESMTP; 10 Feb 2014 19:33:32 +0000
Received: from xhc-rcd-x11.cisco.com (xhc-rcd-x11.cisco.com [173.37.183.85]) by rcdn-core2-1.cisco.com (8.14.5/8.14.5) with ESMTP id s1AJXWtS018284 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 10 Feb 2014 19:33:32 GMT
Received: from xmb-rcd-x10.cisco.com ([169.254.15.55]) by xhc-rcd-x11.cisco.com ([173.37.183.85]) with mapi id 14.03.0123.003; Mon, 10 Feb 2014 13:33:32 -0600
From: "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
To: Thijs Alkemade <thijs@xnyhps.nl>
Thread-Topic: [xmpp] IQ Handling vulnerabilities
Thread-Index: AQHPIy5NY8RkLrfuaUqqtuYhYOIBR5qopVEAgACdaoCAAL9TgP//w6cAgACRRID//6GvV4AEt5CAgACZvwD//4zYAA==
Date: Mon, 10 Feb 2014 19:33:31 +0000
Message-ID: <CF1E771D.38FA7%jhildebr@cisco.com>
References: <CAOb_FnxS-dMT85N7LHj5M9JWk3pL85=ugrDqaT7j5d28HBr0Cw@mail.gmail.com> <CF194491.38AD3%jhildebr@cisco.com> <2F5E925F-021D-408E-91D9-3CC5BEB6BEC6@nostrum.com> <48F4D361-4403-47E6-862D-FBDDDEBCC642@xnyhps.nl> <CF1A369C.38BE2%jhildebr@cisco.com> <CAKHUCzyCwKbmnUoXLHW=XzYbiFrcg-dQsDojGUnA-_r3qK+_Vg@mail.gmail.com> <CF1A4928-54B5-4A95-9A4B-0EC572A3CDBD@cisco.com> <CF1E56C5.38F45%jhildebr@cisco.com> <1078DA63-EB0B-4724-A4DA-BA1B5C4FE4EC@xnyhps.nl>
In-Reply-To: <1078DA63-EB0B-4724-A4DA-BA1B5C4FE4EC@xnyhps.nl>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.3.9.131030
x-originating-ip: [10.21.85.69]
Content-Type: text/plain; charset="us-ascii"
Content-ID: <7AA134E36786244BA425C07D87DDEF64@emea.cisco.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: Ben Campbell <ben@nostrum.com>, XMPP Working Group <xmpp@ietf.org>
Subject: Re: [xmpp] IQ Handling vulnerabilities
X-BeenThere: xmpp@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: XMPP Working Group <xmpp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xmpp>, <mailto:xmpp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/xmpp/>
List-Post: <mailto:xmpp@ietf.org>
List-Help: <mailto:xmpp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xmpp>, <mailto:xmpp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Feb 2014 19:33:34 -0000

On 2/10/14 12:25 PM, "Thijs Alkemade" <thijs@xnyhps.nl> wrote:

>Uhm. Maybe this email is missing a line again, but if you use those
>values as
>'id's directly, they will not be unpredictable at all, as anyone who
>receives
>an <iq/> can generate the rest of the chain.
>
>However, if you make sure the 'id' values are only half the hashes, it
>should
>be unpredictable unless an attacker is willing to spend an insane amount
>of
>work.
>
>So:
>
>start = sha1(crytpo_rand())
>start+1 = sha1(start)
>...
>
>id1 = start[0:10]
>id2 = start+1[0:10]

Or add a nonce to each round:

nonce = crytpo_rand()
start = sha1(nonce + crytpo_rand())
start+1 = sha1(nonce + start)

Regardless, there exist solutions.


-- 
Joe Hildebrand