目录
简介
该靶机非常简单,也很有趣,比较贴近实际机器。通过信息收集发现5080端口的GitLab服务,注册账号并利用CVE-2018-19571,CVE-2018-19585获得git用户的shell,然后通过信息收集获得smtp密码,使用该密码获得docker容器root用户shell,最后利用高危启动项逃逸到宿主机器中,成功获得宿主机器root权限。
信息收集
使用nmap --min-rate 10000 -A -sC -p- 10.10.10.220扫描目标主机端口及服务发现开启22和5080端口,操作系统为Ubuntu,5080端口运行着HTTP服务,标题存在GitLab单词,且存在robots.txt文件,如图:
访问页面发现是GitLab,查看robots.txt文件内容如下:
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
#
# To ban all spiders from the entire site uncomment the next two lines:
# User-Agent: *
# Disallow: /
# Add a 1 second delay between successive requests to the same server, limits resources used by crawler
# Only some crawlers respect this setting, e.g. Googlebot does not
# Crawl-delay: 1