ecapture README

The project's README from github.com/gojue/ecapture. As one markdown file: README.md.

eCapture Logo

汉字 | English

GitHub stars GitHub forks CI Github Version

eCapture(旁观者): capture SSL/TLS text content without a CA certificate using eBPF.

[!IMPORTANT]
Supports Linux/Android on x86_64 (kernel 4.18+) and aarch64 (kernel 5.5+). Kernel version requirements apply per CPU architecture for both Linux and Android. Need ROOT permission or specific Linux capabilities. Does not support Windows and macOS system.


Introduction

Getting started

Download

ELF binary file

[!TIP] support Linux/Android x86_64/aarch64.

Download ELF zip file release , unzip and use by command sudo ecapture --help.

Docker image

[!TIP] Linux only.

# pull docker image
docker pull gojue/ecapture:latest
# run
docker run --rm --privileged=true --net=host -v ${HOST_PATH}:${CONTAINER_PATH} gojue/ecapture ARGS

⚠️ Security Note: --privileged=true grants full host access. For production use, consider specific capabilities instead. See Minimum Privileges Guide.

see Docker Hub for more information.

Capture openssl text content.

sudo ecapture tls

eCapture will automatically detect the system's OpenSSL library and start capturing plaintext. When you make an HTTPS request (e.g., curl https://google.com), the captured request and response will be displayed:

...
INF module started successfully. moduleName=EBPFProbeOPENSSL
??? UUID:233851_233851_curl_5_1_172.16.71.1:51837, Name:HTTP2Request, Type:2, Length:304
header field ":method" = "GET"
header field ":path" = "/"
header field ":authority" = "google.com"
...

📄 For complete output examples, see docs/example-outputs.md.

Modules

The eCapture tool comprises 8 modules that respectively support plaintext capture for TLS/SSL encryption libraries like OpenSSL, GnuTLS, NSPR, BoringSSL, and GoTLS. Additionally, it facilitates software audits for Bash, MySQL, and PostgreSQL applications.

OpenSSL Module

eCapture search /etc/ld.so.conf file default, to search load directories of SO file, and search openssl shard libraries location. or you can use --libssl flag to set shard library path.

If target program is compile statically, you can set program path as --libssl flag value directly。

The OpenSSL module supports three capture modes:

Pcap Mode

Supported TLS encrypted http 1.0/1.1/2.0 over TCP, and http3 QUIC protocol over UDP. You can specify -m pcap or -m pcapng and use it in conjunction with --pcapfile and -i parameters. The default value for --pcapfile is ecapture_openssl.pcapng.

sudo ecapture tls -m pcap -i eth0 --pcapfile=ecapture.pcapng tcp port 443

This command saves captured plaintext data packets as a pcapng file, which can be viewed using Wireshark.

📄 For complete pcapng mode output, see docs/example-outputs.md.

Keylog Mode

You can specify -m keylog or -m key and use it in conjunction with the --keylogfile parameter, which defaults to ecapture_masterkey.log.

The captured OpenSSL TLS Master Secret information is saved to --keylogfile. You can also enable tcpdump packet capture and then use Wireshark to open the file and set the Master Secret path to view plaintext data packets.

sudo ecapture tls -m keylog -keylogfile=openssl_keylog.log

You can also directly use the tshark software for real-time decryption and display:

tshark -o tls.keylog_file:ecapture_masterkey.log -Y http -T fields -e http.file_data -f "port 443" -i eth0

Text Mode

sudo ecapture tls -m text will output all plaintext data packets. (Starting from v0.7.0, it no longer captures SSLKEYLOG information.)

GoTLS Module

Similar to the OpenSSL module.

gotls command

capture tls text context.

Step 1:

sudo ecapture gotls --elfpath=/home/cfc4n/go_https_client --hex

Step 2:

/home/cfc4n/go_https_client

more help

sudo ecapture gotls -h

Other Modules

such as bash\mysqld\postgres modules, you can use ecapture -h to view the list of subcommands.

Videos

eCaptureQ GUI Application

