Hiding Something In Plain View
Friday, April 6th, 2007I’ve been thinking a lot about how the Jikto code was leaked over the last few days. At first I thought it was a really easy problem to solve, then I thought it was a really hard problem to solve, and now I’ve come around full circle but not in the way I originally thought I would. The problem is that Jikto needs to be on the public internet to work (because Google needs to be able to pull the content at some point, and maybe some other reasons). Okay, given that requirement, that makes things like session tokens (cookies) or browser certificates out of the question. Bummer, because that really is the best answer. Then you have stuff like HTAccess, but unfortunately rather than popping up a 401 basic auth dialog it just gives you the standard 401 error. So that’s out the window too.
So then I started thinking this is a really hard problem. You can’t block based on IP because anyone can use the translation service. You can’t do it via time, because someone could type it in and hit enter at exactly the same second (and it would suck if you missed your window). Maybe it’s not possible after all, I think to myself.
Then I recall a conversation I had with beNi about how he was in the process of writing a worm that only allowed you to pull the worm code once based on your IP address. While that’s not a new concept, and it wouldn’t apply here (the thief could use another IP address to pull the code and maybe the translation service uses more than one IP to pull the content) there is some merit to this concept. Note: using only a single IP address is often a bad idea in worms due to proxies like AOL, and Tor, where you can actually reduce the transmission effectiveness.
What if you were to create a counter that said that you could only pull this content one time total (not based on IP). That way the code is pulled, and cached. You don’t need to ever pull it again, as long as the proxy doesn’t re-pull it it’s fine. Or better yet it can send back the unmodified headers if Google requests it again, so it doesn’t need to re-send the data.
In this way, the data is used only once, and available only once (so you had better make sure you are the first person to type that URL in since it is only protected by the fact that you are the first to grab it). You’ve effectively hidden the content in plain view, and allowed the attacker (or data theif or whatever) to know the exact location of the script, without ever giving it to them. The point being, I think there are techniques to hide information in plain sight without giving it to anyone else.



