CVE-2020-15257-容器逃逸-containerd
容器逃逸漏洞
1.搭建漏洞环境(ubuntu)
apt-cache madison docker-ce
sudo apt-get install docker-ce=18.03.0~ce-0~ubuntu
sudo apt-get install runc
2.查看组件版本
2.1 docker版本


2.2 containerd版本

3.漏洞复现
3.1 正常创建容器
Options
Mean
-i
以交互模式运行容器,通常与 -t 同时使用;
-t
为容器重新分配一个伪输入终端,通常与 -i 同时使用;
-d
后台运行容器,并返回容器ID;
sudo docker run -itd ubuntu /bin/bash
sudo docker containerd ls

查看containerd-shim套接字
netstat -xl | grep shim

3.2 以host模式创建容器
宿主机:随便启动一个容器,让containerd-shim的unix socket暴露出来
docker run -d -it ubuntu /bin/bash
现在要启动一个容器,我们通过exp逃逸这个容器:
docker run --rm --net=host -it ubuntu /bin/bash
3.3 将编写好的exp传入容器内部:
docker cp exp ce23fae1a50f:/


3.4 执行exp反弹shell


成功获得shell
最后更新于