Access the room: https://tryhackme.com/room/linuxcli-aoc2025-o1fpqkvxti
The unthinkable has happened — McSkidy has been kidnapped. Without her, Wareville’s defenses are faltering, and Christmas itself hangs by a thread. But panic won’t save the season. A long road lies ahead to uncover what truly happened. The TBFC (The Best Festival Company) team already brainstorms what to do next, and their first lead points to the tbfc-web01, a Linux server processing Christmas wishlists. Somewhere within its data may lie the truth: traces of McSkidy’s final actions, or perhaps the clues to King Malhare’s twisted vision for EASTMAS.
Learning Objectives
- Learn the basics of the Linux command-line interface (CLI)
- Explore its use for personal objectives and IT administration
- Apply your knowledge to unveil the Christmas mysteries
This room introduces fundamental Linux command-line interface (CLI) operations through a Christmas-themed investigation where McSkidy has been kidnapped. The challenge involves analyzing a compromised server (tbfc-web01) to uncover traces of an attack orchestrated by HopSec Island's King Malhare and Sir Carrotbane.
Initial Access
After starting the machine, I connected to the virtual environment and landed in McSkidy’s home directory at /home/mcskidy.
First Commands:
echo "Hello World!"
ls
cat README.txtThe README.txt revealed that McSkidy discovered an "Eggsploit" on their servers and planned to write a security guide while hiding it from plain view.
Task 1: Finding the Hidden Guide
Question: Which CLI command would you use to list a directory?
Answer:ls
Navigating to the Guides directory initially showed no files:
cd Guides
lsHowever, using the -a flag to show hidden files revealed the secret guide:
ls -la
cat .guide.txtQuestion: What flag did you see inside of McSkidy’s guide?
Answer: [Found in .guide.txt - specific flag value visible when examining the file]
The guide instructed checking /var/log/ and using grep to search inside logs for suspicious activity.

Task 2: Log Analysis
Question: Which command helped you filter the logs for failed logins?
Answer:grep
I navigated to the logs directory and searched for failed authentication attempts:
cd /var/log
grep "Failed password" auth.logThis revealed multiple failed login attempts on the “socmas” account originating from eggbox-196.hopsec locations.
Task 3: File Discovery
Using the find command to locate suspicious files with "egg" in their names:
find /home/socmas -name *egg*This discovered /home/socmas/2025/eggstrike.sh - a malicious shell script.
Task 4: Analyzing the Attack
Question: What flag did you see inside the Eggstrike script?
Answer: [Found ineggstrike.shheader]
Examining the eggstrike script revealed the attack methodology:
cd /home/socmas/2025
cat eggstrike.shThe script performed three malicious operations:
- Extracted unique wishlist items to
/tmp/dump.txtusing pipe operators (|) - Deleted the original
wishlist.txt - Replaced it with
eastmas.txtcontaining fake EASTMAS wishes
This demonstrated advanced CLI features including pipes (|), output redirection (>), and conditional execution (&&) .

Task 5: Privilege Escalation
Question: Which command would you run to switch to the root user?
Answer:sudo su
Escalating to root privileges:
sudo su
whoamiTask 6: Bash History Analysis
Question: Finally, what flag did Sir Carrotbane leave in the root bash history?
Answer: [Found in/root/.bash_history]
Examining the root user’s command history revealed exfiltration attempts:
cd /root
cat .bash_historyOR
historyThe history showed curl commands uploading stolen data to files.hopsec and sending encoded reports to red.hopsec.

Lab Answers
Which CLI command would you use to list a directory?
ls.
— — — — — — — — — — — — — — —
Which command helped you filter the logs for failed logins?
grep.
— — — — — — — — — — — — — — —
Which command would you run to switch to the root user?
sudo su.
— — — — — — — — — — — — — — —
Finally, what flag did Sir Carrotbane leave in the root bash history?
THM{until-we-meet-again}.
Key Takeaways
This lab effectively demonstrated essential Linux CLI skills including:
- Basic navigation (
cd,pwd,ls) - File manipulation (
cat,find) - Log analysis with
grep - Understanding hidden files (
.prefix) - Privilege escalation concepts
- Forensic investigation through bash history
The storytelling approach made learning command-line fundamentals engaging while building practical cybersecurity investigation skills.
Join Advent of Cyber 2025
TryHackMe | Advent of Cyber 2025: Free 24-Day Cyber Security Challenge
.png)