Skip to content

Conversation

@sameehj
Copy link

@sameehj sameehj commented Nov 18, 2025

Includes TCP client/server demo, write() syscall eBPF tracer, Makefile, and full README detailing problem, solution, architecture, and usage.

@toddouska
Copy link
Contributor

Our non TLS examples are more about showing someone how they would convert a client and / or server to TLS. I'm not sure the advantage of doing write() intercept example for non TLS. I'd prefer to see an example that does SSL_read() and SSL_write(). I started with write() in my demo that I spent less than hour on because I didn't want to introduce another dependency on the "hello world" basic example. Then I did SSL_write() to address adding one thing. And finally read for each if I remember correctly.

@sameehj
Copy link
Author

sameehj commented Nov 19, 2025

Hi @toddouska, thanks for the comments.

I’ve now added the full TLS example with uprobes on both wolfSSL_write() and wolfSSL_read(), which aligns much better with the rest of the wolfSSL examples. It was a bit more involved since I had to port the BPF side to x86_64 as well, but everything is now tested and working.

Going forward, we can also explore hooking other wolfSSL-related paths such as WolfGuard (kernel module) or the higher-level bindings.

Do you want me to drop the TCP example?

Copy link
Contributor

@toddouska toddouska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come all the files don't have a wolfSSL copyright? I thought we moved all files to GPLv3.

@toddouska toddouska removed their assignment Dec 12, 2025
@sameehj sameehj force-pushed the ebpf-syscall-write-trace branch 2 times, most recently from f47ec06 to dd0f5df Compare December 18, 2025 16:01
@sameehj
Copy link
Author

sameehj commented Dec 18, 2025

Thank you for the review @toddouska

I have updated all the necessary files to include the appropriate license headers.

@dgarske dgarske requested a review from toddouska December 19, 2025 17:51
@@ -0,0 +1,93 @@
Certificate:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we already have these in wolfssl-examples/certs/? If not please document where these came from so we can make sure they are updated. I'd prefer if possible to use the example keys/certs in the root certs dir. Thanks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @dgarske, thank you for the comment. These are indeed the same from /certs. Dropped the copies completely and reused the ones in /certs.

@sameehj sameehj force-pushed the ebpf-syscall-write-trace branch from dd0f5df to d6b1acc Compare December 24, 2025 10:08
This commit adds two examples:

1. Add eBPF syscall-write-trace example

Includes TCP client/server demo, write() syscall eBPF tracer, Makefile, and full README detailing problem, solution, architecture, and usage.

2. eBPF: add trace wolfSSL_write() and wolfSSL_read() using eBPF uprobes.

Includes:
 - TLS client and server examples
 - eBPF programs for write/read entry and read return
 - userspace loader with perf buffer handling
 - automatic symbol lookup (no hardcoded offsets)
 - x86_64 and ARM64 register handling
 - full README with usage, architecture, and explanation

Shows how to observe TLS plaintext inside applications without modifying
wolfSSL or application code.

Signed-off-by: sameeh.jubran <sameeh@wolfssl.com>
@sameehj sameehj force-pushed the ebpf-syscall-write-trace branch from d6b1acc to 90f3a1e Compare December 24, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants