Intercepting Zoom's encrypted data with BPF
confused.ai
confused.ai
[ REDACTED ]
I had a nice little section on how to find the offsets here. When I first wrote it I was convinced that publishing two addresses couldn't possibly get me sued for reverse engineering. Some of the people who read the draft of this post changed my mind about it though, and it is 2020 after all so it is not a good time to be optimistic.
So, how would you find these offsets? Anyone know?
It's probably the most interesting part of the post.
There's a "hypothetical" paragraph afterwards, but if anyone wants to actually do this with Zoom and post the results, you'd probably earn lots of cred.
In particular, the exact arguments to the objdump command would help.
I miss the good old times where knowledge were freely published without fear.
Details? Reverse engineering isn't even illegal.
Even if Zoom is in the wrong/has no case, all it takes to "win" in the US is enough of a bankroll to troll someone via the legal system. It's pay-to-play here and Zoom likely has the budget to run an independent researcher into the ground financially with legal defense fees alone.
I get that HN wants to have it's "hacker" ideals and all, but, I would expect to cause myself legal troubles for publishing security details on such a service (unless done anonymously with reasonable opsec).
Lots of things that are legal we’ll be restricted in contract agreements - free speech is a fundamental right, but mutual non-disclosure agreements still exist and can result in (civil) legal action if reneged on to one party’s detriment.
People should be able to do things that hurt a company's business interests, especially reverse engineering. They do not deserve any protection. Actually, it should be encouraged since it leads to better products for consumers.
I think you'll find that most people - and a number of leading law experts - don't consider click through EULAs for valid binding contracts and clicking next is not the same as signing.
You'll also find that many (most? I stopped reading EULAs years ago) contains something about "the following might not be applicable in your jurisdiction".
Besides, just think of it: can a click on a button, placed in a way that makes it easy to click through for someone who accepts the defaults, can such a click really be considered a meeting of minds?
And do we really think people can be expected to read a number of pages of dense legalese? I remember one EULA filling 13 A4 pages with text in a small font after I gave up and printed it two decades ago when I was young and still believed they were valid.
Besides: Expecting non lawyers to read and understand legalese is as crazy as expecting non programmers to read basic Java or Python: within reach for many after basic self study, but still not something I'd bet much money on random people being able to do on the fly.
If you feel like you're potentially a target of a lawsuit, the only opinion that should matter to you are your lawyer's and the the court's. Some EULA restrictions are not enforceable, but some definitely are. No US court has ruled on whether EULAs are binding, or not - so there is no precedence.
I'm expecting that this finally changes for the better, at least in some parts of the world, where the parts which don't adapt to that change spiral further down.
Rightly so!
The easiest way if you have a capable debugger is probably to look for SSL strings/error codes in rodata and see where they're referenced.
Or IDA can even output C code that is very close to the original.
If this was 32 vs 64bit or some such you'd be pretty hosed at where everything was I imagine.
That's also mainly how malware reverse manages to "hunt" APT families, by finding meaningful little patterns in the instructions and look for code reuse in other binaries :D
In redbpf we let you write the kernel code in Rust as well, and then we have our own LLVM based toolchain to compile that to BPF bytecode.
bpftrace is similar to redbpf in approach, in that it lets you use a DSL instead of C.
I thought we were still tied to `bcc` and that python frontend thingy, but I'm glad the ecosystem has evolved significantly while I was not paying attention! It's kinda like finding a $20 in your back pocket that you didn't know was there when you put your pants on...
[0] https://ebpf.io/
I will be looking forward to more blog posts of yours in the future.
I remember patching Netty https://github.com/netty/netty/pull/8653 just to get the master key in order to decrypt sessions.
Having the ability to decrypt TLS sessions like this is way simpler.
tl;dr; would love to see something like this for tshark / tcpdump
Perhaps OP's technique could be used to generate such a file.
EDIT: I see you have already investigated such methods after looking at your github link.
In this example, except for an administrator spying on other users on a shared machine, which is kind of already an admitted risk by users on a shared machine anyway.
...as a Linux systems engineer, you are many times faced with debugging a black box problem wrapped in SSL on both ends which you need to peek into to understand what's going wrong; there is nothing suspect about this technique in this environment, it's what you're paid to do (solve problems). It's basically like having the ability to elevate your NIC port to promiscuous mode to debug an issue (tcpdump, e.g.) - it's a tool with no opinion, the human operating it is the one to be worried about.
There's just so many things you can so. The original goal of the post was to tamper with zoom's attention tracking for example (which was a field in one of their protobuf payloads).
It may be also helpful when reverse engineering "proprietary" protocols, e.g. to create compatible clients.
It may be even easier to just "mitm" the traffic like this in applications you develop yourself to find out what going on deeply buried in some third party library. Easier than modifying the code or attaching a normal debugger.
There are plenty of legitimate uses.
It's very much an operational kind of thing if you are trying to troubleshoot a thorny issue with your app in production.