sslsnoop.bt(8)

πŸ“¦ version 0.17.0, in debian bookworm

✨ sslsnoop.bt β€” the SSL/TLS handshake spy πŸ’–

okay bestie, welcome to sslsnoop.bt(8) from the System Manager's Manual section β€” yes it's a section 8 page, we're in the big leagues πŸ’…


🌸 NAME 🌸

sslsnoop.bt β€” shows SSL/TLS handshake events. uses bpftrace/eBPF, no cap ✨


πŸŽ€ SYNOPSIS πŸŽ€

sslsnoop.bt

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically sslsnoop traces the OpenSSL handshake functions and shows you the latency and the return value. it's giving performance analysis fr fr β€” use it to analyze your SSL/TLS performance. πŸ”₯

it does this by dynamic tracing the uprobes in OpenSSL and related crypto libs. > heads up: it may need updating to match future changes to these functions. the vibes are load-bearing, okay 😭

and because this uses BPF, only the root user can run this tool. sorry babe, it's a whole permission thing πŸ‘‘


πŸ’œ REQUIREMENTS πŸ’œ

  • CONFIG_BPF
  • bpftrace

that's the whole guest list 🫢


🌈 EXAMPLES 🌈

trace SSL/TLS handshake events and get per-line summaries:

# sslsnoop.bt

periodt. that's the example πŸ’–


⭐ FIELDS ⭐

  • TIME(us) β€” when the call finished, in microseconds since the program started. little timestamp moment ✨
  • TID β€” the Thread ID. who did it 🧚
  • COMM β€” the process name. the name of the main character πŸ’…
  • LAT(us) β€” latency of the call, in microseconds. how long it took bestie ⏱️
  • RET β€” return value of the call. did it slay or did it flop πŸ™ˆ
  • FUNC β€” the function name. which one did it πŸŽ€

🌸 OVERHEAD 🌸

ngl the overhead here is expected to be negligible. why? because an SSL/TLS handshake usually contains network latency, and the traced crypto functions are CPU intensive tasks β€” so the call frequency should be low. lowkey free. πŸ’–


πŸ’€ SOURCE πŸ’€

this is from bpftrace.

https://github.com/iovisor/bpftrace

also bestie, go look in the bpftrace distribution for a companion _examples.txt file β€” it's got example usage, output, and commentary for this tool. the lore πŸ”₯

and fyi there's a bcc tool called sslsniff that can show SSL/TLS handshake event latency before sniffing the plaintext in SSL_read/write. this tool, though? it provides more detailed crypto latency distribution during the handshake event. different girl, different job πŸ’…

https://github.com/iovisor/bcc

🐧 OS 🐧

Linux. obviously. penguin energy 🐧


🚧 STABILITY 🚧

Unstable - in development. it's in its experimental era, be gentle 😭


πŸ‘‘ AUTHOR πŸ‘‘

Tao Xu πŸ’–


🫢 SEE ALSO 🫢


okay that's the whole page bestie, go trace some handshakes 🌈✨

signing off β€” this was USER COMMANDS, dated 2021-12-28, and the page is sslsnoop.bt(8). mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from