Agile

Recon

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

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 f4:bc:ee:21:d7:1f:1a:a2:65:72:21:2d:5b:a6:f7:00 (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCeVL2Hl8/LXWurlu46JyqOyvUHtAwTrz1EYdY5dXVi9BfpPwsPTf+zzflV+CGdflQRNFKPDS8RJuiXQa40xs9o=
|   256 65:c1:48:0d:88:cb:b9:75:a0:2c:a5:e6:37:7e:51:06 (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEcaZPDjlx21ppN0y2dNT1Jb8aPZwfvugIeN6wdUH1cK
80/tcp open  http    syn-ack nginx 1.18.0 (Ubuntu)
| http-methods: 
|_  Supported Methods: GET HEAD POST OPTIONS
|_http-title: Did not follow redirect to http://superpass.htb
|_http-server-header: nginx/1.18.0 (Ubuntu)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

HTTP (80)

Writeup.png

During registration I used username as password and app crashed... But looks like Flask Debug is on.

Writeup-1.png

Once we are logged in we can add credentials and export them

Writeup-2.png

But you need to click Save Icon to actually save the record, otherwise it's gone and Export will complain.

After that it's making request to download, which could be vulnerable to LFI

Writeup-3.png

LFI

LFI confirmed

Writeup-4.png

When file is not found app crashes and debug mode shows full path for application

Nothing we can further exploit so let's move on to Flask Debug and leak Pin

There's no /console because in app.wsgi_app = DebuggedApplication(app.wsgi_app, True) evalex=True is not specified.

https://book.hacktricks.xyz/network-services-pentesting/pentesting-web/werkzeugarrow-up-right

Writeup-5.png

SSH (22)

The passwords database contains passwords in plaintext

User.txt

Privilege Escalation

There's second application running on 5555 as runner, but it's test version of superpass.

Port forward

There's interactive test running by Selenium using Google Chrome

https://exploit-notes.hdks.org/exploit/linux/privilege-escalation/chrome-remote-debugger-pentesting/arrow-up-right

Writeup-6.png
Writeup-7.png
Site
Username
Password

agile

edwards

d07867c6267dcb5df0af

twitter

dedwards__

7dbfe676b6b564ce5718

SSH (edwards)

Privilege Escalation

sudo 1.8.0 to 1.9.12p1 - Privilege Escalationarrow-up-right

Doesn't work. Let's find what dev_admin can access

Let's edit the activate script

Last updated