CARVIEW |
Select Language
HTTP/2 200
date: Sun, 24 Aug 2025 18:43:25 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"04326f6ec0ecd77a34c0ed173adb643a"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=rIGP2WJt7TjCEUNGPJEgperIklDSMYt8QJL6g%2B1pto9fU%2B4vsxSe7%2FRtmlG8ViRVgfe%2BBWeYB1luDf7yY7gzFIsuTXaJ9aipTqcgjlDisIuQLTF%2BWJ9k6xH2nIdEmjSCqDmi%2BwOQwHCN0rbFBH41CoLT%2FTVT766tNtGF%2Bn2fTM7AwONycEOnZgb5sLGnik5qJXjL23cMgROvVz3ba%2Fl%2BU4oT7Lx9HYsemMzxZamTr1lPWi0HK4tA%2BZwpvIXWnpVXOouWr5hK4Vgz2tx1GR%2BaLw%3D%3D--z7s2DjRNVUwy3hqq--aWVcr7wyWD9D7EqaxaPFWg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.648173787.1756061005; Path=/; Domain=github.com; Expires=Mon, 24 Aug 2026 18:43:25 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 24 Aug 2026 18:43:25 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: AEEC:1CAE2B:1154229:16A7099:68AB5D4D
Exploit: mount cgroup · cdk-team/CDK Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 582
Exploit: mount cgroup
cdxy edited this page Nov 24, 2020
·
1 revision
自动化逃逸与宿主机共享cgroup的容器。常用于逃逸特权容器。
该脚本将宿主机cgroup目录挂载到容器内,随后劫持宿主机cgroup的release_agent
文件,通过linux cgroup notify_on_release机制触发shellcode执行,完成逃逸。
Automated escape container which shares cgroup namespace with outside host, especially for escape privileged containers.
This exploit will first mount host cgroup dir into container, then overwrite host cgroup's release_agent
file to inject shellcode, finally trigger shell code execution with linux cgroup notify_on_release feature.
See Also:
- https://blog.trailofbits.com/2019/07/19/understanding-docker-container-escapes/
- https://twitter.com/_fel1x/status/1151487051986087936
./cdk run mount-cgroup "<shell-cmd>"
# after exploit, the target host will execute user-specified commands in <shell-cmd> arg.
测试案例
- 宿主机以特权模式启动容器,尝试在该容器内部通过本脚本逃逸。
docker run -v /root/cdk:/cdk --rm -it --privileged ubuntu bash
- 容器内部执行
./cdk run mount-cgroup "touch /tmp/exp-success"
- 宿主机中出现
/tmp/exp-success
文件,说明exp已经成功执行,攻击者可以在宿主机执行任意命令。
Testing Case
- run a privileged container in host
docker run -v /root/cdk:/cdk --rm -it --privileged ubuntu bash
, try to escape this container using CDK. - attach into the container and execute
./cdk run mount-cgroup "touch /tmp/exp-success"
- back to the host, check
/tmp/exp-success
file exists, which means our shell cmd was executed successfully. by modifying<shell-cmd>
arg you can exec any cmd you want in target host.
Clone this wiki locally
You can’t perform that action at this time.