The ASP.NET_SessionId cookie appears to be vulnerable to SQL injection attacks. The payloads 14542449'%20or%201%3d1--%20 and 14542449'%20or%201%3d2--%20 were each submitted in the ASP.NET_SessionId cookie. These two requests resulted in different responses, indicating that the input is being incorporated into a SQL query in an unsafe way.
Note that automated difference-based tests for SQL injection flaws can often be unreliable and are prone to false positive results. You should manually review the reported requests and responses to confirm whether a vulnerability is actually present.
Issue background
SQL injection vulnerabilities arise when user-controllable data is incorporated into database SQL queries in an unsafe manner. An attacker can supply crafted input to break out of the data context in which their input appears and interfere with the structure of the surrounding query.
Various attacks can be delivered via SQL injection, including reading or modifying critical application data, interfering with application logic, escalating privileges within the database and executing operating system commands.
Issue remediation
The most effective way to prevent SQL injection attacks is to use parameterised queries (also known as prepared statements) for all database access. This method uses two steps to incorporate potentially tainted data into SQL queries: first, the application specifies the structure of the query, leaving placeholders for each item of user input; second, the application specifies the contents of each placeholder. Because the structure of the query has already defined in the first step, it is not possible for malformed data in the second step to interfere with the query structure. You should review the documentation for your database and application platform to determine the appropriate APIs which you can use to perform parameterised queries. It is strongly recommended that you parameterise every variable data item that is incorporated into database queries, even if it is not obviously tainted, to prevent oversights occurring and avoid vulnerabilities being introduced by changes elsewhere within the code base of the application.
You should be aware that some commonly employed and recommended mitigations for SQL injection vulnerabilities are not always effective:
One common defence is to double up any single quotation marks appearing within user input before incorporating that input into a SQL query. This defence is designed to prevent malformed data from terminating the string in which it is inserted. However, if the data being incorporated into queries is numeric, then the defence may fail, because numeric data may not be encapsulated within quotes, in which case only a space is required to break out of the data context and interfere with the query. Further, in second-order SQL injection attacks, data that has been safely escaped when initially inserted into the database is subsequently read from the database and then passed back to it again. Quotation marks that have been doubled up initially will return to their original form when the data is reused, allowing the defence to be bypassed.
Another often cited defence is to use stored procedures for database access. While stored procedures can provide security benefits, they are not guaranteed to prevent SQL injection attacks. The same kinds of vulnerabilities that arise within standard dynamic SQL queries can arise if any SQL is dynamically constructed within stored procedures. Further, even if the procedure is sound, SQL injection can arise if the procedure is invoked in an unsafe manner using user-controllable data.
HTTP header injection vulnerabilities arise when user-supplied data is copied into a response header in an unsafe way. If an attacker can inject newline characters into the header, then they can inject new HTTP headers and also, by injecting an empty line, break out of the headers into the message body and write arbitrary content into the application's response.
Various kinds of attack can be delivered via HTTP header injection vulnerabilities. Any attack that can be delivered via cross-site scripting can usually be delivered via header injection, because the attacker can construct a request which causes arbitrary JavaScript to appear within the response body. Further, it is sometimes possible to leverage header injection vulnerabilities to poison the cache of any proxy server via which users access the application. Here, an attacker sends a crafted request which results in a "split" response containing arbitrary content. If the proxy server can be manipulated to associate the injected response with another URL used within the application, then the attacker can perform a "stored" attack against this URL which will compromise other users who request that URL in future.
Remediation background
If possible, applications should avoid copying user-controllable data into HTTP response headers. If this is unavoidable, then the data should be strictly validated to prevent header injection attacks. In most situations, it will be appropriate to allow only short alphanumeric strings to be copied into headers, and any other input should be rejected. At a minimum, input containing any characters with ASCII codes less than 0x20 should be rejected.
2.1. http://www.regonline.com/marketing/event/features/ [name of an arbitrarily supplied request parameter]next
Summary
Severity:
High
Confidence:
Certain
Host:
http://www.regonline.com
Path:
/marketing/event/features/
Issue detail
The name of an arbitrarily supplied request parameter is copied into the Location response header. The payload da698%00%0d%0a3fd008c10bf was submitted in the name of an arbitrarily supplied request parameter. This caused a response containing an injected HTTP header.
The application attempts to block header injection attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) before the newline characters.
Remediation detail
NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.
Request
GET /marketing/event/features/?da698%00%0d%0a3fd008c10bf=1 HTTP/1.1 Host: www.regonline.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: CurrentROLSession=; ASP.NET_SessionId=ijxz0lanc0imgk55mhf2eu45; %5FrolStats%5FID=DD22D651-4279-4259-A501-EA38CE56381F;
Response
HTTP/1.1 301 moved permanently Content-Type: text/html Date: Tue, 19 Apr 2011 19:40:40 GMT Location: http://www.regonline.com/__features/?da698 3fd008c10bf=1: Connection: close Content-Length: 0
2.2. http://www.regonline.com/marketing/event/pricing/ [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://www.regonline.com
Path:
/marketing/event/pricing/
Issue detail
The name of an arbitrarily supplied request parameter is copied into the Location response header. The payload a2d40%00%0d%0ab15c88885b1 was submitted in the name of an arbitrarily supplied request parameter. This caused a response containing an injected HTTP header.
The application attempts to block header injection attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) before the newline characters.
Remediation detail
NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.
Request
GET /marketing/event/pricing/?a2d40%00%0d%0ab15c88885b1=1 HTTP/1.1 Host: www.regonline.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: CurrentROLSession=; ASP.NET_SessionId=ijxz0lanc0imgk55mhf2eu45; %5FrolStats%5FID=DD22D651-4279-4259-A501-EA38CE56381F;
Response
HTTP/1.1 301 moved permanently Content-Type: text/html Date: Tue, 19 Apr 2011 19:40:35 GMT Location: http://www.regonline.com/__pricing/?a2d40 b15c88885b1=1: Connection: close Content-Length: 0
2.3. http://www.regonline.com/marketing/event/testimonials/ [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://www.regonline.com
Path:
/marketing/event/testimonials/
Issue detail
The name of an arbitrarily supplied request parameter is copied into the Location response header. The payload 8fca8%0d%0acb9e5a58209 was submitted in the name of an arbitrarily supplied request parameter. This caused a response containing an injected HTTP header.
Request
GET /marketing/event/testimonials/?8fca8%0d%0acb9e5a58209=1 HTTP/1.1 Host: www.regonline.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: CurrentROLSession=; ASP.NET_SessionId=ijxz0lanc0imgk55mhf2eu45; %5FrolStats%5FID=DD22D651-4279-4259-A501-EA38CE56381F;
Response
HTTP/1.1 301 moved permanently Content-Type: text/html Date: Tue, 19 Apr 2011 19:40:35 GMT Location: http://www.regonline.com/__resources/?8fca8 cb9e5a58209=1: Connection: close Content-Length: 0
When a web browser makes a request for a resource, it typically adds an HTTP header, called the "Referer" header, indicating the URL of the resource from which the request originated. This occurs in numerous situations, for example when a web page loads an image or script, or when a user clicks on a link or submits a form.
If the resource being requested resides on a different domain, then the Referer header is still generally included in the cross-domain request. If the originating URL contains any sensitive information within its query string, such as a session token, then this information will be transmitted to the other domain. If the other domain is not fully trusted by the application, then this may lead to a security compromise.
You should review the contents of the information being transmitted to other domains, and also determine whether those domains are fully trusted by the originating application.
Today's browsers may withhold the Referer header in some situations (for example, when loading a non-HTTPS resource from a page that was loaded over HTTPS, or when a Refresh directive is issued), but this behaviour should not be relied upon to protect the originating URL from disclosure.
Note also that if users can author content within the application then an attacker may be able to inject links referring to a domain they control in order to capture data from URLs used within the application.
Issue remediation
The application should never transmit any sensitive information within the URL query string. In addition to being leaked in the Referer header, such information may be logged in various locations and may be visible on-screen to untrusted parties.
<script type="text/javascript" src="https://www.activestatic.net/ScriptCombiner.axd?s=Register&v=-838054830"></script> ...[SNIP]... <!-- SiteCatalyst code version: H.21. Copyright 1996-2010 Adobe, Inc. All Rights Reserved More info available at http://www.omniture.com --> <script language="JavaScript" type="text/javascript" src="https://www.active.com/assets/javascript/s_tan_code.js"></script> ...[SNIP]...
4. Cross-domain script includepreviousnext There are 3 instances of this issue:
When an application includes a script from an external domain, this script is executed by the browser within the security context of the invoking application. The script can therefore do anything that the application's own scripts can do, such as accessing application data and performing actions within the context of the current user.
If you include a script from an external domain, then you are trusting that domain with the data and functionality of your application, and you are trusting the domain's own security to prevent an attacker from modifying the script to perform malicious actions within your application.
Issue remediation
Scripts should not be included from untrusted domains. If you have a requirement which a third-party script appears to fulfil, then you should ideally copy the contents of that script onto your own domain and include it from there. If that is not possible (e.g. for licensing reasons) then you should consider reimplementing the script's functionality within your own code.
The response dynamically includes the following scripts from other domains:
http://edge.quantserve.com/quant.js
https://s7.addthis.com/js/250/addthis_widget.js
Request
GET / HTTP/1.1 Host: www.regonline.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: CurrentROLSession=; ASP.NET_SessionId=ijxz0lanc0imgk55mhf2eu45; %5FrolStats%5FID=DD22D651-4279-4259-A501-EA38CE56381F;
<script type="text/javascript" src="https://www.activestatic.net/ScriptCombiner.axd?s=Register&v=-838054830"></script> ...[SNIP]... <!-- SiteCatalyst code version: H.21. Copyright 1996-2010 Adobe, Inc. All Rights Reserved More info available at http://www.omniture.com --> <script language="JavaScript" type="text/javascript" src="https://www.active.com/assets/javascript/s_tan_code.js"></script> ...[SNIP]...
GET /__articles/products/event~planning~software HTTP/1.1 Host: www.regonline.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: CurrentROLSession=; ASP.NET_SessionId=ijxz0lanc0imgk55mhf2eu45; %5FrolStats%5FID=DD22D651-4279-4259-A501-EA38CE56381F;
The cookie does not appear to contain a session token, which may reduce 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 /Register/Checkin.aspx?EventID=903860 HTTP/1.1 Host: www.regonline.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
The presence of email addresses within application responses does not necessarily constitute a security vulnerability. Email addresses may appear intentionally within contact information, and many applications (such as web mail) include arbitrary third-party email addresses within their core content.
However, email addresses of developers and other individuals (whether appearing on-screen or hidden within page source) may disclose information that is useful to an attacker; for example, they may represent usernames that can be used at the application's login, and they may be used in social engineering attacks against the organisation's personnel. Unnecessary or excessive disclosure of email addresses may also lead to an increase in the volume of spam email received.
Issue remediation
You should review the email addresses being disclosed by the application, and consider removing any that are unnecessary, or replacing personal addresses with anonymous mailbox addresses (such as helpdesk@example.com).
The following email address was disclosed in the response:
advisor@regonline.com
Request
GET / HTTP/1.1 Host: www.regonline.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: CurrentROLSession=; ASP.NET_SessionId=ijxz0lanc0imgk55mhf2eu45; %5FrolStats%5FID=DD22D651-4279-4259-A501-EA38CE56381F;
The following email address was disclosed in the response:
advisor@regonline.com
Request
GET /__articles/products/event~planning~software HTTP/1.1 Host: www.regonline.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: CurrentROLSession=; ASP.NET_SessionId=ijxz0lanc0imgk55mhf2eu45; %5FrolStats%5FID=DD22D651-4279-4259-A501-EA38CE56381F;
The file robots.txt is used to give instructions to web robots, such as search engine crawlers, about locations within the web site which robots are allowed, or not allowed, to crawl and index.
The presence of the robots.txt does not in itself present any kind of security vulnerability. However, it is often used to identify restricted or private areas of a site's contents. The information in the file may therefore help an attacker to map out the site's contents, especially if some of the locations identified are not linked from elsewhere in the site. If the application relies on robots.txt to protect access to these areas, and does not enforce proper access control over them, then this presents a serious vulnerability.
Issue remediation
The robots.txt file is not itself a security threat, and its correct use can represent good practice for non-security reasons. You should not assume that all web robots will honour the file's instructions. Rather, assume that attackers will pay close attention to any locations identified in the file. Do not rely on robots.txt to provide any kind of protection over unauthorised access.