Readit News logoReadit News
tylerflint commented on Show HN: Using eBPF to see through encryption without a proxy   github.com/qpoint-io/qtap... · Posted by u/tylerflint
plicense · 4 months ago
Do you support Java? If so, how do you do this for Java?
tylerflint · 4 months ago
Java is supported, but currently in the pro version. Since JavaSSL is implemented in Java code, which runs in the Java VM and not exported as static symbols that can be uprobe'd, there is a bit more involved to generate a bridge between the JVM bytecode and static symbols that can be probed.
tylerflint commented on Show HN: Using eBPF to see through encryption without a proxy   github.com/qpoint-io/qtap... · Posted by u/tylerflint
brendangregg · 4 months ago
To everyone building these things: Please add a disclaimer to say something like:

"This is not a vulnerability: eBPF currently requires root access to do this. Also, eBPF makes this easy but does not make it possible, as debuggers, interposers/shims, and other tools can also attach to pre-encryption points, and therefore banning eBPF (as some people want to do after seeing projects like this) would not actually improve security, but it would instead _reduce_ security as it would prevent eBPF-based security solutions from being used."

tylerflint · 4 months ago
Great idea!

On an unrelated note, your work has inspired most of my career in Solaris/Illumos/Linux systems and honestly this project likely wouldn't have happened if it wasn't for all of your books/blogs/projects to help me along the way. Thank you!

tylerflint commented on Show HN: Using eBPF to see through encryption without a proxy   github.com/qpoint-io/qtap... · Posted by u/tylerflint
chatmasta · 4 months ago
Great approach. I love the choice of practicality over generalization.

Are these offsets consistent across compilation targets, and they vary only by version of the Go binary? Or do you need to do this scan for every architecture?

tylerflint · 4 months ago
The short answer is that we only have to calculate the offset per go version, no expensive runtime scanning is required.

The long answer is that the offsets are the byte alignment offsets for the go structs containing the pointers to the file descriptor and buffers. Fortunately we only have to calculate these for each version where the TLS structs within go actually change, so not even for every version. For instance, if a field is added, removed, or changes type then the location in memory where those pointers will be found changes. We can then calculate the actual offset at runtime where we know which architecture (amd64, arm64, etc) with a simple calculation. Within the eBPF probe, when the function is called, it uses pointer arithmetic to extract the location of the file descriptor and buffer directly.

tylerflint commented on Show HN: Using eBPF to see through encryption without a proxy   github.com/qpoint-io/qtap... · Posted by u/tylerflint
worldsavior · 4 months ago
Isn't there already mechanisms for patching specific SSL libraries to view encrypted requests (e.g. frida)? What is the benefit of using eBPF?
tylerflint · 4 months ago
The main benefit is complete coverage. In production systems there are many different workloads with many different binaries, each with different build processes. Leveraging eBPF enables seeing everything on a system without having to adjust the build pipeline.
tylerflint commented on Show HN: Using eBPF to see through encryption without a proxy   github.com/qpoint-io/qtap... · Posted by u/tylerflint
adampk · 4 months ago
How easy is the set up, does this need to be deeply integrated in each step of the life-cycle?
tylerflint · 4 months ago
Just run the qtap agent on whatever Linux machine has apps running on it and it will see everything through the kernel vs eBPF.

You can customize config and/or integrate with existing observability pipelines, but initially you just need to turn it on for it to work. No app instrumentation required.

tylerflint commented on Show HN: Using eBPF to see through encryption without a proxy   github.com/qpoint-io/qtap... · Posted by u/tylerflint
bbkane · 4 months ago
Does this work for Go binaries? My understanding is that Go programs do all the encryption "in the process" so the data is encrypted before eBPF can intercept it. I'd love to be wrong about that!
tylerflint · 4 months ago
We have Go support, but it is not open sourced yet. Go is a bit more complicated but we were able to get it after some cave diving in the ELF formats. To give you a little insight on how this works, because Go is statically linked, we need to pull several different offsets of the functions we are going to hook into.

We do this by scanning every version of Go that is released to find offsets in the standard library that won't change. Then when we detect a new Go process, we use an ELF scanner to find some function offsets and hook into those with uprobes. Using both of these, we have all the information we need to see Go pre-encryption content as well as attribute it to connections and processes.

tylerflint commented on Show HN: Using eBPF to see through encryption without a proxy   github.com/qpoint-io/qtap... · Posted by u/tylerflint
pclmulqdq · 4 months ago
To hook into OpenSSL, don't you either need dynamic linking or userspace programs to compile your hooks in? Go and many Rust and C++ binaries tend to prefer static linking, so I wonder if this solution is workable there.
tylerflint · 4 months ago
Great point! Yes it supports both scenarios. Qtap scans the binary ELF (curl, rust, etc) and looks for the TLS symbols. If they were statically compiled the eBPF probes will be attached directly to the binary, if dynamically linked the probes will be attached to the symbols in the library (.so).
tylerflint commented on Nanobox is now free for developers   news.nanobox.io/new-nanob... · Posted by u/sanderson1
kentt · 8 years ago
I haven't heard of this before, but it looks like it's similar to Docker compose or maybe a layer on top? And insight or comparison as to why you would use this over other tools.
tylerflint commented on Nanobox is now free for developers   news.nanobox.io/new-nanob... · Posted by u/sanderson1
weaksauce · 8 years ago
Never heard of it but the product looks pretty compelling. Is there any provision for running multiple apps on one server instance?
tylerflint · 8 years ago
That's the highest requested feature! Should be available in Q1 of 2018.

u/tylerflint

KarmaCake day147May 20, 2011View Original