├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── docker-stack.yml ├── hacker-container-in-action.png ├── hacker-container.png ├── images ├── madhuakula-blackhat-usa-2021-kubernetes-security.png └── madhuakula-sans-cloudsecnext-summit-2021.jpeg ├── list.todo └── pwnchart ├── Chart.yaml ├── templates ├── _helpers.tpl ├── clusterrole.yaml └── clusterrolebinding.yaml └── values.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.toptal.com/developers/gitignore/api/macos,linux,git 3 | # Edit at https://www.toptal.com/developers/gitignore?templates=macos,linux,git 4 | 5 | ### Git ### 6 | # Created by git for backups. To disable backups in Git: 7 | # $ git config --global mergetool.keepBackup false 8 | *.orig 9 | 10 | # Created by git when using merge tools for conflicts 11 | *.BACKUP.* 12 | *.BASE.* 13 | *.LOCAL.* 14 | *.REMOTE.* 15 | *_BACKUP_*.txt 16 | *_BASE_*.txt 17 | *_LOCAL_*.txt 18 | *_REMOTE_*.txt 19 | 20 | ### Linux ### 21 | *~ 22 | 23 | # temporary files which can be created if a process still has a handle open of a deleted file 24 | .fuse_hidden* 25 | 26 | # KDE directory preferences 27 | .directory 28 | 29 | # Linux trash folder which might appear on any partition or disk 30 | .Trash-* 31 | 32 | # .nfs files are created when an open file is removed but is still being accessed 33 | .nfs* 34 | 35 | ### macOS ### 36 | # General 37 | .DS_Store 38 | .AppleDouble 39 | .LSOverride 40 | 41 | # Icon must end with two \r 42 | Icon 43 | 44 | # Thumbnails 45 | ._* 46 | 47 | # Files that might appear in the root of a volume 48 | .DocumentRevisions-V100 49 | .fseventsd 50 | .Spotlight-V100 51 | .TemporaryItems 52 | .Trashes 53 | .VolumeIcon.icns 54 | .com.apple.timemachine.donotpresent 55 | 56 | # Directories potentially created on remote AFP share 57 | .AppleDB 58 | .AppleDesktop 59 | Network Trash Folder 60 | Temporary Items 61 | .apdisk 62 | 63 | # End of https://www.toptal.com/developers/gitignore/api/macos,linux,git -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:alpine as golang 2 | LABEL NAME="Hacker Container" MAINTAINER="Madhu Akula" 3 | RUN apk add --no-cache git \ 4 | && go install github.com/aquasecurity/kube-bench@latest \ 5 | && go install github.com/OJ/gobuster@latest \ 6 | && git clone https://github.com/cyberark/kubeletctl \ 7 | && cd kubeletctl && go install github.com/mitchellh/gox@latest \ 8 | && go mod vendor && go fmt ./... && mkdir -p build \ 9 | && if [ `uname -m` == "aarch64" ]; then ARCH="linux/arm64"; else ARCH="linux/amd64"; fi \ 10 | && GOFLAGS=-mod=vendor gox -ldflags "-s -w" --osarch=$ARCH -output "build/kubeletctl_local_build" 11 | 12 | FROM alpine:3.14 13 | LABEL NAME="Hacker Container" MAINTAINER="Madhu Akula" 14 | 15 | ENV DOCKER_VERSION=19.03.9 16 | ENV KUBECTL_VERSION=1.24.0 17 | ENV HELM_VERSION=3.2.2 18 | ENV HELMV2_VERSION=2.16.7 19 | ENV AUDIT2RBAC_VERSION=0.8.0 20 | ENV AMICONTAINED_VERSION=0.4.9 21 | ENV KUBESEC_VERSION=2.11.4 22 | ENV CFSSL_VERSION=1.6.4 23 | ENV AMASS_VERSION=3.6.3 24 | ENV KUBECTL_WHOCAN_VERSION=0.4.0 25 | ENV ETCDCTL_VERSION=3.4.9 26 | ENV KUBEBENCH_VERSION=0.3.0 27 | ENV GITLEAKS_VERSION=8.8.11 28 | ENV TLDR_VERSION=0.6.1 29 | ENV KUBEAUDIT_VERSION=0.18.0 30 | ENV POPEYE_VERSION=0.9.0 31 | ENV HADOLINT_VERSION=2.10.0 32 | ENV CONFTEST_VERSION=0.21.0 33 | 34 | WORKDIR /tmp 35 | 36 | COPY --from=golang /go/bin/kube-bench /usr/local/bin/kube-bench 37 | COPY --from=golang /go/bin/gobuster /usr/local/bin/gobuster 38 | COPY --from=golang /go/kubeletctl/build/kubeletctl_local_build /usr/local/bin/kubeletctl 39 | 40 | COPY pwnchart /root/pwnchart 41 | 42 | RUN if [ `uname -m` == "aarch64" ]; then \ 43 | apk --no-cache add \ 44 | curl wget bash htop nmap nmap-scripts python3 python2 py3-pip ca-certificates bind-tools \ 45 | coreutils iputils net-tools git unzip whois tcpdump openssl proxychains-ng procps zmap scapy \ 46 | netcat-openbsd redis postgresql-client mysql-client masscan nikto ebtables perl-net-ssleay \ 47 | && curl -LO https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/arm64/kubectl \ 48 | && mv kubectl /usr/local/bin/kubectl \ 49 | && curl -fSLO https://github.com/Shopify/kubeaudit/releases/download/v${KUBEAUDIT_VERSION}/kubeaudit_${KUBEAUDIT_VERSION}_linux_arm64.tar.gz \ 50 | && tar -xvzf kubeaudit_${KUBEAUDIT_VERSION}_linux_arm64.tar.gz && mv kubeaudit /usr/local/bin/kubeaudit \ 51 | && curl -fSLO https://github.com/derailed/popeye/releases/download/v${POPEYE_VERSION}/popeye_Linux_arm64.tar.gz \ 52 | && tar -xvzf popeye_Linux_arm64.tar.gz && mv popeye /usr/local/bin/popeye \ 53 | && curl -fSL https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-Linux-arm64 \ 54 | -o /usr/local/bin/hadolint \ 55 | && curl -fSLO https://github.com/open-policy-agent/conftest/releases/download/v${CONFTEST_VERSION}/conftest_${CONFTEST_VERSION}_Linux_arm64.tar.gz \ 56 | && tar -xvzf conftest_${CONFTEST_VERSION}_Linux_arm64.tar.gz && mv conftest /usr/local/bin/conftest \ 57 | && curl -LO https://get.helm.sh/helm-v${HELM_VERSION}-linux-arm64.tar.gz \ 58 | && tar -zxvf helm-v${HELM_VERSION}-linux-arm64.tar.gz && mv linux-arm64/helm /usr/local/bin/helm \ 59 | && curl -LO https://get.helm.sh/helm-v${HELMV2_VERSION}-linux-arm64.tar.gz \ 60 | && tar -zxvf helm-v${HELMV2_VERSION}-linux-arm64.tar.gz && mv linux-arm64/helm /usr/local/bin/helm2 \ 61 | && curl -LO https://github.com/liggitt/audit2rbac/releases/download/v${AUDIT2RBAC_VERSION}/audit2rbac-linux-arm64.tar.gz \ 62 | && curl -fSL https://github.com/adamhurm/amicontained/releases/download/v${AMICONTAINED_VERSION}/amicontained_linux_arm64 \ 63 | -o /usr/local/bin/amicontained \ 64 | && curl -fSLO https://github.com/controlplaneio/kubesec/releases/download/v${KUBESEC_VERSION}/kubesec_linux_arm64.tar.gz \ 65 | && tar -xvzf kubesec_linux_arm64.tar.gz && mv kubesec /usr/local/bin/kubesec \ 66 | && curl -fSL https://github.com/cloudflare/cfssl/releases/download/v${CFSSL_VERSION}/cfssl_${CFSSL_VERSION}_linux_arm64 \ 67 | -o /usr/local/bin/cfssl \ 68 | && curl -fSLO https://github.com/OWASP/Amass/releases/download/v${AMASS_VERSION}/amass_linux_arm64.zip \ 69 | && unzip amass_linux_arm64.zip && mv amass_linux_arm64/amass /usr/local/bin/amass \ 70 | && mv amass_linux_arm64/examples/wordlists /usr/share/wordlists \ 71 | && curl -fSL https://github.com/danielmiessler/SecLists/raw/master/Passwords/Leaked-Databases/rockyou.txt.tar.gz \ 72 | -o /usr/share/wordlists/rockyou.txt.tar.gz \ 73 | # For now we are just using the k8s manifests for leveraging the kube-hunter, in future we should support the local package 74 | && curl -fSLO https://github.com/aquasecurity/kubectl-who-can/releases/download/v${KUBECTL_WHOCAN_VERSION}/kubectl-who-can_linux_arm64.tar.gz \ 75 | && tar -xvzf kubectl-who-can_linux_arm64.tar.gz \ 76 | && mv kubectl-who-can /usr/local/bin/kubectl-who-can \ 77 | && curl -fSLO https://download.docker.com/linux/static/stable/aarch64/docker-${DOCKER_VERSION}.tgz \ 78 | && tar -xvzf docker-${DOCKER_VERSION}.tgz && mv docker/* /usr/local/bin/ \ 79 | && curl -fsLO https://github.com/isacikgoz/tldr/releases/download/v${TLDR_VERSION}/tldr_${TLDR_VERSION}_linux_arm64.tar.gz \ 80 | && tar -xvzf tldr_${TLDR_VERSION}_linux_arm64.tar.gz && mv tldr /usr/local/bin/ \ 81 | && curl -fSLO https://github.com/etcd-io/etcd/releases/download/v${ETCDCTL_VERSION}/etcd-v${ETCDCTL_VERSION}-linux-arm64.tar.gz \ 82 | && tar -xvzf etcd-v${ETCDCTL_VERSION}-linux-arm64.tar.gz && mv etcd-v${ETCDCTL_VERSION}-linux-arm64/etcdctl /usr/local/bin/ \ 83 | && git clone https://github.com/docker/docker-bench-security.git /root/docker-bench-security \ 84 | && git clone https://github.com/CISOfy/lynis /root/lynis \ 85 | && git clone --depth 1 https://github.com/drwetter/testssl.sh.git /usr/share/testssl \ 86 | && ln -s /usr/share/testssl/testssl.sh /usr/local/bin/testssl \ 87 | && curl -fSLO https://github.com/zricethezav/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_arm64.tar.gz \ 88 | && tar -xzvf gitleaks_${GITLEAKS_VERSION}_linux_arm64.tar.gz \ 89 | && mv gitleaks /usr/local/bin/gitleaks \ 90 | && curl -fSL https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh -o /usr/local/bin/linenum \ 91 | && git clone --depth 1 https://github.com/pentestmonkey/unix-privesc-check.git /root/unix-privesc-check \ 92 | && curl -fSL https://raw.githubusercontent.com/mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh -o /usr/local/bin/linux-exploit-suggester \ 93 | && curl -fSL https://raw.githubusercontent.com/mbahadou/postenum/master/postenum.sh -o /usr/local/bin/postenum \ 94 | && git clone https://github.com/aquasecurity/kube-hunter /root/kube-hunter \ 95 | && chmod a+x /usr/local/bin/linenum /usr/local/bin/linux-exploit-suggester /usr/local/bin/cfssl /usr/local/bin/hadolint /usr/local/bin/conftest \ 96 | /usr/local/bin/postenum /usr/local/bin/gitleaks /usr/local/bin/kubectl /usr/local/bin/amicontained /usr/local/bin/kubeaudit /usr/local/bin/popeye /usr/local/bin/kubeletctl \ 97 | && pip3 install --no-cache-dir awscli truffleHog \ 98 | && echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/main' >> /etc/apk/repositories \ 99 | && echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >> /etc/apk/repositories \ 100 | && apk update && apk add mongodb yaml-cpp=0.6.2-r2 \ 101 | # use musl linker 102 | && ln -s /lib/ld-musl-aarch64.so.1 /lib/ld-linux-aarch64.so.1 \ 103 | && rm -rf /tmp/* ; \ 104 | else \ 105 | apk --no-cache add \ 106 | curl wget bash htop nmap nmap-scripts python3 python2 py3-pip ca-certificates bind-tools \ 107 | coreutils iputils net-tools git unzip whois tcpdump openssl proxychains-ng procps zmap scapy \ 108 | netcat-openbsd redis postgresql-client mysql-client masscan nikto ebtables perl-net-ssleay \ 109 | && curl -LO https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \ 110 | && mv kubectl /usr/local/bin/kubectl \ 111 | && curl -fSLO https://github.com/Shopify/kubeaudit/releases/download/v${KUBEAUDIT_VERSION}/kubeaudit_${KUBEAUDIT_VERSION}_linux_amd64.tar.gz \ 112 | && tar -xvzf kubeaudit_${KUBEAUDIT_VERSION}_linux_amd64.tar.gz && mv kubeaudit /usr/local/bin/kubeaudit \ 113 | && curl -fSLO https://github.com/derailed/popeye/releases/download/v${POPEYE_VERSION}/popeye_Linux_x86_64.tar.gz \ 114 | && tar -xvzf popeye_Linux_x86_64.tar.gz && mv popeye /usr/local/bin/popeye \ 115 | && curl -fSL https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-Linux-x86_64 \ 116 | -o /usr/local/bin/hadolint \ 117 | && curl -fSLO https://github.com/open-policy-agent/conftest/releases/download/v${CONFTEST_VERSION}/conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz \ 118 | && tar -xvzf conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz && mv conftest /usr/local/bin/conftest \ 119 | && curl -LO https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz \ 120 | && tar -zxvf helm-v${HELM_VERSION}-linux-amd64.tar.gz && mv linux-amd64/helm /usr/local/bin/helm \ 121 | && curl -LO https://get.helm.sh/helm-v${HELMV2_VERSION}-linux-amd64.tar.gz \ 122 | && tar -zxvf helm-v${HELMV2_VERSION}-linux-amd64.tar.gz && mv linux-amd64/helm /usr/local/bin/helm2 \ 123 | && curl -LO https://github.com/liggitt/audit2rbac/releases/download/v${AUDIT2RBAC_VERSION}/audit2rbac-linux-amd64.tar.gz \ 124 | && curl -fSL https://github.com/genuinetools/amicontained/releases/download/v${AMICONTAINED_VERSION}/amicontained-linux-amd64 \ 125 | -o /usr/local/bin/amicontained \ 126 | && curl -fSLO https://github.com/controlplaneio/kubesec/releases/download/v${KUBESEC_VERSION}/kubesec_linux_amd64.tar.gz \ 127 | && tar -xvzf kubesec_linux_amd64.tar.gz && mv kubesec /usr/local/bin/kubesec \ 128 | && curl -fSL https://github.com/cloudflare/cfssl/releases/download/v${CFSSL_VERSION}/cfssl_${CFSSL_VERSION}_linux_amd64 \ 129 | -o /usr/local/bin/cfssl \ 130 | && curl -fSLO https://github.com/OWASP/Amass/releases/download/v${AMASS_VERSION}/amass_linux_amd64.zip \ 131 | && unzip amass_linux_amd64.zip && mv amass_linux_amd64/amass /usr/local/bin/amass \ 132 | && mv amass_linux_amd64/examples/wordlists /usr/share/wordlists \ 133 | && curl -fSL https://github.com/danielmiessler/SecLists/raw/master/Passwords/Leaked-Databases/rockyou.txt.tar.gz \ 134 | -o /usr/share/wordlists/rockyou.txt.tar.gz \ 135 | && curl -fSLO https://github.com/aquasecurity/kubectl-who-can/releases/download/v${KUBECTL_WHOCAN_VERSION}/kubectl-who-can_linux_x86_64.tar.gz \ 136 | && tar -xvzf kubectl-who-can_linux_x86_64.tar.gz \ 137 | && mv kubectl-who-can /usr/local/bin/kubectl-who-can \ 138 | && curl -fSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \ 139 | && tar -xvzf docker-${DOCKER_VERSION}.tgz && mv docker/* /usr/local/bin/ \ 140 | && curl -fsLO https://github.com/isacikgoz/tldr/releases/download/v${TLDR_VERSION}/tldr_${TLDR_VERSION}_linux_amd64.tar.gz \ 141 | && tar -xvzf tldr_${TLDR_VERSION}_linux_amd64.tar.gz && mv tldr /usr/local/bin/ \ 142 | && curl -fSLO https://github.com/etcd-io/etcd/releases/download/v${ETCDCTL_VERSION}/etcd-v${ETCDCTL_VERSION}-linux-amd64.tar.gz \ 143 | && tar -xvzf etcd-v${ETCDCTL_VERSION}-linux-amd64.tar.gz && mv etcd-v${ETCDCTL_VERSION}-linux-amd64/etcdctl /usr/local/bin/ \ 144 | && git clone https://github.com/docker/docker-bench-security.git /root/docker-bench-security \ 145 | && git clone https://github.com/CISOfy/lynis /root/lynis \ 146 | && git clone --depth 1 https://github.com/drwetter/testssl.sh.git /usr/share/testssl \ 147 | && ln -s /usr/share/testssl/testssl.sh /usr/local/bin/testssl \ 148 | && curl -fSLO https://github.com/zricethezav/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz \ 149 | && tar -xzvf gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz \ 150 | && mv gitleaks /usr/local/bin/gitleaks \ 151 | && curl -fSL https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh -o /usr/local/bin/linenum \ 152 | && git clone --depth 1 https://github.com/pentestmonkey/unix-privesc-check.git /root/unix-privesc-check \ 153 | && curl -fSL https://raw.githubusercontent.com/mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh -o /usr/local/bin/linux-exploit-suggester \ 154 | && curl -fSL https://raw.githubusercontent.com/mbahadou/postenum/master/postenum.sh -o /usr/local/bin/postenum \ 155 | # For now we are just using the k8s manifests for leveraging the kube-hunter, in future we should support the local package 156 | && git clone https://github.com/aquasecurity/kube-hunter /root/kube-hunter \ 157 | && chmod a+x /usr/local/bin/linenum /usr/local/bin/linux-exploit-suggester /usr/local/bin/cfssl /usr/local/bin/hadolint /usr/local/bin/conftest \ 158 | /usr/local/bin/postenum /usr/local/bin/gitleaks /usr/local/bin/kubectl /usr/local/bin/amicontained /usr/local/bin/kubeaudit /usr/local/bin/popeye /usr/local/bin/kubeletctl \ 159 | && pip3 install --no-cache-dir awscli truffleHog \ 160 | && echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/main' >> /etc/apk/repositories \ 161 | && echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >> /etc/apk/repositories \ 162 | && apk update && apk add mongodb yaml-cpp=0.6.2-r2 \ 163 | && rm -rf /tmp/* ; \ 164 | fi 165 | 166 | WORKDIR /root 167 | 168 | CMD [ "/bin/sh" ] 169 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Madhu Akula 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hacker Container 2 | 3 | [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/madhuakula/hacker-container/blob/master/LICENSE) 4 | [![Github Stars](https://img.shields.io/github/stars/madhuakula/hacker-container)](https://github.com/madhuakula/hacker-container/stargazers) 5 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/madhuakula/hacker-container/pulls) 6 | [![Docker Pulls Hacker Container](https://img.shields.io/docker/pulls/madhuakula/hacker-container?logo=docker)](https://hub.docker.com/r/madhuakula/hacker-container) 7 | [![Twitter](https://img.shields.io/twitter/url?url=https://github.com/madhuakula/hacker-container)](https://twitter.com/intent/tweet/?text=Container%20with%20all%20the%20list%20of%20useful%20tools%20and%20commands%20while%20hacking%20Kubernetes%20Clusters%20created%20by%20%40madhuakula&url=https://github.com/madhuakula/hacker-container) 8 | 9 | Container with all the list of useful tools/commands while hacking Kubernetes Clusters. Read more about it in the blogpost [https://blog.madhuakula.com/hacker-container-for-kubernetes-security-assessments-7d1522e96073](https://blog.madhuakula.com/hacker-container-for-kubernetes-security-assessments-7d1522e96073) 10 | 11 | [![WordCloud Image of Tools](hacker-container.png)](https://blog.madhuakula.com/hacker-container-for-kubernetes-security-assessments-7d1522e96073) 12 | 13 | * List of the tools/commands/utilities available in container are **[list.todo](list.todo)** 14 | 15 | ## How to use Hacker Container 16 | 17 | [![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/madhuakula/hacker-container/master/docker-stack.yml) 18 | 19 | * Just run the following command to explore in the docker container environments 20 | 21 | ```bash 22 | docker run --rm -it madhuakula/hacker-container 23 | ``` 24 | 25 | * To deploy as a Pod in Kubernetes cluster run the following command 26 | 27 | ```bash 28 | kubectl run -it hacker-container --image=madhuakula/hacker-container 29 | ``` 30 | 31 | > This container can be used in different ways in different environments, it aids your penetration testing or security assessments of container and Kubernetes cluster environments. 32 | 33 | ## Hacker Container in Action 34 | 35 | ![Hacker Container in Action](hacker-container-in-action.png) 36 | 37 | ### Feedback/Suggestions 38 | 39 | > Please feel free to [create issue](https://github.com/madhuakula/hacker-container/issues/new) or make a pull request or tweet to me [@madhuakula](https://twitter.com/madhuakula) for improvements and suggestions 40 | -------------------------------------------------------------------------------- /docker-stack.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | services: 3 | hackercontainer: 4 | image: madhuakula/hacker-container:latest 5 | command: tail -f /dev/null 6 | tty: true 7 | restart: always 8 | networks: 9 | - hacker_container_network 10 | 11 | networks: 12 | hacker_container_network: 13 | -------------------------------------------------------------------------------- /hacker-container-in-action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madhuakula/hacker-container/6b1fa01ed5fafb76cd45f6fc9bdc3a8aa8a71e8b/hacker-container-in-action.png -------------------------------------------------------------------------------- /hacker-container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madhuakula/hacker-container/6b1fa01ed5fafb76cd45f6fc9bdc3a8aa8a71e8b/hacker-container.png -------------------------------------------------------------------------------- /images/madhuakula-blackhat-usa-2021-kubernetes-security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madhuakula/hacker-container/6b1fa01ed5fafb76cd45f6fc9bdc3a8aa8a71e8b/images/madhuakula-blackhat-usa-2021-kubernetes-security.png -------------------------------------------------------------------------------- /images/madhuakula-sans-cloudsecnext-summit-2021.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madhuakula/hacker-container/6b1fa01ed5fafb76cd45f6fc9bdc3a8aa8a71e8b/images/madhuakula-sans-cloudsecnext-summit-2021.jpeg -------------------------------------------------------------------------------- /list.todo: -------------------------------------------------------------------------------- 1 | List of tools available: 2 | ✔ coreutils 3 | ✔ iputils 4 | ✔ unzip 5 | ✔ net-tools 6 | ✔ openssl 7 | ✔ htop 8 | ✔ curl 9 | ✔ wget 10 | ✔ docker 11 | ✔ kubectl 12 | ✔ amicontained 13 | ✔ python 14 | ✔ python2 15 | ✔ python3 16 | ✔ helm 17 | ✔ helm V2 18 | ✔ helm V3 19 | ✔ git 20 | ✔ nmap 21 | ✔ zmap 22 | ✔ masscan 23 | ✔ audit2rbac 24 | ✔ nikto 25 | ✔ proxychains-ng 26 | ✔ netcat 27 | ✔ capsh 28 | ✔ kubesec 29 | ✔ awscli 30 | ✔ whois 31 | ✔ tcpdump 32 | ✔ cfssl 33 | ✔ Amass 34 | ✔ wordlists 35 | ✔ rockyou.txt 36 | ✔ gobuster 37 | ✔ kubectl-who-can 38 | ✔ etcdctl 39 | ✔ redis-cli 40 | ✔ psql 41 | ✔ mysql-client 42 | ✔ testssl.sh 43 | ✔ scapy 44 | ✔ LinEnum.sh 45 | ✔ unix-privesc-check 46 | ✔ Linux_Exploit_Suggester 47 | ✔ postenum 48 | ✔ docker-bench-security 49 | ✔ kube-bench 50 | ✔ truffleHog 51 | ✔ gitleaks 52 | ✔ bind-tools 53 | ✔ lynis 54 | ✔ tldr.sh 55 | ✔ pwnchart 56 | ✔ kubeaudit 57 | ✔ popeye 58 | ✔ hadolint 59 | ✔ conftest 60 | ✔ kube-hunter 61 | ✔ kubeletctl 62 | ✔ mongo 63 | 64 | Possible list of tools to include: 65 | ☐ gcloud 66 | ☐ gsutil 67 | ☐ hydra 68 | ☐ sqlmap 69 | ☐ whatweb 70 | ☐ findmyhash 71 | ☐ crunch 72 | ☐ tshark 73 | ☐ jtr 74 | ☐ checksec.sh 75 | ☐ CeWL 76 | ☐ hashcat 77 | ☐ AutoSploit 78 | ☐ kubectl-dig 79 | ☐ falco 80 | -------------------------------------------------------------------------------- /pwnchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes Goat helm-tiller 4 | name: pwnchart 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /pwnchart/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{- define "pwnchart.name" -}} 2 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 3 | {{- end -}} 4 | 5 | {{- define "pwnchart.fullname" -}} 6 | {{- $name := default .Chart.Name .Values.nameOverride -}} 7 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 8 | {{- end -}} 9 | -------------------------------------------------------------------------------- /pwnchart/templates/clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: all-your-base 5 | rules: 6 | - apiGroups: ["*"] 7 | resources: ["*"] 8 | verbs: ["*"] 9 | -------------------------------------------------------------------------------- /pwnchart/templates/clusterrolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | name: belong-to-us 5 | roleRef: 6 | apiGroup: rbac.authorization.k8s.io 7 | kind: ClusterRole 8 | name: all-your-base 9 | subjects: 10 | - kind: ServiceAccount 11 | namespace: {{ .Values.namespace }} 12 | name: {{ .Values.name }} 13 | -------------------------------------------------------------------------------- /pwnchart/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for connectivity-check. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | namespace: default 5 | name: default 6 | --------------------------------------------------------------------------------