Logs Metrics & Traces

eBPF TLS Decryption: Reading Plaintext Without Keys or Proxies

November 21, 2026
7
min read
Logs Metrics & Traces

TLS encrypts application traffic between services, so a packet capture on a Kubernetes node can reveal connection details but not the HTTP requests and responses you need to investigate an incident. eBPF TLS decryption addresses this by attaching uprobes to TLS library functions such as SSL_write and SSL_read, capturing plaintext before encryption or after decryption without requiring CA certificates, exported session keys, or a proxy.

By the end of this article, you’ll understand how eBPF captures TLS plaintext, why Go and Rust require different tracing approaches, and how to assess performance overhead and security risks in production. You’ll also know how this approach compares with man-in-the-middle (MITM) proxies and kernel TLS (kTLS), and which tools you can use to inspect encrypted application traffic.

What TLS Records Do Not Tell You

TLS records package application data and protocol messages for transmission between endpoints. Once encryption is active, their application payloads become ciphertext. A packet capture can still reveal source and destination IP addresses, ports, traffic volume, and timing, but it cannot show the application data inside encrypted records.

For example, tcpdump can show encrypted traffic, but not whether a request to /checkout returned HTTP 500, which headers were sent, or what error appeared in the response body. Wireshark can decrypt captured traffic when the necessary session secrets are available, but an ordinary packet capture does not provide those secrets.

TLS records also do not correspond directly to application requests. A single request can span multiple records, and one record can contain data from multiple application writes. This distinction matters when tracing encrypted traffic because recovering plaintext bytes is not the same as reconstructing complete HTTP requests and responses.

Why Kernel Socket Probes Miss Userspace TLS Plaintext

With userspace TLS, OpenSSL encrypts outgoing application data before passing it to the kernel’s TCP stack. A kprobe on tcp_sendmsg therefore sees ciphertext rather than the original HTTP request. Incoming traffic follows the reverse path: OpenSSL decrypts the data after the kernel has received it.

To capture plaintext, attach uprobes to the TLS-library functions instead. SSL_write exposes outgoing data before encryption, while a successful SSL_read makes incoming plaintext available after decryption. The probes inspect application memory without terminating or modifying the TLS connection.

How eBPF TLS Decryption Works

eBPF captures TLS plaintext at the application layer rather than decrypting network packets. For outgoing traffic, a uprobe on SSL_write reads the application buffer before OpenSSL encrypts it. For incoming traffic, an entry probe on SSL_read saves the buffer address, and a return probe reads the decrypted bytes after a successful call.

The eBPF program copies the plaintext using bpf_probe_read_user() and exports it through a ring buffer or perf buffer to a userspace collector. The application continues using its existing TLS connection, which remains encrypted on the network.

Uprobes and Uretprobes

An entry uprobe executes when a traced function begins, while a uretprobe executes when it returns. The difference matters because SSL_write receives plaintext as an input, whereas SSL_read fills a buffer with plaintext before returning.

  • For writes: An entry probe on SSL_write captures the data the application attempts to write. A return probe can confirm success and identify how many bytes OpenSSL accepted. SSL_write_ex reports success through its return value and provides the accepted byte count through *written.
  • For reads: An entry probe saves the buffer address passed to SSL_read. After the function returns successfully, a return probe uses the returned byte count to copy valid plaintext. SSL_read_ex instead provides that count through *readbytes.

The return value is especially important for nonblocking connections. An SSL_read or SSL_write call may need to be retried because the connection is not ready. A tracer must distinguish successful transfers from incomplete operations rather than treating every function call as captured application data.

Hooking SSL_read and SSL_write in OpenSSL

To attach these probes, first identify the TLS library used by the target process. You can inspect /proc/<pid>/maps to find its loaded libssl.so, then locate the OpenSSL functions in that library.

The relevant function signatures are:

int SSL_read(SSL *ssl, void *buf, int num);
int SSL_read_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes);
int SSL_write(SSL *ssl, const void *buf, int num);
int SSL_write_ex(SSL *ssl, const void *buf, size_t num, size_t *written);

Use nm -D, readelf --dyn-syms, or objdump -T to inspect exported dynamic symbols. For example:

nm -D /path/to/libssl.so | grep -E ' SSL_(read|write)(_ex)?(@|$)'

Replace the path with the library loaded by your application. Exported symbols can remain available after debugging symbols are stripped, but statically linked libraries and hidden symbols require different attachment strategies.

