Forgot

Recon

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

PORT   STATE SERVICE REASON  VERSION
22/tcp open  ssh     syn-ack OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   3072 48:ad:d5:b8:3a:9f:bc:be:f7:e8:20:1e:f6:bf:de:ae (RSA)
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC82vTuN1hMqiqUfN+Lwih4g8rSJjaMjDQdhfdT8vEQ67urtQIyPszlNtkCDn6MNcBfibD/7Zz4r8lr1iNe/Afk6LJqTt3OWewzS2a1TpCrEbvoileYAl/Feya5PfbZ8mv77+MWEA+kT0pAw1xW9bpkhYCGkJQm9OYdcsEEg1i+kQ/ng3+GaFrGJjxqYaW1LXyXN1f7j9xG2f27rKEZoRO/9HOH9Y+5ru184QQXjW/ir+lEJ7xTwQA5U1GOW1m/AgpHIfI5j9aDfT/r4QMe+au+2yPotnOGBBJBz3ef+fQzj/Cq7OGRR96ZBfJ3i00B/Waw/RI19qd7+ybNXF/gBzptEYXujySQZSu92Dwi23itxJBolE6hpQ2uYVA8VBlF0KXESt3ZJVWSAsU3oguNCXtY7krjqPe6BZRy+lrbeska1bIGPZrqLEgptpKhz14UaOcH9/vpMYFdSKr24aMXvZBDK1GJg50yihZx8I9I367z0my8E89+TnjGFY2QTzxmbmU=
|   256 b7:89:6c:0b:20:ed:49:b2:c1:86:7c:29:92:74:1c:1f (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH2y17GUe6keBxOcBGNkWsliFwTRwUtQB3NXEhTAFLziGDfCgBV7B9Hp6GQMPGQXqMk7nnveA8vUz0D7ug5n04A=
|   256 18:cd:9d:08:a6:21:a8:b8:b6:f7:9f:8d:40:51:54:fb (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKfXa+OM5/utlol5mJajysEsV4zb/L0BJ1lKxMPadPvR
80/tcp open  http    syn-ack Werkzeug httpd 2.1.2 (Python 3.8.10)
| http-methods: 
|_  Supported Methods: GET OPTIONS HEAD
|_http-title: Login
|_http-server-header: Werkzeug/2.1.2 Python/3.8.10
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

HTTP (80)

Writeup.png

There's a comment about fix by robert-dev-142522

Writeup-1.png

The link is sent to user's inbox, but there's no way for us to attack or hijack emails as the ports are closed. What we could try is to hijack the urls, IFF someone clicks the link which we ~poison then we can get a callback.

It's possible to inject Host header with new field

Reset the password

Creds: robert-dev-142522:Password123$

Writeup-2.png

Potential usernames: Luis, Mark, Mario, Diego

The escalated tickets page is disabled, but from frontend. It leads to /admin_tickets, but no access because of permissions.

The site is using Varnish, which is not exploitable, but it can be influenced to act beneficial to us.

It's basically caching the pages so pages are served faster and less resources are wasted, but since it's cached by (mostly) path it will show whatever the first user see or does. If admin visits the /admin_tickets and then we visit it, we will get cached page and not permission denied. Problem here is that these pages are not cached indicated by Age: 0, but javascript (/static) files are cached.

Odd thing is that /tickets/ANYTHING is rendering /tickets (???)

Looks like as long as static is in path it's being cached by Varnish and the weird functionality of showing any routes is beneficial to see Escalated Tickets.

Escalate the ticket with URL like: http://10.129.71.223/admin_tickets/static/letmeinarrow-up-right

Writeup-3.png

Wait few seconds for bot to visit the URL, if we visit it first it will get cached by us and we don't want that.

After like 20-30 seconds~

Writeup-4.png

Creds: diego:dCb#1!x0%gjq

SSH (22)

User.txt

Privilege Escalation

Bot code is present in home directory

Database is empty, nothing new

Check sudo

Check permissions in script directory

preprocess_input_exprs_arg_string(data[i],safe=False) seems dangerous -> Code injection in saved_model_cliarrow-up-right

Writeup-5.png

Root.txt

Last updated