Socket

Recon

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

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 4f:e3:a6:67:a2:27:f9:11:8d:c3:0e:d7:73:a0:2c:28 (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIzAFurw3qLK4OEzrjFarOhWslRrQ3K/MDVL2opfXQLI+zYXSwqofxsf8v2MEZuIGj6540YrzldnPf8CTFSW2rk=
|   256 81:6e:78:76:6b:8a:ea:7d:1b:ab:d4:36:b7:f8:ec:c4 (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPTtbUicaITwpKjAQWp8Dkq1glFodwroxhLwJo6hRBUK
80/tcp   open  http    syn-ack Apache httpd 2.4.52
| http-methods: 
|_  Supported Methods: GET HEAD POST OPTIONS
|_http-title: Did not follow redirect to http://qreader.htb/
|_http-server-header: Apache/2.4.52 (Ubuntu)
5789/tcp open  http    syn-ack websockets 10.4 (Python 3.10)
| http-methods: 
|_  Supported Methods: GET
|_http-title: Site doesn't have a title (text/plain).
|_http-server-header: Python/3.10 websockets/10.4
Service Info: Host: qreader.htb; OS: Linux; CPE: cpe:/o:linux:linux_kernel

HTTP (80)

Application allows encoding and decoding QR codes.

Writeup.png

We can also make report, but nothing on XSS.

Writeup-1.png

We can also download the application for Linux or Windows

Decoding test.png gives kavigihan:

Nothing much so let's jump in the program itself.

The application does version check and updates, so it must be making requests somewhere. There's host ws://ws.qreader.htb:5789 and /version, /update endpoints.

Writeup-2.png
Writeup-3.png

Note: DNS is resolved to localhost so WE can catch them and inspect them.

mitmproxy seemed like a valid choice, but it wasn't able to resend/edit WebSocket communication. Turns out Burpsuite supports this and even more!

Writeup-4.png

SQLi in WebSockets

Writeup-5.png

https://exploit-notes.hdks.org/exploit/web/websocket-pentesting/arrow-up-right

Writeup-6.png
Writeup-7.png

Creds: admin:denjanjade122566

No pages on main website and SSH doesn't work.

Pending status is to Thomas Keller, which should be local user.

SSH (22)

Creds: tkeller:denjanjade122566

User.txt

Privilege Escalation

Priv esc is related to pyinstaller, first to get idea what we are working with let's generate it:

The pyinstaller is basically running python script with build command in script.

Root.txt

Last updated