Skip to content

Commit 7607960

Browse files
authored
Update attacking-kubernetes-from-inside-a-pod.md
1 parent 7f2f8a9 commit 7607960

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/pentesting-cloud/kubernetes-security/attacking-kubernetes-from-inside-a-pod.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ Notes and troubleshooting:
7272
- If you cannot get a host execution path, similar writable mounts can be abused to write other persistence/priv-esc artifacts on the host if the mapped directory is security-critical (e.g., add a root SSH key if the mount maps into /root/.ssh, drop a cron/systemd unit if maps into /etc, replace a root-owned binary in PATH that the host will execute, etc.). Feasibility depends entirely on what path is mounted.
7373
- This technique also works with plain Docker bind mounts; in Kubernetes it’s typically a hostPath volume (readOnly: false) or an incorrectly scoped subPath.
7474

75-
Mitigations:
76-
- Avoid hostPath where possible; prefer dedicated volumes.
77-
- If hostPath is required, enforce readOnly: true and use restrictive mount options (nosuid,noexec,nodev). Apply Pod Security Standards/Admission to forbid hostPath by default.
78-
- Run containers as non-root and drop capabilities; use SELinux/AppArmor and readOnlyRootFilesystem when possible.
79-
- Monitor for unexpected SUID files on host and integrity changes under directories exposed to containers.
80-
8175
### Abusing Kubernetes Privileges
8276

8377
As explained in the section about **kubernetes enumeration**:

0 commit comments

Comments
 (0)