When attaching by offset, resolve the function’s location in the target library rather than copying an offset from another OpenSSL build. libbpf also supports attachment by function name.

The probe must read arguments according to the application’s calling convention. On Linux x86-64, OpenSSL uses the System V ABI, which passes the second function argument in the rsi register. For these four functions, that argument points to the plaintext buffer.

FunctionCapture PointPlaintext BufferValid Byte Count
SSL_readReturn, using the pointer saved at entrySecond argument (rsi)Positive return value
SSL_writeEntry; return to confirm successSecond argument (rsi)Requested count at entry; positive return value for accepted bytes
SSL_read_exReturn, using the pointer saved at entrySecond argument (rsi)*readbytes on success
SSL_write_exEntry; return to confirm successSecond argument (rsi)*written on success

Once the probe has a valid buffer address and byte count, bpf_probe_read_user() copies plaintext from the application’s memory. The program must limit how many bytes it reads and handle failed memory accesses.

Getting Plaintext to User Space

Capturing plaintext inside an eBPF program is only the first part of the process. The data must also reach a userspace collector, where it can be decoded, associated with a process or connection, and stored or displayed.

Two common export mechanisms are perf buffers and BPF ring buffers. A BPF ring buffer, available since Linux 5.8, provides a shared event queue across CPUs. Perf buffers use per-CPU buffering instead.

Ring buffers provide two relevant APIs:

  • bpf_ringbuf_reserve(): Reserves space for an event whose size is known to the BPF verifier. The program writes directly into the reserved memory and commits the event when ready.
  • bpf_ringbuf_output(): Copies prepared data into the ring buffer and supports event sizes determined at runtime.

An event should contain the captured bytes and enough metadata to identify their source, such as the process ID, traffic direction, and byte count. A production tracer also needs connection context to associate events with the correct application traffic.

Neither export mechanism should be treated as an unlimited queue. If the collector cannot keep up, events may be lost. Use bounded payload sizes and track dropped events to determine whether captured traffic is complete.

The 512-Byte Stack Limit

eBPF programs have a 512-byte stack limit. A tracer that attempts to place a large TLS payload directly on the stack may fail verifier checks even when the source buffer itself is valid.

One approach is to write an event directly into reserved ring-buffer memory. Another is to use a BPF_MAP_TYPE_PERCPU_ARRAY as temporary storage before exporting the event.

For example, a libbpf program can declare a per-CPU scratch buffer:

struct {
    __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
    __type(key, u32);
    __type(value, struct ssl_data_event_t);
    __uint(max_entries, 1);
} data_buffer_heap SEC(".maps");

This declaration assumes ssl_data_event_t defines the event structure elsewhere in the program.

The probe looks up key 0 to obtain scratch storage for the CPU on which it is running. It can then copy plaintext into that memory without placing the entire event on the BPF stack.

The buffer still needs a configured size limit. For payloads larger than one event, read bounded chunks and reconstruct the data in userspace. Map-backed storage avoids the stack limit but does not remove verifier constraints or memory costs.

Capturing TLS Plaintext with BCC

You can implement the read-side capture using BCC, an entry uprobe, a return probe, and a perf buffer.

The following example attaches to SSL_read in a running OpenSSL application. It saves the destination buffer address when the function starts, then copies up to 128 bytes of decrypted data when the function returns successfully.

Save the code as tls_read.py:

from bcc import BPF
import sys

source = r"""
#include <uapi/linux/ptrace.h>
#define MAX 128

struct msg_t {
    u32 n;
    char data[MAX];
};

BPF_HASH(read_ptrs, u64, u64);
BPF_PERF_OUTPUT(events);

int read_in(struct pt_regs *ctx) {
    u64 id = bpf_get_current_pid_tgid();
    u64 ptr = (u64)PT_REGS_PARM2(ctx);
    read_ptrs.update(&id, &ptr);
    return 0;
}

int read_out(struct pt_regs *ctx) {
    u64 id = bpf_get_current_pid_tgid();
    u64 *ptr = read_ptrs.lookup(&id);
    if (!ptr) return 0;

    int n = PT_REGS_RC(ctx);
    if (n > 0) {
        struct msg_t m = {};
        m.n = n > MAX ? MAX : n;

        if (!bpf_probe_read_user(m.data, m.n, (void *)*ptr))
            events.perf_submit(ctx, &m, sizeof(m));
    }

    read_ptrs.delete(&id);
    return 0;
}
"""