eCaptureQ is a cross-platform graphical user interface client for eCapture, visualizing eBPF TLS capture capabilities. Built using the Rust + Tauri + React technology stack, it provides a real-time, responsive interface, enabling easy analysis of encrypted traffic without the need for CA certificates. It simplifies complex eBPF capture techniques, making them easy to use. Supports two modes:

Event Forwarding

Event Forwarding Projects

Video Demonstration

https://github.com/user-attachments/assets/c8b7a84d-58eb-4fdb-9843-f775c97bdbfb

🔗 GitHub Repository

Protobuf Protocols

For details of the Protobuf log schema used by eCapture/eCaptureQ, see:

Stargazers over time

Stargazers over time

Security & Operations

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

Compilation

Custom Compilation

You can customize the features you want, such as setting the offset address for uprobe to support statically compiled OpenSSL libraries. Refer to the compilation guide for compilation instructions.

Configurations Remote Update

After eCapture is running, you can dynamically modify the configurations through HTTP interfaces. Refer to the HTTP API Documentation.

Event Forwarding

eCapture supports multiple event forwarding methods. You can forward events to packet capture software such as Burp Suite. For details, refer to the Event Forwarding API Documentation.

ecapture (gojue/ecapture)

Searching Database…

15.5K ·GitHub
What is this?An open-source command-line security tool that uses eBPF to capture SSL/TLS traffic in plaintext — no CA certificate installation or MITM proxy needed. It can also audit shell commands and database queries on the host.
Is this a library I add to my own code, or a standalone tool?A standalone command-line tool you run with sudo on the machine you want to monitor — not a library. There is also eCaptureQ, a separate cross-platform GUI client built with Rust, Tauri and React.
How do I get it running?Download the ELF zip for your architecture from GitHub Releases, unzip it and run 'sudo ecapture --help'. On Linux you can also use the Docker image; the tool auto-detects the system's OpenSSL library and starts capturing plaintext.
Do I need root access or any certificates to run it?Root is required — either ROOT permission or specific Linux capabilities, and a Minimum Privileges guide documents the least-privilege setup. No certificates to install: it supports OpenSSL, LibreSSL, BoringSSL, GnuTLS, NSS/NSPR and Go's TLS library out of the box.
What are the biggest gotchas to know upfront?Windows and macOS are not supported, and the Docker image is Linux-only — it runs privileged, which the README flags as a security note. For statically compiled OpenSSL programs, pass the binary path via the --libssl flag.
Which systems does it run on?Linux and Android, on x86_64 (kernel 4.18 or newer) and aarch64/arm64 (kernel 5.5 or newer); kernel requirements differ per CPU architecture.
What can it capture besides HTTPS traffic?Eight modules in total. Besides TLS libraries (OpenSSL, GnuTLS, NSS, Go TLS) it audits bash and zsh commands for host security audit, and captures SQL queries from mysqld 5.6/5.7/8.0 and MariaDB plus PostgreSQL 10+.
How do I get the captured data out?The OpenSSL module has three modes: text prints plaintext to the terminal or a file; pcap/pcapng saves a pcapng file you can open in Wireshark (HTTP/1.x, HTTP/2 over TCP and HTTP/3 QUIC over UDP); keylog writes TLS master secrets for Wireshark or tshark decryption. Events can also be forwarded to tools like Burp Suite.
Is there a GUI, or is it terminal-only?There is eCaptureQ, a cross-platform GUI client written in Rust + Tauri + React. Integrated mode runs on Linux/Android, and Remote mode lets Windows, macOS or Linux clients connect to an eCapture service running elsewhere.
How does it decrypt TLS without a CA certificate?Instead of intercepting the network, it attaches eBPF uprobes to the SSL/TLS library functions inside the target process and reads plaintext and TLS keys directly, so there is no certificate for clients to trust. The uprobe offset can even be set manually to support statically compiled OpenSSL.
Creator
gojue
Size
17 MB
Stars
15.5K
Age
4y
Commits · 90 Days