Runner

Recon

nmap_scan.log|nmap_scan.log_h-50%

HTTP (80)

Port 80 seems to be server hosting services:Pasted_image_20240527180642.png

Directory/subdomain enumeration came empty handed. The common CI/CD pipeline software we have seen if TeamCity which isn't included in wordlists so I tried it manually:

TeamCity

Pasted_image_20240527181655.png We need credentials for login...

Under login we see version number and quick google leads us to CVE: https://github.com/Zyad-Elsayed/CVE-2023-42793

Pasted_image_20240527182126.png There are no Agents that can do pipelines for us so there's no point in creating project and trying to setup pipeline for RCE.

Let's get backup for config files or interesting files:Pasted_image_20240527182642.png

Hashes found?Pasted_image_20240527183339.pngPasted_image_20240527183725.png

Looks like we also have id_rsa key:Pasted_image_20240527184407.png

SSH (22)

[[Labs/HackTheBox/Seasonal/Season 5/Runner/id_rsa|id_rsa]]

Verify owner:

No password.. hmm... It's still a good idea to know it.

User.txt

Privilege Escalation

We only managed to get mattew's password, but where can we use it? su doesn't work.

We have few applications running, we know 8111 is TeamCity, but what are others?

Portainer is running on 9000 and 9433 is probably HTTPs version of it. 5005 seems unresponsive to http and netcat shows nothing.Pasted_image_20240527185534.png

It seems we have a build version and probably only way to interact with it is to port forward it.

Pasted_image_20240527190118.png

Using credentials matthew:piper123 we are able to login.

-> Googling docker escape cve -> https://medium.com/@sk3pper/play-with-cve-2024-21626-2b4377e9577f -> https://github.com/NitroCao/CVE-2024-21626

Pasted_image_20240527190607.png

primary page:

Pasted_image_20240527190648.png

Available images:

Pasted_image_20240527190840.png

Create new container:Pasted_image_20240527191043.png

Pasted_image_20240527191119.png
Pasted_image_20240527191219.png

It kept complaining about /proc/self/fd/8 for about 300 millisecond and shut down right away.

It worked with /proc/self/fd/7, but after some time 8 also worked? I guess build step failed or something on previous:

Pasted_image_20240527193513.png

Writeup referenced:https://blog.taipanbyte.ru/hackthebox/Runner-HTB-Writeuparrow-up-right

Last updated