Ready, a Linux box created by user bertolis was a medium difficulty box. Initial foothold was finding a Gitlab instance which was running an old version 11.4.7 which had SSRF and CRLF issue and combining them and redis along with Gitlab workers we can get a RCE. After we get a shell we find a backup in /opt which contain a gitlab.rb file checking that file without comments we find a SMTP password. Trying to see if it was used somewhere else we can escalate to root. But as we are still in docker container of gitlab we had to escape the container. in the same backup folder we find a docker-compose file which contain that the container is running with privileged flag Googling around we find a way to escape the container
Initial Enumeration
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# Nmap 7.80 scan initiated Mon Dec 14 11:33:03 2020 as: nmap -Pn -sC -sV -oN nmap/ready 10.10.10.220 Nmap scan report for 10.10.10.220 Host is up (0.077s latency). Not shown: 998 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4 (Ubuntu Linux; protocol 2.0) 5080/tcp open http nginx | http-robots.txt: 53 disallowed entries (15 shown) | / /autocomplete/users /search /api /admin /profile | /dashboard /projects/new /groups/new /groups/*/edit /users /help |_/s/ /snippets/new /snippets/*/edit | http-title: Sign in \xC2\xB7 GitLab |_Requested resource was http://10.10.10.220:5080/users/sign_in |_http-trane-info: Problem with XML parsing of /evox/about Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . # Nmap done at Mon Dec 14 11:33:19 2020 -- 1 IP address (1 host up) scanned in 16.41 seconds
Gitlab (5080)
Opening 5080 we find a gitlab running
seeing a Register, I register and logged myself in
also checking the version by visiting /help we saw it is GitLab Community Edition 11.4.7
Seeing the Version I remember LiveOverflow video about the same version of Gitlab