Obscura is so obscure it is practically unique

3 min read Original article ↗

This is going to be one of those rare blog posts that is mostly a summary of a Fediverse thread. One that started with Anger:

I'm Angry. So instead of working on iocaine 4, I'll go and see how long it takes to defeat a scraper that advertises itself as being stealthy.

I detest these attempts, and everyone who builds them and promotes them. The scraper situation is already bad, with all of them ignoring /robots.txt, and doing everything in their power to evade detection and ignore consent. We don’t need more of that! Seeing a Rust bot boost one of them into my feed made me Really Angry™, so I went ahead and looked at Obscura, to see if I can break it. I’ve done similar things for research purposes in the past: whenever I came across a project that advertised that it’s a gigantic anti-consent machine, I went and looked, and broke every single one of them that wasn’t piggybacking on a real Chrome or Firefox.

## How hard can it be?

Armed with a healthy dose of anger and vengeance and netcat, I instructed Obscura - built with the stealth feature - to fetch a page from netcat:

❯ cargo run -q -p obscura-cli --bin obscura --features stealth -- \
  --allow-private-network fetch http://localhost:12345 --stealth

On the netcat side, I observed all the usual headers Chrome would send. Except all header names were lower case, while over HTTP/1.1, Chrome will always send them capitalized.

Oops.

Took less time to break it than it took to clone it, and about half the time it took to compile it.

## It surely cannot be that bad…

Even worse, you can trivially identify Obscura by reading one line, and one character, and it pretty much uniquely identifies Obscura. No other browser or client I tried showed the same behavior, only this very stealthy, very advanced tool.

Here’s how to identify Obscura as of the time of this blog post:

  1. Read the request line.
  2. Read one character.
  3. Is that character s? Chances are, the requester is Obscura, and you can close the connection.

## But HTTP/2!

But algernon! HTTP/1.1 is obsolete, the world runs on HTTP/2, or even HTTP/3 now! And the headers there are binary and lower case! Surely they target that, rather than an obsolete protocol!

I’m afraid the situation ain’t much better on the HTTP/2 side either! I can uniquely identify Obscura on HTTP/2 too, even when it is in “stealth mode”. The trick is that I don’t care about any of the properties it tries to mask or hide in stealth mode, because they’re all comparatively expensive to check. I rely on much more trivial signals, and Obscura provides plenty of those over HTTP/2 too.

## But but but…

The thing is, my dear readers, is that developing a browser is hard. Developing one that mimics another close enough to be indistinguishable is even harder. You need to be intimately familiar with the browser you try to mimic, or you’ll leave footprints, and this mouse has a great nose for sniffing out those footprints.

Every single stealthy browser that doesn’t piggy-back on an existing one is snake oil. Every single one. The only way Obscura stands out is that it was by far the easiest to identify, it required one single request, and a very quick glance.

Good job, guys. Good job. And some people pay for this shit! Incredible.