Report generated by XSS.CX at Sat Nov 20 10:44:13 CST 2010.


Cross Site Scripting Reports | Hoyt LLC Research

Loading

1. Cross-site scripting (reflected)

2. Cross-domain Referer leakage

3. Cross-domain script include

3.1. http://www.myphotoid.net/

3.2. http://www.myphotoid.net/bcStripesDemo.aspx

4. File upload functionality



1. Cross-site scripting (reflected)  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.myphotoid.net
Path:   /bcStripesDemo.aspx

Issue detail

The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload d331b"style%3d"x%3aexpression(alert(1))"259b7b94635 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as d331b"style="x:expression(alert(1))"259b7b94635 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbirary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Issue background

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

Request

GET /bcStripesDemo.aspx?d331b"style%3d"x%3aexpression(alert(1))"259b7b94635=1 HTTP/1.1
Host: www.myphotoid.net
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: Sat, 20 Nov 2010 15:13:50 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=carvnznjeh5uz0frv2dc0qnk; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 20128


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1"><title
...[SNIP]...
<img id="g2GraphicCode128_1" src="http://www.myphotoid.net/bcStripesDemo.aspx?d331b"style="x:expression(alert(1))"259b7b94635=1&ImageControl_GraphicCode128_1=1" style= " height: 0.75in; width: 1.8946in; " alt="Barcodes Rendered by &raquo;Stripes&laquo; &trade;" />
...[SNIP]...

2. Cross-domain Referer leakage  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.myphotoid.net
Path:   /bcStripesDemo.aspx

Issue detail

The page was loaded from a URL containing a query string:The response contains the following links to other domains:

Issue background

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.

Request

GET /bcStripesDemo.aspx?d331b HTTP/1.1
Accept: */*
Referer: http://www.myphotoid.net/bcStripesDemo.aspx?d331b"style%3d"x%3aexpression(alert(1))"259b7b94635=1
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Accept-Encoding: gzip, deflate
Host: www.myphotoid.net
Proxy-Connection: Keep-Alive
Cookie: ASP.NET_SessionId=carvnznjeh5uz0frv2dc0qnk; __utma=34659133.501680149.1290271127.1290271127.1290271127.1; __utmb=34659133; __utmc=34659133; __utmz=34659133.1290271127.1.1.utmccn=(referral)|utmcsr=burp|utmcct=/show/2|utmcmd=referral

Response

HTTP/1.1 200 OK
Date: Sat, 20 Nov 2010 16:40:10 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 20030


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1"><title
...[SNIP]...
<span class="CompanyNameHeader"><a href="http://www.complianceabc.com">Practical Compliance Solutions</a>
...[SNIP]...
<span style=" position: absolute; left: 40px; top: 55px; height: 12px; width: 130px; text-align: center; font-size: 8px; font-weight: normal; " ><a href ="http://www.complianceabc.com/bcOverview.asp">Stripes Overview</a>
...[SNIP]...
<span style=" position: absolute; left: 180px; top: 55px; height: 12px; width: 130px; text-align: center; font-size: 8px; font-weight: normal; " ><a href ="http://www.complianceabc.com/bcTechnical.asp">Stripes Technical</a>
...[SNIP]...
<span style=" position: absolute; left: 300px; top: 55px; height: 12px; width: 130px; text-align: center; font-size: 8px; font-weight: normal; " ><a href ="http://www.complianceabc.com/Products.asp">Products</a>
...[SNIP]...
<span style=" position: absolute; left: 440px; top: 55px; height: 12px; width: 130px; text-align: center; font-size: 8px; font-weight: normal; " ><a href ="http://www.complianceabc.com/bcDownload.asp">Download Stripes</a>
...[SNIP]...
<span class="company">
           <a href="http://www.complianceabc.com" rel="nofollow" >www.complianceabc.com</a>
...[SNIP]...
<span class="privacy">
           <a href="http://www.complianceabc.com/privacy.asp" rel="nofollow" >Privacy </a>
...[SNIP]...
<span class="sitemap">
           <a href="http://www.complianceabc.com/sitemap.asp">Site Map</a>
...[SNIP]...
<span class="contact">
           <a href="http://www.complianceabc.com/contact.asp" rel="nofollow" >Contact</a>
...[SNIP]...
<span class="termsofuse">
           <a href="http://www.complianceabc.com/termsofuse.asp" rel="nofollow" >Terms of Use</a>
...[SNIP]...
<p>
           <a href="http://validator.w3.org/check?uri=www.myphotoid.net/bcStripesDemo.aspx" rel="nofollow" onclick="window.open(this.href); return false;" onkeypress="window.open(this.href); return false;">
           <img src="images/valid-xhtml110-blue.gif" alt="Valid XHTML 1.0 Transitional" height="31" width="88" />
...[SNIP]...
</form>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
...[SNIP]...

3. Cross-domain script include  previous  next
There are 2 instances of this issue:

Issue background

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.


3.1. http://www.myphotoid.net/  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.myphotoid.net
Path:   /

Issue detail

The response dynamically includes the following script from another domain:

Request

GET / HTTP/1.1
Host: www.myphotoid.net
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: Sat, 20 Nov 2010 15:13:46 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 16959


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1"><title>
...[SNIP]...
</form>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
...[SNIP]...

3.2. http://www.myphotoid.net/bcStripesDemo.aspx  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.myphotoid.net
Path:   /bcStripesDemo.aspx

Issue detail

The response dynamically includes the following script from another domain:

Request

GET /bcStripesDemo.aspx HTTP/1.1
Host: www.myphotoid.net
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: Sat, 20 Nov 2010 15:13:46 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=t1wusm55jgzspy2jdk5p5bv5; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 20018


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1"><title
...[SNIP]...
</form>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
...[SNIP]...

4. File upload functionality  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.myphotoid.net
Path:   /

Issue detail

The page contains a form which is used to submit a user-supplied file to the following URL:Note that Burp has not identified any specific security vulnerabilities with this functionality, and you should manually review it to determine whether any problems exist.

Issue background

File upload functionality is commonly associated with a number of vulnerabilities, including:You should review the file upload functionality to understand its purpose, and establish whether uploaded content is ever returned to other application users, either through their normal usage of the application or by being fed a specific link by an attacker.

Some factors to consider when evaluating the security impact of this functionality include:

Issue remediation

File upload functionality is not straightforward to implement securely. Some recommendations to consider in the design of this functionality include:

Request

GET / HTTP/1.1
Host: www.myphotoid.net
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: Sat, 20 Nov 2010 15:13:46 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 16959


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1"><title>
...[SNIP]...
</span>

<input type="file" name="PrintBadge1$fuFileUpload" id="PrintBadge1_fuFileUpload" class="uplFormat" style="position: absolute; top: 235px; left: 120px;" />

<input type="submit" name="PrintBadge1$btnPrint" value="Create" id="PrintBadge1_btnPrint" class="btnFormat" style="position: absolute; top: 260px; left: 10px; background-color: #4682B4; " />
...[SNIP]...

Report generated by XSS.CX at Sat Nov 20 10:44:13 CST 2010.