Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Web-App-Sec
[Top] [All Lists]

Re: Cookies sent to different ports?

Subject: Re: Cookies sent to different ports?
Date: Thu, 16 Dec 2004 12:17:29 -0500
Martin Mačok wrote:

On Tue, Dec 14, 2004 at 03:24:14PM -0500, CFW wrote:



- a user goes to a web server running at http://host:12345/,
- host:12345 responds with a Set-Cookie: ... , PATH=/
- user/browser goes to http://host:54321/ (same host as above)





Someone (thanks Matt) looked in to this for me a little and it turns out that this is required by the RFC, cookies are tied to host and protocol (HTTP or HTTPS, though I think this is only sometime true through use of the "secure" cookie tag), not to port.



You could restrict the cookie to the port too. It's in the same RFC (RFC-2965 HTTP State Management Mechanism):

[..]

  Port[="portlist"]
     OPTIONAL.  The Port attribute restricts the port to which a cookie
     may be returned in a Cookie request header.  Note that the syntax
     REQUIREs quotes around the OPTIONAL portlist even if there is only
     one portnum in portlist.

[..]

Martin Mačok
IT Security Consultant



The RFC that you reference talks about the Set-Cookie2 header and its options. Is that header supported by modern browsers? Or, have those options become part of the standard Set-Cookie definition?

Chuck

<Prev in Thread] Current Thread [Next in Thread>