From f7b6e4a91403082d191f15ce3de2d1951e56dfa6 Mon Sep 17 00:00:00 2001 From: CPol Date: Thu, 29 Apr 2021 10:01:21 +0000 Subject: [PATCH] GitBook: [master] one page modified --- .../enumeration-from-a-pod.md | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/pentesting/pentesting-kubernetes/enumeration-from-a-pod.md b/pentesting/pentesting-kubernetes/enumeration-from-a-pod.md index c74e220b..75b19434 100644 --- a/pentesting/pentesting-kubernetes/enumeration-from-a-pod.md +++ b/pentesting/pentesting-kubernetes/enumeration-from-a-pod.md @@ -120,7 +120,7 @@ https://:/api/v1/namespaces/custnamespace/secrets/ {% tabs %} {% tab title="kubectl" %} ```bash -./kubectl auth can-i --list #Get privileges in current namespace +./kubectl auth can-i --list #Get privileges in general ./kubectl auth can-i --list -n custnamespace #Get privileves in custnamespace ``` {% endtab %} @@ -182,6 +182,27 @@ https://:/api/v1/namespaces/custnamespace/pods/ {% endtab %} {% endtabs %} +### Get services + +{% tabs %} +{% tab title="kubectl" %} +```text +./kubectl get services +./kubectl get services -n custnamespace +``` +{% endtab %} + +{% tab title="API" %} +```bash +curl -v -H "Authorization: Bearer " \ +https://:/api/v1/namespaces/default/services/ + +curl -v -H "Authorization: Bearer " \ +https://:/api/v1/namespaces/custnamespace/services/ +``` +{% endtab %} +{% endtabs %} + ### Get nodes {% tabs %}