Article ID: 253120 - Last Review: July 8, 2005 - Revision: 1.4 How To Review Visual InterDev Generated Code for CSSI VulnerabilityThis article was previously published under Q253120 SUMMARY
The following article discusses how to identify and correct Visual InterDev applications that are susceptible to CSSI (Cross-Site Scripting Security Issues). Only input which is not correctly validated or formatted makes your application vulnerable to attack. This article focuses on Visual InterDev Design Time Controls (DTC) and the Script Library. For general guidelines regarding ASP code, please see the following Knowledge Base article: 253119
(http://support.microsoft.com/kb/253119/EN-US/
)
How To Review ASP Code for Vulnerability for CSSI
MORE INFORMATION
The Visual InterDev DTCs present unique challenges to developers because some of the code is generated automatically. A developer may not be familiar with the specific implementation of the script objects that are generated and any vulnerabilities of them or how to best address them. This article covers all the known issues with the various DTCs, and it also covers possible options for addressing those vulnerabilities. The issues fall into two specific categories:
When using any method of a DTC that retrieves information from that DTC (such as .getCaption, .getText, .Value), when the value was set using user supplied information, the resulting string is not HTMLEncoded. Also, some DTCs that can be bound to a database field display the raw information from the database without encoding. As such, you should HTMLEncode these values when displaying to a browser. For example: Here are some common examples: Collapse this table
Here are possible solutions for these examples: Collapse this table
The Grid DTC does not HTMLEncode values retrieved from a database. If your database takes user input (for example, a guestbook), you should HTMLEncode your output. This can be done by clicking the the Data tab in the Grid property dialog box, and typing: NOTE: DTCs usually automatically implement the necessary logic to maintain their state during round trips to the server. In the case of the Textbox DTC for example, when the information is round tripped to the server, the Textbox.asp script library page correctly HTMLEncodes the contents of the text box in the process of maintaining the control's state. REFERENCES
For more information, see the following advisory from the Computer Emergency Response Team (CERT) at Carnegie Mellon University:
http://www.cert.org/advisories/CA-2000-02.html
(http://www.cert.org/advisories/CA-2000-02.html)
Please see the following Knowledge Base articles for further information:252985
(http://support.microsoft.com/kb/252985/EN-US/
)
How To Prevent Cross-Site Scripting Security Issues For Web Applications
253119
(http://support.microsoft.com/kb/253119/EN-US/
)
How To Review ASP Code for CSSI Vulnerability
253121
(http://support.microsoft.com/kb/253121/EN-US/
)
How To Review MTS/ASP Code for CSSI Vulnerability
253117
(http://support.microsoft.com/kb/253117/EN-US/
)
Preventing Internet Explorer and Outlook Express Cross-Site Scripting Security Issues
| Article Translations
|
Back to the top
