Cronos
https://app.hackthebox.com/machines/11
Last updated
https://app.hackthebox.com/machines/11
Last updated
Note: Add 10.10.10.13 cronos.htb
to /etc/hosts
. Also add 10.10.10.13 as an additional DNS server on the attacking system.
To start we perform some basic enumeration on DNS
against the target system. Using dnsenum we are able to enumerate the admin.cronos.htb
sub domain which will be added to our hosts file.
Checkout out the root page for http://cronos.htb
we are taken to /index.php
. I was unable to pull any further interesting pages or directories from this website.
Feroxbuster
turning up very few results...
We know that the sub domain admin.cronos.htb exists and browse to it. We are presented with a logon page. Running ZAProxy in the background we are able to identify a SQL
injection point on the login page as shown below.
Details regarding the SQL
injection point.
Using SQLmap
we are able to pull relevant information.
After running the above command SQLmap
identifies the database "admin". Using the command below we are able to dump discovered information from the "users" table.
I was unable to crack the hash using the rockyou.txt wordlist. However, searhing online we find a clear text password for the related MD5 hash.
Using the credentials on the login page we are then presented with Net Tool v0.1
.
Performing a ping
request and capturing the POST request in ZAProxy
we see where the command parameter is set.
A quick check with cat
on /etc/passwd
shows we are able to alter what command the target system executes.
Contents of /etc/passwd
.
From here we will build a Python reverse shell and run it in ZAProxy to obtain a reverse shell.
Which soon connects to our listener.
We can then grab the user flag from /home/noulis/user.txt
.
Running linpeas.sh
for enumeration we identify the cron job against Laravel artisan running every minute as the root user.
Browsing to /var/www/laravel
we see we have full permissions as www-data over the artisan file.
Given the full permissions we can create a PHP
reverse shell on our attacking system. Name it artisan and transfer over to the target system. RevShells was utilized to create the PHP monkey reverse shell.
RevShells: https://www.revshells.com/
Remove the current artisan file and upload the reverse shell file.
After the file has been uploaded. Start a netcat
listener and wait a minute or two for it to trigger a reverse shell.