Cyborg
Room Details
TryHackMe Cyborg room contains:
Service Discovery
Web Content Discovery
Hash Cracking
Data Decompression
Privilege Escalation
Target
IP: 10.10.230.194
Service Discovery
Scan for open ports with nmap
Services Discovered
ServicePortVersionHTTP
80
Apache 2.4.18
SSH
22
OpenSSH 7.2p2
OS:
Ubuntu
from service descriptionAnswer Task 2 first three questions
Web Content Discovery
Scan for directories using
gobuster
Directories Discovered
/admin
homepage
from archive dropdown found archive.tar file
/etc
squid proxy
squid password and configuration files
Analyzing Directories
From
/etc
found/etc/squid/passwd
which contains password hash and squid config file/etc/squid/squid.conf
Cracking Password Hash
Store hash into a file
passwd_hash.txt
Crack the hash using hashcat
squidward (music_archive)
We've successfully found the password from the hash
Analyzing Tar file
extract tar file
Found readme file which leads us to the borg documentation page
We need to install borg to extract the files from the compressed format
decompress extracted files from
archive.tar
using borgAfter files are decompressed successfully, it data turns out to the home directory backup for alex's account
Found Password from
/home/alex/Documents/note.txt
Login with ssh
Login using alex's
We got access to Alex Account
Get User Flag
Privilege Escalation
Check for sudo exectuables
We can run file
/etc/mp3backups/backup.sh
as with root privilegesCheck whether file is writable
We cannot write file, but user is alex, so we can change file permissions using chmod
Allow all permissions to the files
Note: Allowing all users rwx permissions isn't a good practice, but for ease, I've provided them rights
Overwrite file with Bash Reverse Shell on alex's machine
Reverse shell will connect to attacker's machine on port 4444
Start netcat on attacker's machine
Execute bash script from target machine
Now, we've successfully rooted the machine
Get Root Flag
Last updated