Skip to content

Hook the TLS boundary

Step 3 of 8Solution
OUTBOUND
SSL_write
INBOUND
SSL_read ret
DATA SEEN
cleartext
APP EDITS
zero
  • cleartext buffer
  • uprobe copy to ringbuf
  • encrypted ciphertext
Encrypted Traffic & Uprobes, step 3 of 8

A uprobe attaches an eBPF program to any user-space function entry; a uretprobe fires when that function returns. By hooking SSL_write on entry, eBPF reads the outgoing plaintext buffer before encryption.

For incoming traffic, a uprobe saves the buffer pointer on SSL_read entry into a map keyed by thread ID, and the uretprobe copies the decrypted bytes on return—identical to how Pixie, Kubeshark, eCapture, and Beyla work.

What changed

  • SSL_write entry → copy plaintext before TLS encrypts
  • SSL_read entry → stash buffer ptr by TID in BPF map
  • SSL_read return → read N decrypted bytes into RingBuf

Type to search…

↑↓ navigate↵ selectEsc close