Live data from Hacker News

Show HN: Using eBPF to see through encryption without a proxy

github.com

31–40 of 80 posts

Re: Show HN: Using eBPF to see through encryption without a proxy

#31
What does the usage pattern look like for this. Will I need to be root to run it, and can it run from inside a container without "real" host root?

I'm always looking for a way to make sniffing traffic from inside a container easier, and if I could attach a debug sidecar with something like an eBPF based SSL pre-master key extractor (both on incoming and outgoing requests) it starts to feel a lot like having network JTAG.

Re: Show HN: Using eBPF to see through encryption without a proxy

#33
post #27

I know that arguing that SSLKEYLOGFILE is all you need will just be a different version of the rsync/dropbox comment, but I do wonder under what circumstances is one able to strace a binary and isn’t able to make it dump session keys? I read the headline and set high hopes on finding a nifty way to mitm apps on Android - alas, I’m not sure this would work there necessarily.

The big usecase for me would be if you could attach the trace after starting the binary. The idea of coming into a production system that's behaving unexpectedly and getting a network sniff without having to fiddle with certificates is very attractive.

There's an alternative implementation where SSLKEYLOGFILE is more "dynamic" and permits being toggled on an off during runtime, but that doesn't currently exist.

Re: Show HN: Using eBPF to see through encryption without a proxy

#34

What does the usage pattern look like for this. Will I need to be root to run it, and can it run from inside a container without "real" host root? I'm always looking for a way to make sniffing traffic from inside a container easier, and if I could attach a debug sidecar with something like an eBPF based SSL pre-master key extractor (both on incoming and outgoing requests) it starts to feel a lot like having network J…

Qtap does require root privileges to function as it uses eBPF to hook into kernel and userspace program functions. The good news is it can also be run within a container.

There are some important flags when spinning it up in docker: `--privileged`, `--cap-add CAP_BPF`, `--cap-add CAP_SYS_ADMIN`, and `--pid=host`. These provide access to load eBPF programs, and monitor traffic.

Many deployments use Kubernetes daemonsets where Qtap runs in a container, but monitors all of the traffic on the node. The Qpoint paid offering comes with a Control Plane that produces context specific dashboards so seeing what's happening from a specific container, or pod namespace can provide a lot of insights into your deployments.

Re: Show HN: Using eBPF to see through encryption without a proxy

#35
post #32

Does it also work on android? Afaik ebpf is also available there.

Not today, maybe one day!

Edit: Another user posted a link to https://github.com/gojue/ecapture which looks like it supports android and has some overlapping functionality.

Re: Show HN: Using eBPF to see through encryption without a proxy

#36
There are many independent implementations of the same idea (given how easy it is to implement) but all suffer from similar shortcomings:

1. uprobes can be expensive and add latency (they force a context switch and copy data), especially when the hooked functions are called a lot

2. EBPF is not widely available outside of Linux, requires elevated privileges (compared to a MITM proxy that requires no privileges and works with every OS)

3. Doesn't work with JVM, Rust, any runtime that doesn't use the hooked functions

Re: Show HN: Using eBPF to see through encryption without a proxy

#37

There are many independent implementations of the same idea (given how easy it is to implement) but all suffer from similar shortcomings: 1. uprobes can be expensive and add latency (they force a context switch and copy data), especially when the hooked functions are called a lot 2. EBPF is not widely available outside of Linux, requires elevated privileges (compared to a MITM proxy that requires no privileges and wo…

These are all great callouts. We've worked hard to address some of them, some are future endeavours.

To address your points:

1. In our testing, uprobes add a statistically insignificant amount of latency and in comparison to a MITM proxies it's nearly identical to native.

2. True, we're focused on Linux right now. I'm looking forward to exploring Microsoft's eBPF implementation and exploring how we can support the Windows ecosystem.

3. You're right that the technique we are using for OpenSSL will not work for other runtimes. That said, there are other techniques that we've implemented in our Pro offering for the JVM, Go, and NodeJS. Rust is in the works!

Re: Show HN: Using eBPF to see through encryption without a proxy

#40
Kinda related, anyone know of something similar for Windows? This is definitely going in my toolkit, but I need something similar for Windows client traffic inspection (tls 1.2+) to get the full picture. Working with proprietary client/server coms over tls. Can use a special debug build, but requires shutting down and replacing. Need something in-sutu.
Post reply on HN