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. |

| Subject: | RE: Cookies sent to different ports? |
|---|---|
| Date: | Thu, 16 Dec 2004 11:28:36 +1100 |
Hi Chuck, I think it's fine that cookies are tied to a domain and not a port + domain. Cookies are meant as a storage spot for the HOST to save information about the client. If you have a scenario where you need to have different cookies per port you can set it up relatively easily by adding cookies such as "domain.cookieForPort123". If you are concerned from a security p.o.v. then simply don't allow (you - as the server administrator) another untrusted (or unrelated) server to run on the same host but different port. -- As an example, we run multiple test sites - all under different _domains_ not ports. -- On the other side, however, I have been management consoles that run specifically under a different port (sun's app server?) and if these used cookies to save the information then there may be an issue ... or if the administrator browsed to the standard site from the management console. Of course, this means that the administrator cannot trust the employees of the company that are developing the website ... but perhaps this is a concern for some people :) (not to mention that if this is so perhaps there is other avenues for them to explore). -- Michael
-----Original Message----- From: CFW [mailto:cfw_security@comcast.net] Sent: Wednesday, 15 December 2004 7:24 AM To: webappsec@securityfocus.com Subject: Cookies sent to different ports? Hello all, I have an observation about cookie behavior. Scenario: - 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) Should the browser send the cookie with the GET of http://host:54321/? My answer would be no, it should not since host:54321 is a different server (meaning process at least). However, I have checked this with both IE and Firefox and they happily send the cookie along. 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. It would seem that this may have some implications in shared hosting environments, but usually those will be separate hostnames (even if they reside on the same IP). There are also cases where a team may have multiple "test" servers up on different posts of the same host, so this issue could come out there as well. Any thoughts? Thanks. Chuck
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: SQL injection (no single quotes used), PD9 Software |
|---|---|
| Next by Date: | Warning about accessing / attacking phising and spoofing sites, Amir Herzberg |
| Previous by Thread: | Re: Cookies sent to different ports?, CFW |
| Next by Thread: | RE: SQL injection (no single quotes used), Michael Silk |
| Indexes: | [Date] [Thread] [Top] [All Lists] |