-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libbpf-tools: Add sslsniff #4706
base: master
Are you sure you want to change the base?
Conversation
Port sslsniff from tools to libbpf-tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the inline comments, please:
- Follow kernel coding style
- Squash 4 commits into one
return true; | ||
} | ||
|
||
SEC("uprobe/do_handshake") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another uprobe/do_handshake
section below, this one looks incorrect.
{}, | ||
}; | ||
|
||
static bool verbose = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make verbose
a member of struct env
?
}) | ||
|
||
struct { | ||
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a compat layer in compat.bpf.h
which abstracts this percpu array out, see mountsnoop
for example.
Description:
This PR aims to transition the
sslsniff
tool from the tools directory to the libbpf-tools collection.Reference:
sslsniff
in bcc:Testing:
Setup:
sslsniff
by running:Output:
Upon running the curl command,
sslsniff
is expected to display the following output:Note: The displayed HTML content might vary based on the fetched page from
example.com
.Test for latency and handshake
Test for hexdump
Further Work:
While the basic tests validate the primary functionality, comprehensive testing is needed to ensure compatibility and stability across various environments and use-cases.