pid, lib = int(sys.argv[1]), sys.argv[2]
b = BPF(text=source)

b.attach_uprobe(
    name=lib, sym="SSL_read",
    fn_name="read_in", pid=pid
)
b.attach_uretprobe(
    name=lib, sym="SSL_read",
    fn_name="read_out", pid=pid
)

def show(cpu, data, size):
    e = b["events"].event(data)
    print(bytes(e.data[:e.n]).decode("utf-8", "replace"))

b["events"].open_perf_buffer(show)

while True:
    b.perf_buffer_poll()

On a Linux system with BCC installed, run the script against a process using OpenSSL:

sudo /usr/bin/python3 tls_read.py \
  PID /path/to/libssl.so

Replace PID with the process ID and the library path with the libssl.so mapped into that process. Loading and attaching the probes requires Linux tracing permissions. On Linux 5.8 and later, these may include CAP_BPF and CAP_PERFMON, with CAP_SYS_PTRACE needed for some process-inspection operations. Older kernels may require CAP_SYS_ADMIN.

The read_ptrs map stores the buffer pointer between function entry and return. Its key identifies the calling thread, allowing the return probe to retrieve the corresponding address. The probe then reads the successful return value, copies the plaintext using bpf_probe_read_user(), and exports the event through BPF_PERF_OUTPUT.

This example captures incoming plaintext from SSL_read only. It does not capture writes, handle SSL_read_ex, reconstruct HTTP requests, or monitor event loss. Production collectors also need more robust handling of concurrent and nested calls, failed reads, and payloads that exceed the configured buffer size.

Capturing TLS Plaintext Beyond OpenSSL

Not every application uses OpenSSL. BoringSSL, GnuTLS, and NSS/NSPR expose different TLS interfaces that affect where probes attach and how their results are interpreted. Go’s crypto/tls and Rust’s rustls introduce additional challenges because their TLS implementations are typically compiled into the application binary.

TLS LibraryRead FunctionWrite FunctionMain Consideration
OpenSSLSSL_readSSL_writeExported C functions with build-specific symbol offsets
BoringSSLSSL_readSSL_writeUnstable ABI, possible symbol prefixing or static linking
GnuTLSgnutls_record_recvgnutls_record_sendSigned byte counts and negative error codes
NSS/NSPRPR_Read / PR_RecvPR_Write / PR_SendCalls pass through NSPR’s descriptor layer; not every descriptor uses TLS

For GnuTLS, an entry probe on gnutls_record_send can capture the offered plaintext, while a return probe on gnutls_record_recv can capture successfully decrypted bytes. The functions return byte counts on success and negative values for errors, so failed calls must not be treated as captured application data.

BoringSSL retains familiar functions such as SSL_read and SSL_write, but does not guarantee a stable application binary interface (ABI). Statically linked builds may require probing the executable rather than a shared library, and builds using BORINGSSL_PREFIX can rename the expected symbols. Resolve the actual symbols in the target binary instead of assuming they match OpenSSL.

For NSS, PR_Read and PR_Write operate through the Netscape Portable Runtime (NSPR) descriptor abstraction. A tracer must identify the relevant SSL-wrapped descriptors because those functions can also handle ordinary unencrypted I/O.

Go: Probing crypto/tls Inside the Application Binary

Go’s native crypto/tls implementation is compiled into the application rather than loaded from libssl.so. To capture its plaintext, you attach uprobes to functions such as crypto/tls.(*Conn).Read and crypto/tls.(*Conn).Write in the executable.

Go uses a register-based calling convention that differs from C. On amd64, crypto/tls.(*Conn).Write receives its receiver in RAX and its byte slice in RBX (data pointer), RCX (length), and RDI (capacity). The current goroutine pointer is held in R14, which can help correlate events without relying solely on operating-system thread IDs. These register assignments are specific to Go’s amd64 internal ABI, which can change between versions. Verify them against the target binary before attaching probes.

Return probes need particular care. Conventional uretprobes replace a function’s return address with a trampoline, but Go can relocate goroutine stacks as they grow. If a stack moves while a return probe is active, the process can experience stack corruption or crash. A safer approach for compatible functions is to attach ordinary uprobes to return instructions instead of using the uretprobe trampoline.

