TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Anatomy of an Attack: How I Hacked StackOverflow (2012)

83 pointsby chdiralmost 10 years ago

7 comments

MichaelGGalmost 10 years ago
Inband signalling is such a terrible idea and is so hard to get right. Here&#x27;s the next step: try screwing up how you write headers. Use line wrapping and comments[1], or mix up crlf with just cr or lf. Very possible you&#x27;ll make one proxy ignore your malicious header, but have the next HTTP software take it. This type of attack can be called &quot;confused deputy&quot;.<p>This same issue exists on many VoIP networks as they share the same broken parsing ideas (in SIP).<p>1: HTTP allows you to line wrap headers and add <i>comments</i>. It&#x27;s stupidly bizarre. It comes from the 70s or 60s where you wouldn&#x27;t have a client program, so human-formatted headers weren&#x27;t just a debug benefit, but a necessary requirement. The IETF can be rather clueless, so they blindly copy these terrible ideas into new protocols, like HTTP and SIP.
评论 #9953138 未加载
评论 #9952901 未加载
z3t4almost 10 years ago
IP white-listing can be great until you one day add a load balancer and all requests now come from a trusted IP :P<p>Lesson learned: Add more &quot;layers&quot; of security.
im3w1lalmost 10 years ago
What was the advantage of directing your requests through ssh and Squid, as opposed to just ssh? Squid page talks about reducing bandwidth, was that it?
评论 #9952108 未加载
评论 #9952090 未加载
nadamsalmost 10 years ago
I think this is the perfect example of why you shouldn&#x27;t trust values that can be sent or modified from the client.
_xhokalmost 10 years ago
It sounds like this was the root of the problem:<p><i>&gt; But IIS was misconfigured to rewrite Remote_Addr from X-Forwarded-For if it existed.</i><p>Does anyone know why that might&#x27;ve happened? Is this something IIS does by default, something it inadvertently encourages, etc.? And is there another example of a web server doing something like this?
评论 #9954372 未加载
i336_almost 10 years ago
&gt; Not only was I not denied access, but I was granted full access to everything. I had the developer console to see what people were doing.<p>Now THAT would be an awesome screenshot.
评论 #9954512 未加载
adamconroyalmost 10 years ago
Interesting.<p>As an aside, I find this phrase strange, given the context:<p>&quot;The SO team was absolutely incredible to deal with during this. They were fast, responsive and reasonable.&quot;
评论 #9952763 未加载