Skip to content

Commit

Permalink
Merge pull request #161 from aaaart3m/scenario-4-fix
Browse files Browse the repository at this point in the history
fix crictl command and path to config
  • Loading branch information
madhuakula authored Sep 5, 2024
2 parents a20c879 + 8ae59f9 commit e28d132
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Binary file modified guide/docs/scenarios/images/sc-4-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions guide/docs/scenarios/scenario-4/scenario-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ chroot /host-system bash
- As you can see, now you can access all the host system resources like docker containers, configurations, etc.

```bash
docker ps
crictl pods
```

![Scenario 4 chroot host](../images/sc-4-3.png)

- The Kubernetes node configuration can be found at the default path, which is used by the node level kubelet to talk to the Kubernetes API Server. If you can use this configuration, you gain the same privileges as the Kubernetes node.

```bash
cat /var/lib/kubelet/kubeconfig
cat /etc/kubernetes/admin.conf
```

![Scenario 4 kubelet config](../images/sc-4-4.png)
Expand All @@ -111,7 +111,7 @@ You can use the available `kubectl` command-line utility to explore other resour
- Using the kubelet configuration to list the Kubernetes cluster-wide resources

```bash
kubectl --kubeconfig /var/lib/kubelet/kubeconfig get all -n kube-system
kubectl --kubeconfig /etc/kubernetes/admin.conf get all -n kube-system
```

![Scenario 4 get kube-system](../images/sc-4-5.png)
Expand All @@ -120,11 +120,11 @@ kubectl --kubeconfig /var/lib/kubelet/kubeconfig get all -n kube-system

From here you can go beyond by performing the lateral moment and a post-exploitation based on the available setup, configuration, and resources
:::

e
- You are able to obtain the available nodes in the Kubernetes cluster by running the following command:

```bash
kubectl --kubeconfig /var/lib/kubelet/kubeconfig get nodes
kubectl --kubeconfig /etc/kubernetes/admin.conf get nodes
```

- Hooray 🥳 , now you can see that it returns the cluster nodes available as we have the privilege/permissions with obtained configuration to query the Kubernetes API server
Expand Down

0 comments on commit e28d132

Please sign in to comment.