Jupiter

Recon

chevron-rightnmap_scan.loghashtag
Open 10.129.229.15:22
Open 10.129.229.15:80
[~] Starting Script(s)
[>] Running script "nmap -vvv -p {{port}} {{ip}} -vvv -sV -sC -Pn" on ip 10.129.229.15

PORT   STATE SERVICE REASON  VERSION
22/tcp open  ssh     syn-ack OpenSSH 8.9p1 Ubuntu 3ubuntu0.1 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 ac:5b:be:79:2d:c9:7a:00:ed:9a:e6:2b:2d:0e:9b:32 (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEJSyKmXs5CCnonRCBuHkCBcdQ54oZCUcnlsey3u2/vMXACoH79dGbOmIHBTG7/GmSI/j031yFmdOL+652mKGUI=
|   256 60:01:d7:db:92:7b:13:f0:ba:20:c6:c9:00:a7:1b:41 (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHhClp0ailXIfO0/6yw9M1pRcZ0ZeOmPx22sO476W4lQ
80/tcp open  http    syn-ack nginx 1.18.0 (Ubuntu)
|_http-server-header: nginx/1.18.0 (Ubuntu)
| http-methods: 
|_  Supported Methods: GET HEAD POST OPTIONS
|_http-title: Did not follow redirect to http://jupiter.htb/
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

HTTP (80)

Writeup.png

Do subdomain enumeration, because most probably there's nothing on this domain.

Grafana

kiosk subdomain is serving Grafana.

Writeup-1.png

Grafana is usually running internally and by default it's making queries to display data, we can take advantage of that.

Writeup-2.png

https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/SQL%20Injection/PostgreSQL%20Injection.md#postgresql-command-executionarrow-up-right

SSH (22)

Because the postgres service user has bash as the shell we can drop ssh keys and upgrade session.

Privilege Escalation (juno)

3000 is Grafana and 8888 seems to be Jupyter Notebooks server.

Writeup-3.png

/dev/shm is usually empty, but linpeas showed that it's not

While browsing the files in that directory nothing was found, but sometimes the files got deleted. If we observe this we can can see it being updated every 2minutes.

network-simulation.yml should be the config for cronjob, we have write permissions so let's go privesc.

User.txt

Privilege Escalation (Jovian)

juno has access to /opt/* directory.

Get the latest token from Logs.

Writeup-4.png

Escalate privileges

Writeup-5.png

I wasn't able to authenticate via this method, because created files also belonged to Juno user, just run these system calls in os.system and then try SSH.

Privilege Escalation (root)

I think the binary is Satellite Tracking with Linuxarrow-up-right this?

The binary is looking for configuration in the temporary directory.

It looks like we have arbitrary write permissions; tleroot is where files will be downloaded, tlesources is the urls to download files from.

Writeup-6.png

After some testing we are able to write directly to root, because of sudo. One thing to keep in mid is that directory is created if doesn't exist, but tleroot must end with a slash!

Root.txt

Last updated