文章预览
0x01 容器逃逸介绍 在开始之前对于容器逃逸主要有以下三种方法: 1.不安全的配置 2.相关程序漏洞 3.内核漏洞 0x02 docker信息收集判断 判断成功率并不是100% 2.1 判断是否为容器环境 root权限情况下使用下面的命令去判断 cat /proc/1/cgroup | grep -qi docker & & echo "Is Docker" || echo "Not Docker" 2.2 判断特权模式 cat /proc/self/status | grep -qi "0000003fffffffff" & & echo "Is privileged mode" || echo "Not privileged mode" 2.3 挂载 Docker Socke ls /var/run/ | grep -qi docker.sock & & echo "Docker Socket is mounted." || echo "Docker Socket is not mounted." 2.4 挂载 procfs find / -name core_pattern 2>/dev/null | wc -l | grep -q 2 & & echo "Procfs is mounted." || echo "Procfs is not mounted." 2.5 挂载宿主机根目录 find / -name passwd 2>/dev/null | grep /etc/passwd | wc -l | grep -q 7 & & echo "Root directory is
………………………………