HTTP PUT is enabled on the web server. The file /3c082633eeb175ec.txt was uploaded to the server using the PUT verb, and the contents of the file were subsequently retrieved using the GET verb.
Issue background
The HTTP PUT method is used to upload data which is saved on the server at a user-supplied URL. If enabled, an attacker can place arbitrary, and potentially malicious, content into the application. Depending on the server's configuration, this may lead to compromise of other users (by uploading client-executable scripts), compromise of the server (by uploading server-executable code), or other attacks.
Issue remediation
You should refer to your platform's documentation to determine how to disable the HTTP PUT method on the server.
Request 1
PUT /3c082633eeb175ec.txt HTTP/1.0 Host: activresa-secure2.icor.fr Content-Length: 16
2da97a6810e503eb
Response 1
HTTP/1.1 201 Created Connection: close Date: Fri, 18 Mar 2011 15:27:13 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Location: https://activresa-secure2.icor.fr/3c082633eeb175ec.txt Content-Length: 0 Allow: OPTIONS, TRACE, GET, HEAD, DELETE, PUT, COPY, MOVE, PROPFIND, PROPPATCH, SEARCH, LOCK, UNLOCK
Request 2
GET /3c082633eeb175ec.txt HTTP/1.0 Host: activresa-secure2.icor.fr
Response 2
HTTP/1.1 200 OK Cache-Control: max-age=60 Content-Length: 16 Content-Type: text/plain Last-Modified: Fri, 18 Mar 2011 15:27:13 GMT Accept-Ranges: bytes ETag: W/"61076f480e5cb1:3765" Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Date: Fri, 18 Mar 2011 15:27:12 GMT Connection: close
2da97a6810e503eb
2. Cross-site scripting (reflected)previousnext There are 2 instances of this issue:
Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.
The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.
Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).
The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organisation. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organisation which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organisation in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.
Issue remediation
In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defences:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.
The value of the centrale request parameter is copied into the HTML document as plain text between tags. The payload cfe3a<script>alert(1)</script>4b3e9aa3907 was submitted in the centrale parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /distributeur/virtual_session.asp?centrale=COURCHEVEL553c9%3Cscript%3Ealert(document.cookie)%3C/script%3Ead03ac6cbadcfe3a<script>alert(1)</script>4b3e9aa3907&distributeur=V0002&stop=1 HTTP/1.1 Host: activresa-secure2.icor.fr Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 18 Mar 2011 15:27:14 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 180 Content-Type: text/html Set-Cookie: ASPSESSIONIDSSRCQBCR=JGJFBOHBCKIJBGJJBFCIAAGG; path=/ Cache-control: private
<br> code centrale inconnu-->select cen_id from centrale where cen_code='COURCHEVEL553c9<script>alert(document.cookie)</script>ad03ac6cbadcfe3a<script>alert(1)</script>4b3e9aa3907'
The value of the centrale request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 33865%3balert(1)//f9ef51d68a1 was submitted in the centrale parameter. This input was echoed as 33865;alert(1)//f9ef51d68a1 in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Remediation detail
Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.
Request
GET /distributeur/virtual_session.asp?centrale=COURCHEVEL553c9%3Cscript%3Ealert(document.cookie33865%3balert(1)//f9ef51d68a1 HTTP/1.1 Host: activresa-secure2.icor.fr Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 18 Mar 2011 15:27:11 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 145 Content-Type: text/html Set-Cookie: ASPSESSIONIDSSRCQBCR=BGJFBOHBCMHOCJMMLIDBHOIM; path=/ Cache-control: private
<br> code centrale inconnu-->select cen_id from centrale where cen_code='COURCHEVEL553c9<script>alert(document.cookie33865;alert(1)//f9ef51d68a1'
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
Issue background
If the secure flag is set on a cookie, then browsers will not submit the cookie in any requests that use an unencrypted HTTP connection, thereby preventing the cookie from being trivially intercepted by an attacker monitoring network traffic. If the secure flag is not set, then the cookie will be transmitted in clear-text if the user visits any HTTP URLs within the cookie's scope. An attacker may be able to induce this event by feeding a user suitable links, either directly or via another web site. Even if the domain which issued the cookie does not host any content that is accessed over HTTP, an attacker may be able to use links of the form http://example.com:443/ to perform the same attack.
Issue remediation
The secure flag should be set on all cookies that are used for transmitting sensitive data when accessing content over HTTPS. If cookies are used to transmit session tokens, then areas of the application that are accessed over HTTPS should employ their own session handling mechanism, and the session tokens used should never be transmitted over unencrypted communications.
Request
GET /distributeur/virtual_session.asp HTTP/1.1 Host: activresa-secure2.icor.fr Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 18 Mar 2011 15:27:03 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 17 Content-Type: text/html Set-Cookie: ASPSESSIONIDSSRCQBCR=LEJFBOHBLHDHBHLBNLMMHKML; path=/ Cache-control: private
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
Issue background
If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.
Issue remediation
There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.
You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.
Request
GET /distributeur/virtual_session.asp HTTP/1.1 Host: activresa-secure2.icor.fr Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 18 Mar 2011 15:27:03 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 17 Content-Type: text/html Set-Cookie: ASPSESSIONIDSSRCQBCR=LEJFBOHBLHDHBHLBNLMMHKML; path=/ Cache-control: private
Unless directed otherwise, browsers may store a local cached copy of content received from web servers. Some browsers, including Internet Explorer, cache content accessed via HTTPS. If sensitive information in application responses is stored in the local cache, then this may be retrieved by other users who have access to the same computer at a future time.
Issue remediation
The application should return caching directives instructing browsers not to store local copies of any sensitive data. Often, this can be achieved by configuring the web server to prevent caching for relevant paths within the web root. Alternatively, most web development platforms allow you to control the server's caching directives from within individual scripts. Ideally, the web server should return the following HTTP headers in all responses containing sensitive content:
Cache-control: no-store
Pragma: no-cache
Request
GET /distributeur/virtual_session.asp HTTP/1.1 Host: activresa-secure2.icor.fr Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 18 Mar 2011 15:27:03 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 17 Content-Type: text/html Set-Cookie: ASPSESSIONIDSSRCQBCR=LEJFBOHBLHDHBHLBNLMMHKML; path=/ Cache-control: private
If a web response states that it contains HTML content but does not specify a character set, then the browser may analyse the HTML and attempt to determine which character set it appears to be using. Even if the majority of the HTML actually employs a standard character set such as UTF-8, the presence of non-standard characters anywhere in the response may cause the browser to interpret the content using a different character set. This can have unexpected results, and can lead to cross-site scripting vulnerabilities in which non-standard encodings like UTF-7 can be used to bypass the application's defensive filters.
In most cases, the absence of a charset directive does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.
Issue remediation
For every response containing HTML content, the application should include within the Content-type header a directive specifying a standard recognised character set, for example charset=ISO-8859-1.
Request
GET /distributeur/virtual_session.asp HTTP/1.1 Host: activresa-secure2.icor.fr Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 18 Mar 2011 15:27:03 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 17 Content-Type: text/html Set-Cookie: ASPSESSIONIDSSRCQBCR=LEJFBOHBLHDHBHLBNLMMHKML; path=/ Cache-control: private
The response contains the following Content-type statement:
Content-Type: text/html
The response states that it contains HTML. However, it actually appears to contain plain text.
Issue background
If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.
In most cases, the presence of an incorrect content type statement does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.
Issue remediation
For every response containing a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.
Request
GET /distributeur/virtual_session.asp HTTP/1.1 Host: activresa-secure2.icor.fr Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 18 Mar 2011 15:27:03 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 17 Content-Type: text/html Set-Cookie: ASPSESSIONIDSSRCQBCR=LEJFBOHBLHDHBHLBNLMMHKML; path=/ Cache-control: private
The server presented a valid, trusted SSL certificate. This issue is purely informational.
The server presented the following certificates:
Server certificate
Issued to:
activresa-secure2.icor.fr
Issued by:
Thawte SSL CA
Valid from:
Wed Sep 29 19:00:00 CDT 2010
Valid to:
Sun Oct 30 18:59:59 CDT 2011
Certificate chain #1
Issued to:
Thawte SSL CA
Issued by:
thawte Primary Root CA
Valid from:
Sun Feb 07 18:00:00 CST 2010
Valid to:
Fri Feb 07 17:59:59 CST 2020
Certificate chain #2
Issued to:
thawte Primary Root CA
Issued by:
Thawte Premium Server CA
Valid from:
Thu Nov 16 18:00:00 CST 2006
Valid to:
Wed Dec 30 17:59:59 CST 2020
Certificate chain #3
Issued to:
Thawte Premium Server CA
Issued by:
Thawte Premium Server CA
Valid from:
Wed Jul 31 19:00:00 CDT 1996
Valid to:
Fri Jan 01 17:59:59 CST 2021
Issue background
SSL helps to protect the confidentiality and integrity of information in transit between the browser and server, and to provide authentication of the server's identity. To serve this purpose, the server must present an SSL certificate which is valid for the server's hostname, is issued by a trusted authority and is valid for the current date. If any one of these requirements is not met, SSL connections to the server will not provide the full protection for which SSL is designed.
It should be noted that various attacks exist against SSL in general, and in the context of HTTPS web connections. It may be possible for a determined and suitably-positioned attacker to compromise SSL connections without user detection even when a valid SSL certificate is used.Report generated by XSS.CX at Fri Mar 18 13:07:49 CDT 2011.