Locating those instructions depends on the compiler output. Function inlining, optimization, and stripped symbols can make probe attachment harder. Some tracers recover function information from Go’s .gopclntab metadata, while others require unstripped binaries. Check the target application’s Go version and build settings before assuming that a particular tracer can attach successfully.

Rust: Capturing Plaintext from rustls

Rust applications using rustls require different probe targets because rustls handles encryption and decryption separately from socket I/O. The library is commonly linked into the executable, and optimized builds may inline or remove functions that a tracer expects to hook. Rust’s mangled symbol names also vary with compiler versions and build settings.

On the outgoing path, Writer::write accepts plaintext, while write_tls subsequently passes encrypted data to the underlying transport. On the incoming path, read_tls receives encrypted bytes, process_new_packets decrypts them, and Reader::read returns plaintext to the application.

This separation complicates connection correlation. By the time a tracer intercepts a plaintext read, the socket read may have happened earlier. A tracer can associate the plaintext with a previously observed socket descriptor, but thread-based correlation becomes less reliable when an asynchronous runtime such as Tokio moves work between threads.

Rust return values require different handling too. A plaintext read returns Result<usize> rather than a C-style integer. The probe must decode the appropriate Rust ABI layout to distinguish successful reads from errors and obtain the byte count. For example, one x86-64 rustls tracing implementation reads the result status from RAX and the byte count from RDX.

Performance Overhead in Production

eBPF TLS plaintext capture adds work whenever an application calls an instrumented function such as SSL_read or SSL_write. Each probe runs additional code, copies the requested plaintext bytes, and exports an event for processing. The overhead depends on how frequently these functions execute, the amount of data copied, and how much processing the collector performs.

The number of function calls matters as much as traffic volume. For example, an application sending 1 KiB per SSL_write call triggers more probes than one sending the same total data in 16 KiB calls. Capturing larger payloads increases memory-copy costs, while slow event processing can fill the ring buffer or perf buffer and cause dropped events.

Overhead also appears in different places. Probe execution consumes CPU in the instrumented application’s context, while the user-space collector uses resources to decode, process, and export captured events. Measuring only the collector’s CPU consumption can therefore underestimate the total cost.

How to Measure TLS Capture Overhead

Run the same HTTPS workload with TLS capture disabled and enabled. Keep the application build, kernel version, request rate, payload sizes, and test duration consistent between runs. Repeat the measurements under sustained traffic and bursts, including workloads with many small TLS writes.

Compare the following:

  • Application performance: Requests per second, error rate, and p95/p99 latency.
  • CPU and memory: Usage in the instrumented application, collector, and host, including CPU throttling and peak memory.
  • Capture completeness: Dropped ring buffer or perf buffer events and the proportion of expected plaintext successfully captured.

For Kubernetes workloads, compare application and collector resource consumption alongside node-level measurements. Establish a baseline before enabling TLS capture, then measure the impact under the same traffic conditions.

Low overhead is not enough if the tracer misses application data. Include unique identifiers in test requests and verify that the expected plaintext appears in the captured output. You can follow the eCapture TLS benchmark approach by checking unique request and response markers alongside throughput, tail latency, and lost events.

Benchmarks that measure only probe execution do not account for plaintext copying, event buffering, or user-space processing. Measure both performance overhead and capture completeness under your production workload.

Security Risks, Privileges, and Access Control

eBPF TLS capture reads plaintext directly from application memory, which means it can expose HTTP headers, authentication tokens, API keys, session cookies, and sensitive request bodies. TLS still protects traffic in transit, but certificate pinning and mutual TLS do not prevent probes from accessing plaintext inside the application.

The security risk comes from the tracer’s access to application processes. A collector with sufficient host-level privileges can potentially inspect traffic from multiple workloads running on the same node. Filtering capture to selected processes reduces the data collected, but does not remove the underlying privileges granted to the tracer.

What Permissions Does eBPF TLS Capture Require?

Attaching uprobes and loading eBPF programs requires elevated Linux permissions. Since Linux 5.8, separate capabilities can replace some operations previously covered by CAP_SYS_ADMIN.

The required permissions depend on the kernel, container runtime, and capture method:

  • CAP_BPF and CAP_PERFMON: Allow privileged BPF operations and performance tracing, including operations used to attach uprobes.
  • CAP_SYS_PTRACE: May be needed to inspect other processes through /proc, locate their loaded TLS libraries, and resolve probe targets.
  • CAP_NET_ADMIN: Required for capture methods that attach Traffic Control (TC) programs to network interfaces, rather than TLS-library probes alone.
  • CAP_SYS_ADMIN: May be required on older kernels or in environments where the narrower capabilities are unavailable or insufficient.

