Busqueda

Recon

nmap_scan.log

HTTP (80)

The application allows us to search (?)

Writeup.png

Main endpoint is /search, if we include " there's output, but ' doesn't return anything.

Writeup-1.png

RCE

Exploit-for-Searchor-2.4.0-Arbitrary-CMD-Injectionarrow-up-right

Writeup-2.png

Reverse Shell

User.txt

Privilege Escalation

Upgrade shell to SSH:

Gitea is running locally on port 3000

Enumerate with linpeas

Check opt. No read permissions, only execute.

If we go back to the app we can retrieve git credentials and find cody's password.

Port forward Gitea

Writeup-3.png

Nothing there, but this password belongs to svc Linux user:

https://docs.docker.com/reference/cli/docker/inspect/arrow-up-right

When we use container ID it shows more information (???)

We can now login as administrator on Gitea

Creds: administrator:yuiu1hoiu4i5ho1uh

Writeup-4.png

http://localhost:3000/administrator/scripts/src/branch/main/system-checkup.pyarrow-up-right

The full-checkup option seems to be running script from local directory and not /opt/scripts and we can take advantage of that.

Writeup-5.png

Root.txt

Last updated