265 points · by aaron-santos · 6y ago · 65 comments
[ 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.
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.
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
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/
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 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.
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.
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's very much an operational kind of thing if you are trying to troubleshoot a thorny issue with your app in production.