HTB - Runner

Enumeration
Scope
Ip Address 10.10.11.13
Nmap Scan
CVE-2023-42793:
Initial Access

To get RCE, I had to generate a token from the webapp to be able to use it in the exploit.
Token
Get RCE
I tried to search for files containing passwords, sensitive info or private keys and found one.
/data/teamcity_server/datadir/config/projects/AllProjects/pluginData/ssh_keys/id_rsa
I'll Try to login to ssh with the one of the existing users and the private key

Success :)

User flag: 5b86f3875c0f223145xxxxxxxxxxxxxxxxxx
Privilege Escalation
I'll try to map internal ports with ssh local port forwarding
We got a web app
http://localhost:9000

I knew I missed something so I returned to web app and found that I forgot to make a backup files and see what its content.

Login in http://localhost:9000 with these credentials


This article is very useful to understand the setup of container but was based on older verions of portainer:
Following the post:
Get the image id

Try to map host file system to the container with the following settings

Create a container with the settings below

Finally, Access the console and get root access :)

Root flag: e5072defc9d08b4320325b1e16a6b83f
Last updated