Devvortex

https://app.hackthebox.com/machines/Devvortex

Port scan


PORT   STATE SERVICE REASON
22/tcp open  ssh     syn-ack
| 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
|_http-title: DevVortex
| http-methods:
|_  Supported Methods: GET HEAD

Subdomain scan

  • Let's add this to our /etc/hosts file

Directory scan (on subdomain)

Web Exploitation (www-data)

  • if you visit http://dev.devvortex.htb/administrator/ you'll find joomla CMS running. image

  • I found this beautiful exploit that does our work.

  • https://github.com/AlissoftCodes/CVE-2023-23752

Creds

  • Running that script will get us creds, we can now login in to the app

  • After login under system you edit a template to get revshell

  • http://dev.devvortex.htb/administrator/index.php?option=com_templates&view=templates&client_id=0

  • Since it's a .php file we can use pentestmonkey php revshell

  • I edited error.php with the revshell & got the www-data

  • https://github.com/pentestmonkey/php-reverse-shell/blob/master/php-reverse-shell.php

image

User shell

  • I searched almost every file for user shell, none were good enough.

  • Mysql login with the creds we found earlier worked

  • Lets use joomla one

  • Voila we got logan's hash

  • Let's crack it with John

  • DONEEEEEEE, now ssh & grab the user.txt

Root Shell

  • sudo -l

  • Hmmm, after googling, I found this

  • https://github.com/canonical/apport/commit/e5f78cc89f1f5888b6a56b785dddcb0364c48ecb

  • https://bugs.launchpad.net/ubuntu/+source/apport/+bug/2016023

  • Lets create our own file, generate report for it & grab the root shell :)

Exploitation

  • pwned ^^ _____________________heapbytes's still pwning

Last updated