
ecapture v2.5.2
eBPFを使用してCA証明書なしでSSL/TLS平文をキャプチャする。amd64/arm64向けのLinux/Androidカーネルでサポートされています。
eCapture (旁观者)
Capture SSL/TLS plaintext with eBPF—no MITM proxy or custom CA installation.
English · 汉字
[!IMPORTANT] Supports Linux on x86_64 (kernel 4.18+), aarch64 (kernel 5.5+), and LoongArch64
loong64(kernel 6.6+). Android supports x86_64 and aarch64 with the existing kernel minimums. Capturing data requires root privileges or specific Linux capabilities. Does not support Windows or macOS.
Introduction
- Captures TLS plaintext from applications using OpenSSL, BoringSSL, or GnuTLS, and data read or written through NSPR.
- Supports plaintext capture for Go TLS programs, including HTTPS/TLS traffic in Go applications.
- Captures commands entered in interactive Bash and Zsh sessions.
- Audits MySQL queries and supports MySQL 5.6/5.7/8.0 and MariaDB.
Run ecapture --help to list commands and global options. Use ecapture tls --help or ecapture help tls for TLS options and examples. You can view help as a regular user.
Getting started
Download
ELF binary file
[!TIP] Supports Linux on x86_64, aarch64, and LoongArch64; Android supports x86_64 and aarch64.
Download the ELF binary package from the releases page, extract it, and run:
ecapture --help
Docker image
[!TIP] Linux only.
# Pull the Docker image
docker pull gojue/ecapture:latest
# Run it
docker run --rm --privileged=true --net=host -v ${HOST_PATH}:${CONTAINER_PATH} gojue/ecapture ARGS
⚠️ Security note:
--privileged=truegrants full host access. For production use, prefer specific capabilities instead. See the Minimum Privileges Guide.
See Docker Hub for more information.
Capture OpenSSL plaintext data
sudo ecapture tls
eCapture automatically detects the system's OpenSSL library and selects a capture interface: it prefers an up Ethernet interface on the lowest-metric IPv4/IPv6 default route, then falls back to interface traffic counters or an up interface. A startup warning names the selected interface and explains how to override it with -i eth0 or --ifname eth0. Only that interface is captured; use -i lo for loopback traffic. Generate an HTTPS request with an OpenSSL-linked client to see the reconstructed request and response. This synthetic HTTP/1.1 example illustrates the text format:
[2026-01-01T12:00:00.000000000Z] http/1.1 request 192.0.2.1:43210 -> 192.0.2.2:443 host="example.com" domain_source="Host" connection="17-4-client/192.0.2.1:43210--192.0.2.2:443/tcp#2"
GET / HTTP/1.1
Host: example.com
📄 For output formats and verification examples, see docs/example-outputs.md.
Modules
Linux builds include all eight modules below. Android builds include tls, gotls, and bash.
- bash: captures bash commands
- zsh: captures zsh commands
- gnutls: captures plaintext from GnuTLS libraries without needing a CA certificate
- gotls: captures plaintext communication from Go programs using TLS/HTTPS
- mysqld: captures SQL queries from MySQL 5.6/5.7/8.0 and MariaDB
- nspr (alias
nss): captures data read and written through NSPR - postgres: captures SQL sent through the simple query protocol on PostgreSQL 10 and later
- tls: captures TLS plaintext from applications using OpenSSL or BoringSSL
You can use ecapture -h to view the full list of subcommands.
OpenSSL module
eCapture searches standard library paths for libssl. Use --libssl to select a specific library.
If the target program is statically linked, you can set the program path directly as the value of the --libssl flag.
The OpenSSL module supports three output modes:
pcap/pcapngmode stores encrypted network packets and TLS secrets inpcap-NGformat.keylog/keymode saves TLS handshake keys to a file.textmode defaults to--text-source=pcapng, reconstructing complete HTTP/1.1 and HTTP/2 messages from live pcapng and DSB data. The capture interface is selected automatically; use-i eth0to override it. Use--text-source=hookto capture plaintext through function hooks instead (no interface required).
For OpenSSL, GoTLS, and GnuTLS, repeat --output to choose multiple destinations.
The default is stdout; explicit destinations replace that default. stdout
and stderr render readable records with log_type/module labels. In
-m pcapng mode, the terminal shows only operational logs. Files and
tcp://host:port use Protobuf v2 JSON Lines. In text mode they carry both
operational logs and captured events; in keylog/pcapng mode an output file
contains only operational logs, while TCP carries both record types.
Use --keylogfile/--pcapfile for native artifacts, with explicit filenames
required in the corresponding mode and no default native files.