For example, eCapture’s TLS text capture uses CAP_BPF, CAP_PERFMON, and CAP_SYS_PTRACE on Linux 5.8 and later, while its packet capture mode additionally requires CAP_NET_ADMIN.

Container security settings can introduce further restrictions. Docker’s default seccomp profile blocks operations such as bpf and perf_event_open, so granting Linux capabilities alone may not be sufficient. Use a seccomp profile that permits the required operations rather than disabling syscall filtering entirely.

In Kubernetes, TLS capture agents that require host process visibility, hostPath mounts, or additional BPF capabilities conflict with the Baseline and Restricted Pod Security Standards. Deploy these agents with an explicitly reviewed security configuration rather than granting broad privileges across application namespaces.

How to Limit the Security Risks

Restrict both what the tracer can access and where captured plaintext can go:

  • Limit capture scope: Use supported process, PID, cgroup, or workload filters to target only the services you need to inspect. Apply filtering before payload export where the tool supports it.
  • Minimize sensitive data: Avoid collecting full request bodies or authentication headers when they are unnecessary. Redact credentials, tokens, and personal information before exporting or storing captured payloads.
  • Restrict access: Limit who can deploy or reconfigure tracing agents and who can read captured output. Use access controls, encryption, and retention limits for stored plaintext.
  • Audit tracing activity: Track changes to collector configurations and monitor the loading and attachment of eBPF programs to identify unauthorized tracing.

Treat TLS plaintext capture as privileged access to application data. Removing the need for a proxy or session keys simplifies collection, but it does not eliminate the need to secure the tracer and its output.

How eBPF TLS Capture Compares with MITM Proxies and kTLS

eBPF uprobes, man-in-the-middle (MITM) proxies, and kernel TLS (kTLS) operate at different points in a TLS connection. Uprobes read plaintext from application memory, MITM proxies intercept and terminate TLS connections, and kTLS moves TLS record encryption and decryption into the kernel.

eBPF Uprobes vs. MITM Proxies

An intercepting proxy such as mitmproxy establishes separate TLS connections with the client and upstream server. To inspect encrypted traffic, the client generally must trust the proxy’s certificate authority (CA). This changes the TLS connection path and gives the proxy access to decrypted application data.

Certificate pinning can prevent applications from accepting a proxy’s replacement certificate. Mutual TLS (mTLS) introduces additional configuration because the proxy must handle client authentication on both connections. These constraints can make proxy-based inspection difficult for applications with strict certificate validation.

eBPF uprobes avoid those changes by reading plaintext inside the application without terminating its TLS connection. Certificate pinning and mTLS do not prevent an authorized probe from accessing plaintext buffers. However, the tracer must run where the application processes TLS and support the library or runtime it uses. Unlike a network proxy, it cannot inspect application memory from a separate monitoring host.

eBPF Uprobes vs. Kernel TLS (kTLS)

Kernel TLS moves TLS record encryption and decryption from userspace into the kernel rather than acting as a separate traffic inspection tool. After completing the TLS handshake in userspace, the application activates the TLS upper-layer protocol through TCP_ULP and configures transmit and receive processing separately using TLS_TX and TLS_RX. The kernel then handles encryption or decryption for each enabled direction, either in software or with supported hardware offload.

This changes where eBPF can observe plaintext. With kTLS enabled for transmission, the application passes plaintext to send(), while receive-side kTLS delivers decrypted data through recv(). Probes accessing these buffers at the appropriate points can capture plaintext, but lower-level TCP probes may still encounter ciphertext.

kTLS requires support from the kernel and application TLS library. For example, OpenSSL must be built with kTLS support, and the connection must use a supported cipher suite with SSL_OP_ENABLE_KTLS enabled. Connections that do not activate kTLS continue using userspace TLS record processing. Because kTLS operates over TCP, it does not handle QUIC connections over UDP.

Tools for Capturing TLS Plaintext with eBPF

You can capture TLS plaintext using an existing eBPF tool or build your own probes. eCapture and Qtap handle probe attachment and event processing, while BCC, bpftrace, and libbpf give you more control over the capture process.

