From Facebook's Hackathon, TCP re-implemented over chat in a post-SOPA world

http://news.ycombinator.com/item?id=3310036
From Facebook's Hackathon, TCP re-implemented over chat in a post-SOPA world
99 points by xxbondsxx 14 hours ago | 25 comments For Facebook's Hackathon finals between the finalists from 15 different colleges, myself and the two other hackers from UC Berkeley decided to imagine a post-apocalyptic world in which SOPA has passed and is enforced _to the letter_. We took it to the extreme by imagining that file transfer is no longer possible for US citizens. Corporations now control the internet, and we are forced to use only their products. To re-implement file transfer, we decided to hijack Facebook's speedy chat service to do our own packet transmission. This is the way it works: -A python localhost server converts binary data into base64 ASCII and forms packets with uuid's, timestamps, seqnums, and the whole 9 yards. -These packets get pumped over localhost to a user script (aka a Greasemonkey script) running on Facebook.com. -This user script handles the scrubbing of incoming chat messages (packets) and populating the chatbox with outgoing packets. -Facebook does _not_ make sending a chat message easy with custom JS, so in order to actually send a chat message, we signal the python localhost server to run a bash script that tells applescript to emulate a keydown event. Hacked up, I know, but it works! Also, this works for any application (desktop, flash embedded, etc) because it's as legit as a real keypress. Just pumping the packets was the first challenge which we finished around 2am. The second obstacle was that facebook decides to drop about 50% of our packets after the first 15, so we then implemented a crude TCP style acknowledgement/handshake method that ensures each packet gets delivered. Implementing TCP inside of TCP... as meta as you get. If you want to watch a video of a nyan cat GIF transmission, go here: http://www.youtube.com/watch?feature=player_detailpage&v=tk5m0mqsrFs#t=74s The main point is that despite even the most extreme legal restrictions on the internet, the next generation will always find a way :D Github: https://github.com/pcottle/emotiface Happy to answer any questions. Techcrunch also showed up and filmed / walked around the office (which was surprising considering the relationship between the two). I remember the techcrunch guy specifically saying "I feel like I'm at the Deathstar" when he walked through Facebook's double doors.

On Sun, 4 Dec 2011, Eugen Leitl wrote: <Huge Snip>
If they are willing to go through all of the trouble of reimplementation, wouldn't it have made a LOT more sense to implement GRE rather than TCP, then just pump whatever they wanted through the GRE tunnel in whatever protocol they wanted? //Alif -- I hate Missouri. Land of the free, home of the perjuriously deranged.

On Sun, Dec 04, 2011 at 03:53:44PM -0600, J.A. Terranson wrote:
I'd consider is just a publicity stunt. A proof of principle that you can abuse the proprietary platforms. Nothing really unexpected, but, still nice to see Nyan cat with FB as a transport layer. I think grainy video (my, that's sure a crappy CMOS sensor) has lots more of payload bandwidth. Plenty of telecommuters working from home. Lots of standing video channels. -- Eugen* Leitl <a href="http://leitl.org">leitl</a> http://leitl.org ______________________________________________________________ ICBM: 48.07100, 11.36820 http://www.ativel.com http://postbiota.org 8B29F6BE: 099D 78BA 2FD3 B014 B08A 7779 75B0 2443 8B29 F6BE

Eugen Leitl <eugen@leitl.org> writes:
To re-implement file transfer, we decided to hijack Facebook's speedy chat service to do our own packet transmission.
I've implemented SMTP over TCP/IP over postcards. Latency was a bit of a pain, and packet loss was also an issue. The fact that I'm terrible at dealing with snail mail didn't help either. Peter.
participants (3)
-
Eugen Leitl
-
J.A. Terranson
-
Peter Gutmann