Justin starts a blog RSS

Hacks, gripes and insights from someone behind the curtain.

Stuff I've made
cobosoda - Evolve virtual robots
termlauncher - pwn leopard's terminal

Archive

Feb
23rd
Sat
permalink

Hacking back at the pirates

Copyrighted material is a big problem on video hosts, and blip is no exception. One of the ways we keep tabs on copyright violators is by looking at link sites. Right now we only monitor one, surfthechannel.com. Their clean interface makes it sooo easy to crawl.

Recently they’ve figured out that we and possibly others are watching, because they started “encrypting” their URLs. Their custom flash player decrypts this, and then passes it on to their server-side redirector which stats streaming the video from blip, or whomever.

I decompiled (why is it called decompiling when interpreted languages are never compiled) their Flash player but couldn’t find the encryption code. Turns out they’re using a commercial product which allows for custom skinning by loading another Flash swf. That’s where the “encryption” was. I use quotes because it’s not encryption at all. This is what they do:

  1. Base64 encode the URL
  2. Insert long known strings of junk into the string
  3. Base64 encode the string again

Once you know the strings you can just split them out and rejoin. I have to admit that it was clever that they placed this code within the skin swf, modifying _root.FLVUrl at just the right time.

Anyway we’re monitoring them again, although not as quickly as I’d like. I’m convinced their redirector uses the same strategy, only I don’t know the strings. My next hack will be to collect a bunch of those URLs, compare them to figure out the strings, and then skip the redirector altogether.

Here’s the code if you want it, in perl:

BTW, video hosting site piracy stats to follow. Early results, it’s all youtube and megavideo.

Comments (View)
blog comments powered by Disqus