Information
Box
Write-up
Overview
Install tools used in this WU on BlackArch Linux:
Network enumeration
Port and service scan with nmap:
Web discovery
We have a Gitlab server at http://10.10.10.220:5080
We can register and once authenticated at http://10.10.10.220:5080/help
we can find the version is 11.4.7.
searchsploit gitlab 11.4.7
shows us 3 RCE.
Exploring for public projects at http://10.10.10.220:5080/explore/projects
we can see dude/ready-channel
.
Web exploitation
All the exploits are dirty and broken so I picked the first and had to modify it:
diff /usr/share/exploitdb/exploits/ruby/webapps/49334.py 49334.py
Then we can launch the exploit.
We receive the reverse shell on our listener:
Let's find the flag:
Elevation of Privilege (EoP): from git to root
We are in a docker container:
There is the password of root (container).
In /var/backup
there is a docker-compose.yml
explaining the origin of
root_pass
.
There is a password in gitlab config:
Then we can try password reuse on the root account.
Now we have to escape from the container.
I used the second PoC from HackTricks - Docker breakout
And received the reverse shell: