CDK
CDK copied to clipboard
📦 Make security testing of K8s, Docker, and Containerd easier.
A little display mistake with println in exploit module which named k8s_shadow_apiserver. And I would like to integrated cve-2023-4911 to cdk, where should I add to, exploit module or elevate...
CC: https://github.com/cdk-team/CDK/pull/84
hi, @neargle 师傅,我在本地对 CVE-2020-8558 的复现中发现,如果在 pod 中要访问 host 上的 localhost tcp 服务,除了需要 pod 和 host 的 `route_localnet` 为 1 之外,还需要以下两个条件之一,来通过 pod 收到 host 回复包之后的源地址检查: 1. pod 具有 `CAP_NET_ADMIN`,来修改 pod 中...
历史上我们的几处代码里,有一个有趣但不算优雅的实现:使用 selfLink 来判断 Kubernetes ApiServer 的返回是否正确。 例如 CDK( github.com/cdk-team/CDK )里 检查 "selfLink": "/api/v1/namespaces/kube-system/pods/process-exporter-qnqwk" ; 但从 Kubernetes v1.20 开始,K8s 默认删除了 metadata.selfLink 字段,需要重启 apiserver 添加 RemoveSelfLink=false 才会有 selfLink。 我还在想有没有更优雅的方式来修复这个问题,毕竟漏洞测试工具要求被测环境修改启动参数是不可能的😂 。
Would be nice to also have netstat in embedded tools.
增加了查看网络连接plugin
# github.com/cdk-team/CDK/pkg/util ..\..\pkg\util\cgroup.go:174:19: undefined: unix.Utsname ..\..\pkg\util\cgroup.go:175:14: undefined: unix.Uname ..\..\pkg\util\file_io.go:72:32: undefined: syscall.Stat_t # github.com/cdk-team/CDK/pkg/exploit ..\..\pkg\exploit\rewrite_cgroup_devices.go:49:38: undefined: syscall.Stat_t ..\..\pkg\exploit\rewrite_cgroup_devices.go:147:18: undefined: syscall.Mknod
在最近的项目中,发现一个kubenets未授权访问的端口,但是目标url不在pods环境变量中,所以导致后续很多功能无法使用。 ``` func ApiServerAddr() (string, error) { protocol := "" host, port := os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT") if len(host) == 0 || len(port) == 0 { text := "err: cannot find kubernetes...
I was running github actions to run linter [makezero](https://github.com/ashanbrown/makezero) for top github golang repos. see issues https://github.com/alingse/go-linter-runner/issues/1 and the github actions output https://github.com/alingse/go-linter-runner/actions/runs/9242680355/job/25425806374 ``` ==================================================================================================== append to slice `mountInfos` with...
The intention here should be to initialize a slice with a capacity of len(cgroupLst) rather than initializing the length of this slice.