Re: Linking a cookie to an IP address is a very bad in 2015...

Jim Manico <jim@manico.net> Sat, 04 April 2015 21:05 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 332821A00DC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 4 Apr 2015 14:05:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.91
X-Spam-Level:
X-Spam-Status: No, score=-6.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 CZ1VlE6XLs54 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 4 Apr 2015 14:05:38 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 617461A00D8 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sat, 4 Apr 2015 14:05:38 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1YeVDK-0007Pb-UW for ietf-http-wg-dist@listhub.w3.org; Sat, 04 Apr 2015 21:02:46 +0000
Resent-Date: Sat, 04 Apr 2015 21:02:46 +0000
Resent-Message-Id: <E1YeVDK-0007Pb-UW@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.80) (envelope-from <jim@manico.net>) id 1YeVDF-0007OU-O1 for ietf-http-wg@listhub.w3.org; Sat, 04 Apr 2015 21:02:41 +0000
Received: from mail-pd0-f176.google.com ([209.85.192.176]) by lisa.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <jim@manico.net>) id 1YeVDE-0006ZP-JY for ietf-http-wg@w3.org; Sat, 04 Apr 2015 21:02:41 +0000
Received: by pdea3 with SMTP id a3so2679880pde.3 for <ietf-http-wg@w3.org>; Sat, 04 Apr 2015 14:02:14 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=RhqagSHXG9KFwIDXr36oVRNvJz6dHShq0yawAIBptsY=; b=I5penmkn4kz9RHTM3SPss/OUdhOOHoquAByC61hYPZC8FV5WRNYL2ik0UKtFEeDMmz 3SHQF9f1vfNnIhzzGf2B6xvmSICDz7tyaUnkunyG8rV03GDR4ZVoqlWcPNFuqAPAaGmC 673WshfQ4XyJUpLp9y76PB9oJ8jcjOe2zVsfibohWUBbT+N7AcIAxgYCFh2xGgtIGV+M bI8VO5aQ+Q23WdWBnawUvfWlBdvFLIgl08DpReHA+GnLJNfB/8rWngUm5uXvlvN7qo++ l7/rdN870Fk4d9mtVbG2/U98FbAwJu/iL7r+Ol3dZQOrh7I7Lc8L9NhfkzQi9VjTix4t NwDQ==
X-Gm-Message-State: ALoCoQkqux1bDEJN24olJ+6sYJbTZySV7DNJ6vAK7OSj3NVwQ6VYMuP+1OL0BVaXCKku9Zdmxo/X
X-Received: by 10.70.44.203 with SMTP id g11mr15048703pdm.130.1428181334177; Sat, 04 Apr 2015 14:02:14 -0700 (PDT)
Received: from [10.86.46.107] ([166.170.36.111]) by mx.google.com with ESMTPSA id hv7sm117684pdb.86.2015.04.04.14.02.12 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 04 Apr 2015 14:02:12 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-69167033-7D34-4BC4-9ADF-8E0FD74C241E"
Mime-Version: 1.0 (1.0)
From: Jim Manico <jim@manico.net>
X-Mailer: iPhone Mail (12D508)
In-Reply-To: <CABb0SYSc_dW6M98FWj2ncSkZxbW0tWpkawz-1js9CGGfUTYUcA@mail.gmail.com>
Date: Sat, 04 Apr 2015 14:02:11 -0700
Cc: "Walter H." <Walter.H@mathemainzel.info>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Transfer-Encoding: 7bit
Message-Id: <5BEA09A4-3374-4CAA-8D43-D51645CFDC6F@manico.net>
References: <D141A3E5.4146E%evyncke@cisco.com> <20150401114608.GA7832@1wt.eu> <04DD393C-711F-4C9E-B21C-B184B8972DFC@apple.com> <20150401150716.GA7871@1wt.eu> <25C792A9-56D0-452D-A46C-561A44E4F229@manico.net> <20150401151634.GB7871@1wt.eu> <CABb0SYQ5=5BHSH-JQ5XsCi_bQ8h5FN=WNPvAYkzy94Bm=yTVwg@mail.gmail.com> <551E3D00.5090501@mathemainzel.info> <CABb0SYQAOXRWL5TvD5H5g_4VDwLxF=6kzhmVgCSK8Pv7pq8Apw@mail.gmail.com> <551FB3A5.503@mathemainzel.info> <CABb0SYRUvtTdZQGZkvNVTaA_yW79Q6Pd0Uh8exjE8zErzQNbsA@mail.gmail.com> <4B01B6DC-9EE3-4501-8CE1-CEBA3F19D9D3@manico.net> <CABb0SYSc_dW6M98FWj2ncSkZxbW0tWpkawz-1js9CGGfUTYUcA@mail.gmail.com>
To: Max Bruce <max.bruce12@gmail.com>
Received-SPF: none client-ip=209.85.192.176; envelope-from=jim@manico.net; helo=mail-pd0-f176.google.com
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: AWL=-0.701, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_LOW=-0.7, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1YeVDE-0006ZP-JY 244c727a33a12df117d73e0710496909
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Linking a cookie to an IP address is a very bad in 2015...
Archived-At: <http://www.w3.org/mid/5BEA09A4-3374-4CAA-8D43-D51645CFDC6F@manico.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29258
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

