Cookies Are Not Marked as SSL-Secured in IIS

Article translations Article translations
Article ID: 274149
This article was previously published under Q274149
Expand all | Collapse all

Symptoms

When you use Active Server Pages (ASP) in Internet Information Server (IIS) 4.0 or Internet Information Services (IIS) 5.0, a session cookie is sent to a user's browser. This cookie identifies the user for the time that they are on the site. These cookies are sometimes called memory cookies, because they are never stored on the user's hard drive like a regular cookie. In reality, this is an additional header that is sent to the browser. Anytime a Web site sends additional information such as this, the browser is required to send it back with each request (provided the server name does not change). The following is an example of an ASP Session Cookie:
Set-Cookie: ASPSESSIONIDGQQGGLIC=HKEDPNNBNBBKMOCFFBEIJENM; path=/
HTTP is a stateless protocol, which means that every time a user connects to a Web site it is just like the first time they connected to the Web server. This is a problem in an environment where you store server-side information for users. The session cookie is a means of performing such tasks.

A problem can occur if developers decide to store confidential or sensitive information in the session. For example, if a developer writes a piece of ASP code that requests a user's credit card number, the developer can store this information in a session variable (session variables are linked to the session cookie) on the server. The user can then browse to a page that lists the information they entered (for example, an authorization page or an order confirmation page). The credit card (when the list is generated) may be pulled from a session variable. If so, this information may be at risk.

If a malicious user performs a network trace or something similar, they could possibly obtain the session cookie from the user's browser when it is sent back to the server. If the malicious user makes a request to the server and presents that cookie (or actually replays the request), they could effectively see that users information stored in the session variables. The malicious user only needs to know the page that generated the output (for example, the order confirmation page).

Microsoft recommends that developers use SSL to encrypt sensitive information in order to hide the session cookie. In most cases, this will work fine; however, if the user goes from an HTTPS (secured) connection, and then back to HTTP (non-secured), the cookie is readable. This presents a problem, because the session cookie issued by a secured and non-secured request is the same.

Cause

Microsoft has determined this to be a problem in IIS 4.0 and 5.0. The cookie specification in RFC 2109 states that a cookie may be marked as Secure. IIS does not differentiate between secure and non-secure cookies.

Resolution

For IIS 5.0 (Windows 2000)

To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
260910 How to Obtain the Latest Windows 2000 Service Pack
The following files are available for download from the Microsoft Download Center:
Collapse this imageExpand this image
Download
English Language Version

Collapse this imageExpand this image
Download
Chinese (Simplified) Language Version

Collapse this imageExpand this image
Download
Chinese (Traditional) Language Version

Collapse this imageExpand this image
Download
Czech Language Version

Collapse this imageExpand this image
Download
Danish Language Version

Collapse this imageExpand this image
Download
Dutch Language Version

Collapse this imageExpand this image
Download
Finnish Language Version

Collapse this imageExpand this image
Download
French Language Version

Collapse this imageExpand this image
Download
German Language Version

Collapse this imageExpand this image
Download
Greek Language Version

Collapse this imageExpand this image
Download
Hungarian Language Version

Collapse this imageExpand this image
Download
Italian Language Version

Collapse this imageExpand this image
Download
Japanese Language Version

Collapse this imageExpand this image
Download
Japanese NEC Language Version

Collapse this imageExpand this image
Download
Norwegian Language Version

Collapse this imageExpand this image
Download
Polish Language Version

Collapse this imageExpand this image
Download
Portuguese (Brazilian) Language Version

Collapse this imageExpand this image
Download
Portuguese Language Version

Collapse this imageExpand this image
Download
Russian Language Version

Collapse this imageExpand this image
Download
Spanish Language Version

Collapse this imageExpand this image
Download
Swedish Language Version

Collapse this imageExpand this image
Download
Turkish Language Version

NOTE: After you apply the patch, run the following commands to enable secure cookies (this example enables them for site 1):
cd c:\inetpub\AdminScripts
cscript adsutil.vbs set w3svc/1/AspKeepSessionIDSecure 1
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on secure servers that prevent any unauthorized changes to the file.

The English version of this fix should have the following file attributes or later:
   Date          Time    Version         Size     File name
   -----------------------------------------------------------------
   5/31/2001    03:31p  5.0.2195.3649   245,520   Adsiis.dll
   5/31/2001    03:31p  5.0.2195.3649   332,560   Asp.dll
   5/31/2001    03:31p  5.0.2195.3649    13,584   Infoadmn.dll
   5/31/2001    03:31p  5.0.2195.3649   245,520   Infocomm.dll
   5/31/2001    03:31p  5.0.2195.3649    62,736   Isatq.dll
   5/30/2001    03:40p  5.0.2195.3651     6,928   Schmupd.exe
   5/31/2001    03:32p  5.0.2195.3649     7,440   W3ctrs.dll
				

Windows NT Server version 4.0, Terminal Server Edition

To resolve this problem, obtain the Windows NT Server 4.0, Terminal Server Edition, Security Rollup Package (SRP). For additional information about the SRP, click the article number below to view the article in the Microsoft Knowledge Base:
317636 Windows NT Server 4.0, Terminal Server Edition, Security Rollup Package

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Microsoft has confirmed that this problem may cause a degree of security vulnerability in IIS 5.0 and IIS 4.0. This problem was first corrected in Windows 2000 Service Pack 3.

More information

For more information about ASP and session state, see the following MSDN article:
http://msdn2.microsoft.com/en-us/library/ms972338.aspx

Properties

Article ID: 274149 - Last Review: September 20, 2012 - Revision: 11.0
Keywords: 
kbhotfixserver kbqfe kbbug kbfix kbgraphxlinkcritical kbsecurity kbwin2000presp2fix kbwin2000sp3fix KB274149

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com