ToolPrimary UseTLS Capture Capabilities
eCaptureInspecting encrypted application trafficPlaintext capture, TLS session key extraction, and PCAPNG output
QtapMonitoring application traffic with process contextTLS plaintext capture, connection attribution, and event processing
BCC sslsniffDebugging TLS-library function callsUprobes for OpenSSL, GnuTLS, and NSS/NSPR
bpftraceRunning targeted tracing scriptsCustom uprobes for inspecting TLS function arguments and return values
libbpfBuilding custom eBPF tracing agentsProbe attachment, BPF maps, and event export

Capturing TLS Plaintext with eCapture

eCapture captures TLS plaintext from OpenSSL, GnuTLS, Go’s crypto/tls, and other libraries through runtime-specific modules. It runs on Linux and Android and is licensed under Apache 2.0.

To capture plaintext directly from OpenSSL functions, run:

sudo ecapture tls -m text --text-source=hook

The command attaches probes to supported TLS-library functions and prints captured application data in the terminal. Add -p PID to restrict capture to a particular process.

You can also capture TLS traffic using:

  • PCAPNG mode (-m pcap): Saves network packets with embedded TLS secrets, allowing Wireshark to decrypt supported connections.
  • Keylog mode (-m keylog): Exports TLS session secrets for decrypting separately captured traffic.

Use --text-source=hook to read plaintext directly from TLS-library buffers without extracting session keys. In contrast, --text-source=pcapng reconstructs supported HTTP messages using captured packets and TLS secrets. Direct hook capture may return fragments rather than complete requests or responses.

Capturing Application Traffic with Qtap

Qtap combines socket-level monitoring with TLS-library uprobes to capture application traffic alongside process and connection metadata. You can inspect outbound API calls, investigate third-party integration failures, and identify sensitive information leaving a service without modifying application code.

For supported TLS libraries, Qtap reads plaintext before encryption or after decryption. You can filter captured events and route them through its processing plugins.

When native TLS instrumentation is unavailable, Qtap’s egress controller mode redirects traffic through a local proxy that terminates and re-encrypts TLS connections. Unlike uprobe-based capture, this approach changes the connection path and requires appropriate certificate trust configuration.

Building Custom TLS Probes

BCC’s sslsniff.py lets you inspect TLS-library calls, filter events by process, and capture plaintext from OpenSSL, GnuTLS, and NSS/NSPR. You can modify its Python and eBPF code to capture additional fields or apply application-specific filtering.

For targeted investigations, bpftrace lets you attach uprobes to selected functions without building a complete agent. If you need a production collector with custom event structures, filtering, and buffering, use libbpf to implement the probes and manage their event delivery.

Whichever approach you choose, account for differences between TLS implementations. Capturing plaintext through exported OpenSSL function arguments does not require private OpenSSL structure offsets, but extracting TLS secrets from internal structures can require version-specific layouts. Go and Rust introduce additional symbol-resolution and calling-convention requirements.

How groundcover Captures TLS Plaintext in Kubernetes

groundcover uses an eBPF sensor deployed as a Kubernetes DaemonSet to capture application traffic, network activity, and workload metadata without changing application code. For supported TLS runtimes, the sensor reads plaintext before encryption or after decryption, allowing you to inspect encrypted HTTP traffic without installing a proxy or changing certificate settings.

Its eBPF auto-instrumentation supports encrypted traffic from OpenSSL, Go’s crypto/tls, and Node.js. Probe attachment depends on the application’s TLS implementation and available binary symbols, so verify compatibility when monitoring stripped executables. Java applications using Java’s SSL implementation are supported through an optional Java agent.

From TLS Plaintext to Searchable Traces

groundcover reconstructs captured traffic into HTTP requests and responses, associating each transaction with its originating process, Kubernetes pod, workload, and node. You can inspect request headers, query parameters, and available request and response bodies alongside latency, errors, logs, and infrastructure metrics.

You can also search stored traces using payload fields such as request_body and response_body. For applications already instrumented with OpenTelemetry, groundcover can enrich existing traces with HTTP payloads and infrastructure context while retaining application-specific spans.

groundcover processes every supported eBPF request and uses smart sampling to retain detailed traces for errors, unusual latency, and representative traffic. When an investigation requires traces for more requests, you can force-sample requests, pods, or namespaces.

Enabling SSL Tracing for Java Applications