It's not •likely• to be an issue for short lived sessions but it could happen.

--
Jim Manico
@Manicode
(808) 652-3805

> On Apr 4, 2015, at 1:47 PM, Max Bruce <max.bruce12@gmail.com> wrote:
> 
> That isn't an issue for a session that's supposed to end 5 minutes or so after it begins.
> 
>> On Sat, Apr 4, 2015 at 9:12 AM, Jim Manico <jim@manico.net> wrote:
>> In the world of auto-updating browsers and therefor auto-updating user-agents, tying authentication to a user agent could have unintended negative consequences.
>> 
>> Tying authN to an IP address also has negative unintended consequences, like being on a mobile network while traveling, or being behind certain gateways - your IP address may change in short timespans. 
>> 
>> --
>> Jim Manico
>> @Manicode
>> (808) 652-3805
>> 
>>> On Apr 4, 2015, at 3:18 AM, Max Bruce <max.bruce12@gmail.com> wrote:
>>> 
>>> The session ID is a cookie, so in the headers. And yes, because it also checks that cookie, which is randomly generated. It just enforces a user-agent server-side. It DID enforce an IP, but I removed this for other reasons discussed earlier.
>>> 
>>>> On Sat, Apr 4, 2015 at 2:49 AM, Walter H. <Walter.H@mathemainzel.info> wrote:
>>>> let me ask it different:  where is the Session ID, is it part of a http-header, part of a html-header, a session-cookie, or is it part of the URL itself that is requested?
>>>> 
>>>> the second: two ident configured hosts behind NAT do not differ neither in the user agent nor in the IP address; they only differ in the source TCP-port ...
>>>> 
>>>>> On 03.04.2015 09:13, Max Bruce wrote:
>>>>> When you say transmitting from host to server, what do you mean?
>>>>> And yes, if I understand what your asking. It effectively compiled a random hash, and then enforced an IP & user agent. I have recently removed the IP enforecement though.
>>>>> 
>>>>> On Fri, Apr 3, 2015 at 12:10 AM, Walter H. <Walter.H@mathemainzel.info> wrote:
>>>>>> On 01.04.2015 21:48, Max Bruce wrote:
>>>>>> What about linking to several? I wrote a session system for my Web Server that will only allow access to the original Session ID if the IP & User-Agent has remained unchanged, in order to protect against session hijacking. I've found it's highly effective, unless you IP Spoof.
>>>>> what kind of mechanism do you use for transmitting the Session ID from host to server?
>>>>> does it prevent access from an ident configured but different host behind a NAT?
>