# Kubestroyer | Kubernetes Exploitation Tool

**URL:** <https://onehack.st/t/kubestroyer-kubernetes-exploitation-tool/244508>\
**Category:** Tools & Scripts\
**Tags:** programming, hacking, freebies\
**Created:** [June 10, 2023, 11:26pm UTC](https://onehack.st/t/kubestroyer-kubernetes-exploitation-tool/244508 "2023-06-10T23:26:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhiteHat](https://onehack.st/user_avatar/onehack.st/whitehat/32/162514_2.png) [@WhiteHat](https://onehack.st/u/WhiteHat)\
**Post date:** [June 10, 2023, 11:26pm UTC](https://onehack.st/t/kubestroyer-kubernetes-exploitation-tool/244508/1 "2023-06-10T23:26:46Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/0/f/0f02b2bd34f792540f232cbdac2a149e05f91cd8.jpeg)

[![Contributors](https://camo.githubusercontent.com/5c5c01372fb32858268d0d94ac514f7769f29702a0be5f392e34eb32242aa0f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f526f6c697834342f4b7562657374726f7965722e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/Rolix44/Kubestroyer/graphs/contributors) [![Forks](https://camo.githubusercontent.com/5e4be6f94f1d6260a2aba8c51715f6bdc5c1bde049c7ed31096dd923451f559f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f526f6c697834342f4b7562657374726f7965722e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/Rolix44/Kubestroyer/network/members) [![Stargazers](https://camo.githubusercontent.com/db6b68e9fb78c4145012c58797d928732a5a328854002fc391ca8543bab8eb2c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f526f6c697834342f4b7562657374726f7965722e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/Rolix44/Kubestroyer/stargazers) [![Issues](https://camo.githubusercontent.com/593af4487c0eb5bc67541d8f75b0e97edb269720840dbff363ed58adbaf7669f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f526f6c697834342f4b7562657374726f7965722e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/Rolix44/Kubestroyer/issues) [![MIT License](https://camo.githubusercontent.com/55a257ce98986da145e25d798e552419c224128e6bf42b85c946ac943c7a7a5d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f526f6c697834342f4b7562657374726f7965722e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/Rolix44/Kubestroyer/blob/master/LICENSE.txt)

### Kubestroyer

Kubestroyer aims to exploit Kubernetes clusters misconfigurations and be the swiss army knife of your Kubernetes pentests  
[**Explore the docs »**](https://github.com/Rolix44/Kubestroyer)

[Report Bug](https://github.com/Rolix44/Kubestroyer/issues) · [Request Feature](https://github.com/Rolix44/Kubestroyer/issues)

Table of Contents

## About The Project

[![Product Name Screen Shot](https://github.com/Rolix44/Kubestroyer/raw/master/.github/project-name.png)](https://github.com/Rolix44/Kubestroyer/blob/master)

**Kubestroyer** is a Golang exploitation tool that aims to take advantage of Kubernetes clusters misconfigurations.

The tool is scanning known Kubernetes ports that can be exposed as well as exploiting them.

([back to top](https://github.com/Rolix44/Kubestroyer#readme-top))

### Built With

[![Golang](https://camo.githubusercontent.com/b6377c57859e054acd6c9543112665f7a61743390dc56e20a0d5a5b13b722287/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476f6c616e672d3037363941443f7374796c653d666f722d7468652d6261646765266c6f676f3d476f266c6f676f436f6c6f723d7768697465)](https://go.dev/)

([back to top](https://github.com/Rolix44/Kubestroyer#readme-top))

## Getting Started

To get a local copy up and running, follow these simple example steps.

### Prerequisites

- Go 1.19

wget [https://go.dev/dl/go1.19.4.linux-amd64.tar.gz](https://go.dev/dl/go1.19.4.linux-amd64.tar.gz) tar -C /usr/local -xzf go1.19.4.linux-amd64.tar.gz

### Installation

Use [prebuilt binary](https://github.com/Rolix44/Kubestroyer/releases)

**or**

Using go install command :

$ go install [github.com/Rolix44/Kubestroyer@latest](http://github.com/Rolix44/Kubestroyer@latest)

**or**

build from source:

1. Clone the repo

$ git clone [https://github.com/Rolix44/Kubestroyer.git](https://github.com/Rolix44/Kubestroyer.git)

1. build the binary

$ go build -o Kubestroyer cmd/kubestroyer/main.go

([back to top](https://github.com/Rolix44/Kubestroyer#readme-top))

## Usage

[![Product usage](https://github.com/Rolix44/Kubestroyer/raw/master/.github/kubestroyer-usage.gif)](https://github.com/Rolix44/Kubestroyer/blob/master)

| Parameter | Description | Mand/opt | Example |
| --- | --- | --- | --- |
| -t / --target | Target (IP, domain or file) | Mandatory | -t localhost,127.0.0.1 / -t ./domain.txt |
| –node-scan | Enable node port scanning (port 30000 to 32767) | Optionnal | -t localhost --node-scan |
| –anon-rce | RCE using Kubelet API anonymous auth | Optionnal | -t localhost --anon-rce |
| -x | Command to execute when using RCE (display service account token by default) | Optionnal | -t localhost --anon-rce -x “ls -al” |

([back to top](https://github.com/Rolix44/Kubestroyer#readme-top))

## Currently supported features

- Target
  - List of multiple targets
  - Input file as target

- Scanning
  - Known ports scan
  - Node port scan (30000 to 32767)
  - Port description

- Vulnerabilities
  - Annon RCE on Kubelet
    - Choose command to execute

([back to top](https://github.com/Rolix44/Kubestroyer#readme-top))

## Roadmap

- Choose the pod for anon RCE
- Etcd exploit
- Kubelet read-only API parsing for information disclosure

See the [open issues](https://github.com/Rolix44/Kubestroyer/issues) for a full list of proposed features (and known issues).

([back to top](https://github.com/Rolix44/Kubestroyer#readme-top))

## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag “enhancement”. Don’t forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

([back to top](https://github.com/Rolix44/Kubestroyer#readme-top))

## License

Distributed under the MIT License. See `LICENSE.txt` for more information.

([back to top](https://github.com/Rolix44/Kubestroyer#readme-top))

## GitHub:

> **[GitHub - Rolix44/Kubestroyer: Kubernetes exploitation tool](https://github.com/Rolix44/Kubestroyer)**
>
> Kubernetes exploitation tool
