sslsniff(8)
β¨ sslsniff(8) Β· System Manager's Manual β¨
π NAME
okay so sslsniff is the tool that prints data passed to OpenSSL, GnuTLS or NSS π and it runs on Linux eBPF/bcc π§
π SYNOPSIS
sslsniff [-h] [-p PID] [-u UID] [-x] [-c COMM] [-o] [-g] [-n] [-d]
[--hexdump] [--max-buffer-size SIZE] [-l] [--handshake] [--extra-lib
EXTRA_LIB]
π¦ DESCRIPTION
bestie, this one is iconic π
sslsniff prints the data that gets sent through the write/send and read/recv functions of OpenSSL, GnuTLS and NSS. That means you can see the plain text before it gets encrypted (when writing) and after it gets decrypted (when reading) πβ¨
It works by reading the second parameter of both functions, which is *buf. π«Ά
β οΈ Since this uses BPF, only the root user can run this tool. No exceptions, sorry babe π
πΈ REQUIREMENTS
You need CONFIG_BPF and bcc π§
π OPTIONS
-hβ the vibe check option π prints the usage message-p PIDβ only traces functions inside this process PID π―-u UIDβ only shows calls made by this UID π-xβ shows the extra fields: UID and TID β¨-c COMMβ only shows processes whose COMM matches exactly, no fuzzy stuff π-o,--no-opensslβ skips tracing OpenSSL functions π ββοΈ-g,--no-gnutlsβ skips tracing GnuTLS functions π ββοΈ-n,--no-nssβ also skips tracing GnuTLS functions π€
π Heads up: the original page says-n/--no-nssskips GnuTLS functions, which looks like a typo since NSS is the library it's named after. I'm just passing along what the page says, so double-check before you rely on it.
--hexdumpβ shows the data as a hexdump instead of trying to decode it as UTF-8 π§Ύ--max-buffer-size SIZEβ sets the max buffer size for intercepted data. Anything longer gets truncated βοΈ The default is 8 Kib, and the max possible value is a bit less than 32 Kib π-l,--latencyβ shows function latency in ms β±οΈ--handshakeβ shows handshake latency, but it only works if the latency option is on π€--extra-lib EXTRA_LIBβ the library type and the library path, separated by a colon π§© Supported library types areopenssl,gnutlsandnss. You can use this more than once, so go wild π
π§ EXAMPLES
Print all calls to SSL write/send and read/recv system-wide:
# sslsniff
Print only OpenSSL calls issued by user with UID 1000:
# sslsniff -u 1000 --no-nss --no-gnutls
Print SSL handshake event and latency for all traced functions:
# sslsniff -l --handshake
Print only calls to OpenSSL from /some/path/libssl.so:
sslsniff --no-openssl --no-gnutls --no-nss --extra-lib
openssl:/some/path/libssl.so
π FIELDS
FUNCβ which function is being called (write/send or read/recv) π€π₯TIMEβ the time of the command, in seconds β°COMMβ the entered command π¬PIDβ the process ID calling SSL πLENβ bytes written or read by SSL functions π¦UIDβ the UID of the process, only shown if you launch with-xπTIDβ the thread ID, only shown if you launch with-xπ§΅LAT(ms)β function latency in ms π¨
π SOURCE
This comes from bcc, bestie π«Ά
https://github.com/iovisor/bcc
Also check the bcc distribution for a companion _examples.txt file. It has example usage, output and commentary for this tool π
π₯οΈ OS
Linux π§
π§ͺ STABILITY
Unstable, it's still in development π§
π©βπ» AUTHORS
Adrian Lopez and Mark Drayton π
π SEE ALSO
trace(8) π¦
Okay that's the whole tea π« This page came from bcc, dated 2016-08-16, in the USER COMMANDS section. Go forth and sniff responsibly, bestie ππ§β¨
π¦ where this page comes from
- alpine 3.24: bcc-doc 0.36.1-r1 Β· Apache-2.0
- nixpkgs unstable: bcc 0.37.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms