DataDog / KubeHound

Tool for building Kubernetes attack paths
https://kubehound.io
Apache License 2.0
751 stars 41 forks source link

[help needed] using gremlin server for data output in kubehound #167

Open ssm6498 opened 7 months ago

ssm6498 commented 7 months ago

after configuring gremlin server which is running on different host in kubehound I am getting below errors: Error occurred during operation gremlinServerWSProtocol.readLoop(): 'E0703: expected string Key for map, got type='0x%!x(MISSING)''

2024/03/01 11:05:27 Read loop error 'E0703: expected string Key for map, got type='0x%!x(MISSING)'', closing read loop. 2024/03/01 11:05:27 Connection error callback invoked, closing protocol. 2024/03/01 11:05:27 Error occurred during operation gremlinServerWSProtocol.readLoop(): 'E0703: expected string Key for map, got type='0x%!x(MISSING)'' 2024/03/01 11:05:27 Read loop error 'E0703: expected string Key for map, got type='0x%!x(MISSING)'', closing read loop. 2024/03/01 11:05:27 Connection error callback invoked, closing protocol.

can anyone help me in configuring kubehound and gremlin properly to work together. its bit urgent. Thanks in advance!

ssm6498 commented 7 months ago

I am not doing any src changes, i have used package directly, hence some config file changes help expected

d0g0x01 commented 7 months ago

Can I check are you using our custom kubegraph image for the gremlin server or something else? We make extensive tweaks to janusgraph to support KubeHound so a standard gremlin server will not work.

I would recommend following the instructions to start the backend on your host, then run kubehound with a bespoke config that points to the remote server for janusgraph/mongo URLs

ssm6498 commented 7 months ago

Thanks for the reply, i am not using kubegraph, i have downloaded using janusgraph package separately and kept it in /opt/janugraph

I would recommend following the instructions to start the backend on your host, then run kubehound with a bespoke config that points to the remote server for janusgraph/mongo URLs -> i have done this.

Now i am trying with kubehound's notebook, but i would like to try the approach with kbegraph

Can I check are you using our custom kubegraph image for the gremlin server or something else? We make extensive tweaks to janusgraph to support KubeHound so a standard gremlin server will not work.

I would recommend following the instructions to start the backend on your host, then run kubehound with a bespoke config that points to the remote server for janusgraph/mongo URLs

Thanks for the reply, i am not using kubegraph, i have downloaded using janusgraph package separately and kept it in /opt/janugraph

I would recommend following the instructions to start the backend on your host, then run kubehound with a bespoke config that points to the remote server for janusgraph/mongo URLs -> i have done this.

Now i am trying with kubehound's notebook, but i would like to try the approach with kbegraph, can you please help in understanding how to use custom kubegraph image for the gremlin server

d0g0x01 commented 7 months ago

the kubegraph image is running as part of the backend stack in the docker compose. If you dont want to use the notebook you can connect directly to the gremlin server on localhost:8182. The compose files that define all of this are here:

https://github.com/DataDog/KubeHound/tree/main/deployments/kubehound