📦 KubeHound/ DataDog
Tool for building Kubernetes attack paths
Установка и запуск
Install
From Release
Download binaries are available for Linux / Windows / Mac OS via the releases page or by running the following (Mac OS/Linux):
wget https://github.com/DataDog/KubeHound/releases/latest/download/kubehound-$(uname -o | sed 's/GNU\///g')-$(uname -m) -O kubehound
chmod +x kubehound
<details>
<summary>MacOS Notes</summary>
If downloading the releases via a browser you must run e.g xattr -d com.apple.quarantine kubehound before running to prevent MacOS blocking execution
With homebrew
KubeHound is available in homebrew-core and you can simply run
brew update && brew install kubehound
kubehound should now be in your path.
From source
If you wish to build KubeHound from source, you will need to checkout a tag before building
git clone https://github.com/DataDog/KubeHound.git
cd KubeHound
git checkout $(git describe --tags --abbrev=0)
make build
KubeHound binary will be output to ./bin/build/kubehound.
Run
Select a target Kubernetes cluster, either:
- Using kubectx
- Using specific kubeconfig file by exporting the env variable:
export KUBECONFIG=/your/path/to/.kube/config
Then, simply run the kubehound binary:
# If you installed it from brew, it is in your path
kubehound
# If you installed it from release, it should be were you downloaded it
./kubehound
# If you installed it from source, it should be in the <repo_path>/bin/build folder
./bin/build/kubehound
For more advanced use case and configuration, see
- advanced configuration: all the settings available through the configuration file.
- common operations: the commands available from the KubeHound binary (
dump/ingest). - common errors: troubleshooting guide.
Note: KubeHound can be deployed as a serivce (KHaaS), for more information.
Example queries
We have documented a few sample queries to execute on the database in our documentation. A specific DSL has been developped to query the Graph for the most basic use cases (KubeHound DSL).
Из README репозитория · полный README на GitHub