DO - Kubernetes (DOKS)

Impara l'hacking di AWS da zero a eroe con htARTE (HackTricks AWS Red Team Expert)!

Altri modi per supportare HackTricks:

Informazioni di base

DigitalOcean Kubernetes (DOKS)

DOKS è un servizio Kubernetes gestito offerto da DigitalOcean. Il servizio è progettato per deployare e gestire cluster Kubernetes sulla piattaforma di DigitalOcean. Gli aspetti chiave di DOKS includono:

  1. Facilità di gestione: L'obbligo di configurare e mantenere l'infrastruttura sottostante viene eliminato, semplificando la gestione dei cluster Kubernetes.

  2. Interfaccia user-friendly: Fornisce un'interfaccia intuitiva che facilita la creazione e l'amministrazione dei cluster.

  3. Integrazione con i servizi di DigitalOcean: Si integra in modo trasparente con altri servizi forniti da DigitalOcean, come Load Balancer e Block Storage.

  4. Aggiornamenti e upgrade automatici: Il servizio include l'aggiornamento e l'upgrade automatico dei cluster per garantire che siano sempre aggiornati.

Connessione

# Generate kubeconfig from doctl
doctl kubernetes cluster kubeconfig save <cluster-id>

# Use a kubeconfig file that you can download from the console
kubectl --kubeconfig=/<pathtodirectory>/k8s-1-25-4-do-0-ams3-1670939911166-kubeconfig.yaml get nodes

Enumerazione

Discovering Kubernetes Clusters

Scoperta dei cluster Kubernetes

To discover Kubernetes clusters in DigitalOcean, you can use the following methods:

Per scoprire i cluster Kubernetes in DigitalOcean, puoi utilizzare i seguenti metodi:

Method 1: DNS Enumeration

Metodo 1: Enumerazione DNS

You can use tools like dnsrecon, dnsenum, or amass to enumerate subdomains of the target domain. Look for subdomains like kubernetes, kube, k8s, or any other variations that might indicate the presence of a Kubernetes cluster.

Puoi utilizzare strumenti come dnsrecon, dnsenum o amass per enumerare i sottodomini del dominio di destinazione. Cerca sottodomini come kubernetes, kube, k8s o qualsiasi altra variante che potrebbe indicare la presenza di un cluster Kubernetes.

Method 2: Shodan

Metodo 2: Shodan

You can search for Kubernetes clusters using Shodan by using the following query:

Puoi cercare cluster Kubernetes utilizzando Shodan utilizzando la seguente query:

kubernetes port:6443

Method 3: Google Dorks

Metodo 3: Google Dorks

You can use Google Dorks to search for Kubernetes clusters by using the following query:

Puoi utilizzare Google Dorks per cercare cluster Kubernetes utilizzando la seguente query:

inurl:/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

Discovering Kubernetes Dashboard

Scoperta del Pannello di Controllo di Kubernetes

To discover the Kubernetes Dashboard in a DigitalOcean Kubernetes cluster, you can use the following methods:

Per scoprire il Pannello di Controllo di Kubernetes in un cluster Kubernetes di DigitalOcean, puoi utilizzare i seguenti metodi:

Method 1: DNS Enumeration

Metodo 1: Enumerazione DNS

You can use DNS enumeration techniques mentioned earlier to find subdomains related to the Kubernetes Dashboard. Look for subdomains like dashboard, kubernetes-dashboard, or any other variations.

Puoi utilizzare le tecniche di enumerazione DNS menzionate in precedenza per trovare sottodomini correlati al Pannello di Controllo di Kubernetes. Cerca sottodomini come dashboard, kubernetes-dashboard o qualsiasi altra variante.

Method 2: Google Dorks

Metodo 2: Google Dorks

You can use Google Dorks to search for the Kubernetes Dashboard by using the following query:

Puoi utilizzare Google Dorks per cercare il Pannello di Controllo di Kubernetes utilizzando la seguente query:

inurl:/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

Method 3: Port Scanning

Metodo 3: Scansione delle Porte

You can perform a port scan on the target IP address to check if port 8443 is open. The Kubernetes Dashboard is often exposed on this port.

Puoi eseguire una scansione delle porte sull'indirizzo IP di destinazione per verificare se la porta 8443 è aperta. Il Pannello di Controllo di Kubernetes è spesso esposto su questa porta.

Discovering Kubernetes API Server

Scoperta del Server API di Kubernetes

To discover the Kubernetes API server in a DigitalOcean Kubernetes cluster, you can use the following methods:

Per scoprire il server API di Kubernetes in un cluster Kubernetes di DigitalOcean, puoi utilizzare i seguenti metodi:

Method 1: DNS Enumeration

Metodo 1: Enumerazione DNS

You can use DNS enumeration techniques mentioned earlier to find subdomains related to the Kubernetes API server. Look for subdomains like api, kubernetes-api, or any other variations.

Puoi utilizzare le tecniche di enumerazione DNS menzionate in precedenza per trovare sottodomini correlati al server API di Kubernetes. Cerca sottodomini come api, kubernetes-api o qualsiasi altra variante.

Method 2: Google Dorks

Metodo 2: Google Dorks

You can use Google Dorks to search for the Kubernetes API server by using the following query:

Puoi utilizzare Google Dorks per cercare il server API di Kubernetes utilizzando la seguente query:

inurl:/api/v1/

Method 3: Port Scanning

Metodo 3: Scansione delle Porte

You can perform a port scan on the target IP address to check if port 6443 is open. The Kubernetes API server is often exposed on this port.

Puoi eseguire una scansione delle porte sull'indirizzo IP di destinazione per verificare se la porta 6443 è aperta. Il server API di Kubernetes è spesso esposto su questa porta.

# Get clusters
doctl kubernetes cluster list

# Get node pool of cluster (number of nodes)
doctl kubernetes cluster node-pool list <cluster-id>

# Get DO resources used by the cluster
doctl kubernetes cluster list-associated-resources <cluster-id>
Impara l'hacking di AWS da zero a eroe con htARTE (HackTricks AWS Red Team Expert)!

Altri modi per supportare HackTricks:

Last updated