5 ms·
I think you're correct here but how would you manipulate the cookies being sent when sending XSS requests from a different domain?
by xhrpost 14y ago
I think you're correct here but how would you manipulate the cookies being sent when sending XSS requests from a different domain?
- cstejerean 14y agoyou don't need to manipulate the cookies being sent, only the body of the message. The browser will send the correct cookie in the header, you control the body, and use the length of the message to determine how close the cookie value in the body is getting to the one in the header.
- ivanr 14y agoFor CRIME, I don't think that it's necessary to control the cookies. Having control of other parts of the request should be sufficient (e.g., using request headers, request body, etc). As for manipulating cookies from the MITM perspective, here's one clunky way to do it: redirect the victim's browser to the plain-text version of the target web site, intercept that request, and set a new cookie (pretending to be the plain-text version of the target web site). The next request to the secure version of the target web site should contain the injected cookie. As tptacek mentioned in another comment, this approach would not work with a site that uses HTTP Strict Transport Security.
- tptacek 14y agoThe attack as Pornin outlines it does not involve controlling the cookie header, but rather on being able to get content into the client's TX stream that happens to match the cookie header; think in terms of things like query args and post data. I think all three comments in this little subthread might be saying the same thing. Go nerddom!