{"id":13782666,"url":"https://github.com/teamssix/container-escape-check","last_synced_at":"2025-04-05T10:08:47.680Z","repository":{"id":37724151,"uuid":"470956588","full_name":"teamssix/container-escape-check","owner":"teamssix","description":"docker container escape check || Docker 容器逃逸检测","archived":false,"fork":false,"pushed_at":"2022-04-19T07:50:10.000Z","size":1662,"stargazers_count":583,"open_issues_count":1,"forks_count":71,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-29T09:09:41.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teamssix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-17T11:00:37.000Z","updated_at":"2025-03-15T07:17:18.000Z","dependencies_parsed_at":"2022-07-08T04:47:53.062Z","dependency_job_id":null,"html_url":"https://github.com/teamssix/container-escape-check","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamssix%2Fcontainer-escape-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamssix%2Fcontainer-escape-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamssix%2Fcontainer-escape-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamssix%2Fcontainer-escape-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teamssix","download_url":"https://codeload.github.com/teamssix/container-escape-check/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318744,"owners_count":20919484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:01:41.124Z","updated_at":"2025-04-05T10:08:47.664Z","avatar_url":"https://github.com/teamssix.png","language":"Shell","funding_links":[],"categories":["其他_安全与渗透","红队\u0026渗透测试","Shell","0x02 工具 :hammer_and_wrench:"],"sub_categories":["网络服务_其他","2 云原生工具"],"readme":"# Container Escape Check 容器逃逸检测\n\n[![GitHub stars](https://img.shields.io/github/stars/teamssix/container-escape-check)](https://github.com/teamssix/container-escape-check) [![GitHub issues](https://img.shields.io/github/issues/teamssix/container-escape-check)](https://github.com/teamssix/container-escape-check/issues) [![GitHub release](https://img.shields.io/github/release/teamssix/container-escape-check)](https://github.com/teamssix/container-escape-check/releases)  [![img](https://img.shields.io/badge/author-TeamsSix-blueviolet)](https://github.com/teamssix) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/teamssix.svg?style=social\u0026label=Follow%20the%20author)](https://twitter.com/teamssix)\n\n![container-escape-check](https://socialify.git.ci/teamssix/container-escape-check/image?description=1\u0026font=Inter\u0026forks=1\u0026issues=1\u0026language=1\u0026logo=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F49087564\u0026owner=1\u0026pattern=Circuit%20Board\u0026pulls=1\u0026stargazers=1\u0026theme=Dark)\n\n[中文](https://github.com/teamssix/container-escape-check/blob/master/README_ZH.md) | EN\n\n# Introduce\n\nThis script is used to detect Docker container escape methods, The following methods are currently supported:\n\n1. Privileged Mode\n2. Mount docker Socket\n3. Mount host procfs\n4. Mount host root or etc directory\n5. Open Docker Remote API\n6. CVE-2016-5195 DirtyCow\n7. CVE-2020-14386 \n8. CVE-2022-0847 DirtyPipe\n8. CVE-2017-1000112\n8. CVE-2021-22555\n8. Mount Host Var Log\n8. CAP_DAC_READ_SEARCH (Requires container to support capsh command)\n8. CAP_SYS_ADMIN (Requires container to support capsh command)\n8. CAP_SYS_PTRACE (Requires container to support capsh command)\n8. CVE-2022-0492\n\n# ✨ Usage\n\nRun this script with one command in the container.\n\n```\nwget https://raw.githubusercontent.com/teamssix/container-escape-check/main/container-escape-check.sh -O- | bash\n```\n\nOr clone the project to run in the container.\n\n```\ngit clone https://github.com/teamssix/container-escape-check.git\ncd container-escape-check\nchmod +x container-escape-check.sh\n./container-escape-check.sh\n```\n\n![](./img.png)\n\nIf it feels good, remember to give the project a little star ✨\n\n# ⚠️ Notes\n\n* This script needs to be run inside the docker container.\n* Most of the detection methods here are based on my experience, and there may be false positives or omissions. If you find these problems, please submit an Issue.\n* Some escape methods need to be judged according to the Docker version. I haven't thought of a way to get the Docker version from inside the container, so the script does not support the detection of this method yet.\n\n# Changelog\n\n## v0.3 2022.4.7\n\n* Add CVE-2022-0492\n* If the capsh command does not exist, it will be installed automatically\n* Enhanced privileged mode detection\n* Enhanced /var/log detection\n\n## v0.2 2022.3.30\n\n* Add CVE-2017-1000112\n* Add CVE-2021-22555\n* Add Mount Host Var Log\n* Add CAP_DAC_READ_SEARCH\n* Add CAP_SYS_ADMIN\n* Add CAP_SYS_PTRACE\n\n## v0.1 2022.3.18\n\n* Add Privileged Mode\n* Add Mount docker Socket\n* Add Mount host procfs\n* Add Mount host root or etc directory\n* Add Open Docker Remote API\n* Add CVE-2016-5195 DirtyCow\n* Add CVE-2020-14386 \n* Add CVE-2022-0847 DirtyPipe\n\n![img](https://cdn.jsdelivr.net/gh/teamssix/BlogImages/imgs/TeamsSix_Subscription_Logo2.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamssix%2Fcontainer-escape-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteamssix%2Fcontainer-escape-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamssix%2Fcontainer-escape-check/lists"}