Java applications using Java’s SSL implementation cannot be inspected through OpenSSL uprobes because their encryption functions execute inside the JVM. groundcover supports Java 11 and later through an optional Java agent that the sensor dynamically attaches to detected processes.

Enable Java SSL tracing using the following groundcover Helm values:

agent:
  sensor:
    env:
      - name: FLORA_NETWORKTRACER_JAVASSLTRACER_TRACINGENABLED
        value: "true"

Once enabled, the sensor automatically attaches the Java agent to detected JVM processes. The target container needs at least 25 MB of free space in /tmp for the attachment to succeed.

Because the Java agent executes inside the application process, test it in staging before production. You can adjust the deployment using the Java SSL tracing configuration.

Protecting Captured TLS Payloads

TLS plaintext may contain credentials, authentication headers, session tokens, and personal information. Use groundcover’s trace obfuscation controls to mask or remove sensitive values before storage. You can target specific headers, request or response bodies, and workload attributes without discarding the entire trace.

With groundcover’s Bring Your Own Cloud (BYOC) architecture, the observability data plane runs in your cloud account, including on the Free plan. Your captured telemetry remains in your environment, where you control data retention and access.

When validating TLS capture, confirm that the sensor runs on every intended node and that your applications use supported TLS runtimes. If a node has no sensor pod, check DaemonSet scheduling, resource requests, and node taints before troubleshooting the TLS probes themselves.

FAQs

eBPF reads plaintext directly from application memory using uprobes attached to TLS-library functions. In OpenSSL, SSL_write exposes data before encryption, while SSL_read makes decrypted data available after a successful read. This requires no CA certificate, session keys, or proxy, and the connection remains encrypted on the network.

Because applications using userspace TLS encrypt data before passing it to the kernel’s networking stack. A kprobe on tcp_sendmsg therefore sees ciphertext rather than the original HTTP payload. Uprobes attached to TLS-library functions can access plaintext instead. With kTLS, the available data depends on the probe’s position relative to encryption or decryption.

For OpenSSL, locate libssl.so through /proc/<pid>/maps and identify SSL_read and SSL_write using nm -D. Write uprobes for SSL_write entry and SSL_read entry/return, saving the read buffer pointer before copying decrypted bytes with bpf_probe_read_user(). Export events through a perf or ring buffer, then load and attach the probes using BCC or libbpf. On Linux 5.8+, this typically requires CAP_BPF and CAP_PERFMON; process inspection may also need CAP_SYS_PTRACE. No TLS keys or proxy are required.

No. For SSL_write, an entry probe can capture plaintext before encryption, although a return probe is needed to confirm whether the write succeeded and how many bytes were accepted. For SSL_read, both are required: the entry probe saves the buffer pointer, and the return probe reads the decrypted bytes after a successful call. The _ex variants provide byte counts through output parameters.

Uprobes add execution time to instrumented function calls, but the production impact depends on call frequency, payload size, and event processing. For instance, a minimal uprobe added approximately 1.67 microseconds per call in a Linux microbenchmark. At 10,000 calls per second, that translates to roughly 1.7% of one CPU core before plaintext copying and collector processing. The measurement came from a virtualized test environment, not a production TLS workload. Measure CPU usage, throughput, p95/p99 request latency, and dropped events with TLS capture enabled and disabled to determine the impact on your application.

TLS capture requires elevated Linux permissions that vary by kernel and capture method. On Linux 5.8 and later, tools such as eCapture use CAP_BPF, CAP_PERFMON, and CAP_SYS_PTRACE for plaintext capture. TC-based packet capture additionally requires CAP_NET_ADMIN. Older kernels may require CAP_SYS_ADMIN, while container seccomp policies can impose further restrictions.

Yes. You can instrument rustls functions such as Writer::write and Reader::read to capture plaintext before encryption and after decryption. However, rustls separates TLS processing from socket I/O, making connection correlation more difficult than with OpenSSL. Rust symbol mangling, compiler optimizations, and stripped binaries can also complicate probe attachment.

Use map-backed scratch buffers instead of placing the entire payload on the eBPF stack. A BPF_MAP_TYPE_PERCPU_ARRAY can provide per-CPU storage for larger buffers. Read data in bounded chunks, export it through a ring buffer or perf buffer, and reconstruct larger payloads in userspace. The 512-byte stack limit does not impose a 512-byte limit on captured TLS payloads.

Sign up for Updates

Keep up with all things cloud-native observability.

We care about data. Check out our privacy policy.