Codify¶
Linux machine
Foothold¶
Do not forget to update the /etc/hosts file.
Nmap port scan¶
Website enumeration and exploit¶
First, we go to about page, where we find the tool and version used.
We find the vs2 version vulnerable (exploit).
Get the python reverse shells.
Update the tcp_backconnect.py file with the desired port and address. Convert it into base64:
Run the reverse shell on the target:
User¶
First, check the current user whoami. Enumerate /var/www/.
An interesting file is /var/www/contact/tickets.db which is a SQLite DB. Open it using sqlite3:
Get hashed credentials from DB:
Findins
The has is encrypted using bcrypt.
Crack the hash¶
Create hash.txt from the findings:
Use the /usr/share/wordlists/rockyou.txt.gz wordlist (gzip -d rockyou.txt.gz).
Crack the hash:
Log in as the found credentials (joshua:spongebob1) using SSH.
Root¶
Check for sudo privileges:
Check the script with sudo privileges:
There is an error in the script. Since the $USER_PASS is not in defined as string it allows regex matching (*), which we can use to start guessing the password letters one by one.