-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
RFE: trace TLS in container #65
Comments
I could do this: find the netshoot docker ID
docker inspect the ID
find libssl
use ecapture with the correct libssl path
execute the curl from netshoot pod
the ecapture output:
|
yes, you are right. eh....Is your problem solved? |
yes it is resolved, thanks for this great project :) |
Thanks the test. |
@BurlyLuo That is a good idea. can you send a PR for it? or an article? |
hm, this brings me thoughts about multi tenant cloud environment, that someone could run ecapture as container and gain privilege on the node and sniff other tenant containers TLS connection, is that possible ? |
Of course, if the container is authorized with the SYS_ADMIN permission, then it can obtain the communication plaintext of all networks on this host. So, That is an other topic about eBPF security on runtime. ref: https://github.com/ehids/ebpf-slide/blob/master/security/us-21-With-Friends-Like-EBPF-Who-Needs-Enemies.pdf |
I wonder if https://github.com/cilium/tetragon is able to detect this scenario, I assume your ehids could detect this too |
tetragon is the learning objective of ehids. |
I am not familiar with docker, can we create a docker file for ecapture to run ecapture in container/pod ? |
I think It is not necessary. via: #23 |
ok, good, just one more question, is it possible to give |
1, eCapture can capture all process TLS paintext who use the same libssl.so default. and can use |
ah, right I got 1), I am thinking in k8s pod/container scenario that each pod/container might have their own libssl copy, yes 2) can achieve that. |
by the way, I recorded a short video playing with ecapture https://youtu.be/Au1YeB0nz3g |
Good job. I'll create User Manual WIKI tomorrow with your video, thanks. 😊 |
Hi @cfc4n sorry to bother you again, I added the ecapture binary in netshoot pod like vincentmli/netshoot@72633ba so I can run ecapture from netshoot pod in k8s, the netshoot pod yaml file has privilege permission like below
you can see I mounted the node root / in netshoot pod /mnt to access the host libssl, but it errors out with "lstat /etc/ld.so.conf: no such file or directory", I wonder why ecapture is trying to check host
|
eh, eCapture will find |
ecapture is statically built
but are you saying eCapture dynamically linked with |
|
sure, ecapture is statically built . but eCapture hook |
sometimes , defined in [root@VM-16-13-centos bin]# ldd `which curl`|grep libc.so|awk '{print $3}'|xargs objdump -T |grep connect
0000000000112f90 w DF .text 000000000000009b GLIBC_2.2.5 __connect
0000000000112f90 w DF .text 000000000000009b GLIBC_2.2.5 connect @BurlyLuo @vincentmli |
ah, sorry I missed the output
but still error when I run ecapture in container with
|
tried create
|
may be it's a bug. can you send a new issue for it? |
sure, will do, appreciate the help! |
opened #69 |
close this since question is answered by @cfc4n |
Hi,
for example I have a netshoot pod running in kubernetes, when I run curl
I want to trace the TLS connection from the curl from the netshoot-hostnetwork pod, the curl in netshoot-hostnetwork pod has libssl below in the pod namespace
is this possible? or in general, could we improve ecapture to capture container TLS traffic?
The text was updated successfully, but these errors were encountered: