Skip to content

Linux 101⚓︎

Difficulty:
Direct link: https://hhc23-wetty.holidayhackchallenge.com?challenge=linux101

Objective⚓︎

Request

Visit Ginger Breddie in Santa's Shack on Christmas Island to help him with some basic Linux tasks. It's in the southwest corner of Frosty's Beach.

Ginger Breddie

Hey, welcome to Santa's Surf Shack on tropical Christmas Island! I'm just hanging ten here, taking it easy while brushing up on my Linux skills. You ever tried getting into Linux? It's a super cool way to play around with computers. Can you believe ChatNPT suggested this trip to the Geese Islands this year? I'm so thrilled! Kudos to ChatNPT, eh? The sunshine, the waves, and my surfboard – simply loving it! So, what do you have planned? Care to join me in a Linux session?

Solution⚓︎

Clicking on the "Linux 101" terminal besides Ginger Breddie opens a terminal window. The top part shows instructions, while the middle part is a normal shell prompt. At the bottom, a growing bar of presents show our progress.

We'll show the instructions, our commands and their output (if any) in this table:

Instruction Command(s) Output
The North Pole 🎁 Present Maker:All the presents on this system have been stolen by trolls. Capture trolls by following instructions here and 🎁's will appear in the green bar below. Run the command "hintme" to receive a hint. yes
Perform a directory listing of your home directory to find a troll and retrieve a present! ls HELP troll_19315479765589239 workshop
Now find the troll inside the troll. cat troll_19315479765589239 troll_24187022596776786
Great, now remove the troll in your home directory. rm troll_19315479765589239
Print the present working directory using a command. pwd /home/elf
Good job but it looks like another troll hid itself in your home directory. Find the hidden troll! ls -a . .. .bash_history .bash_logout .bashrc .profile .troll_5074624024543078 HELP workshop
Excellent, now find the troll in your command history. history | grep troll 1 echo troll_9394554126440791
3 cat troll_19315479765589239
4 rm troll_19315479765589239
7 history
Find the troll in your environment variables. env | grep troll z_TROLL=troll_20249649541603754
Next, head into the workshop. cd workshop/ elf@3f417fd4a689:~/workshop$
A troll is hiding in one of the workshop toolboxes. Use "grep" while ignoring case to find which toolbox the troll is in. grep -i troll * grep: electrical: Is a directory
toolbox_191.txt:tRoLl.4056180441832623
A troll is blocking the present_engine from starting. Run the present_engine binary to retrieve this troll. ls -l present_engine
chmod u+x present_engine
./present_engine
r--r--r-- 1 elf elf 4990336 Dec 2 22:19 present_engine

troll.898906189498077
Trolls have blown the fuses in /home/elf/workshop/electrical. cd into electrical and rename blown_fuse0 to fuse0. cd electrical/
mv blown_fuse0 fuse0
Now, make a symbolic link (symlink) named fuse1 that points to fuse0 ln -s fuse0 fuse1
Make a copy of fuse1 named fuse2. cp fuse1 fuse2
We need to make sure trolls don't come back. Add the characters "TROLL_REPELLENT" into the file fuse2. echo TROLL_REPELLENT >> fuse2
Find the troll somewhere in /opt/troll_den. find /opt/troll_den -iname \*troll\* /opt/troll_den
/opt/troll_den/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ParserController.java
/opt/troll_den/apps/showcase/src/main/resources/tRoLl.6253159819943018
/opt/troll_den/apps/rest-showcase/src/main/java/org/demo/rest/example/IndexController.java
/opt/troll_den/apps/rest-showcase/src/main/java/org/demo/rest/example/OrdersController.java
Find the file somewhere in /opt/troll_den that is owned by the user troll. find /opt/troll_den -user troll /opt/troll_den/apps/showcase/src/main/resources/template/ajaxErrorContainers/tr0LL_9528909612014411
Find the file created by trolls that is greater than 108 kilobytes and less than 110 kilobytes located somewhere in /opt/troll_den. find /opt/troll_den -size +108k -size -110k /opt/troll_den/plugins/portlet-mocks/src/test/java/org/apache/t_r_o_l_l_2579728047101724
List running processes to find another troll. ps -ef UID PID PPID C STIME TTY TIME CMD
init 1 0 0 14:24 pts/0 00:00:00 /usr/bin/python3 /usr/local/bin/tmuxp load ./mysession.yaml
elf 4602 4599 1 14:31 pts/2 00:00:00 /usr/bin/python3 /14516_troll
elf 4770 214 0 14:32 pts/3 00:00:00 ps -ef
The 14516_troll process is listening on a TCP port. Use a command to have the only listening port display to the screen. netstat -nat | grep LISTEN tcp 0 0 0.0.0.0:54321 0.0.0.0:* LISTEN
The service listening on port 54321 is an HTTP server. Interact with this server to retrieve the last troll. curl http://127.0.0.1:54321 troll.73180338045875
Your final task is to stop the 14516_troll process to collect the remaining presents. ps -ef | grep troll

kill 4602
elf 4602 4599 0 14:31 pts/2 00:00:00 /usr/bin/python3 /14516_troll
elf 5993 214 0 14:34 pts/3 00:00:00 grep --color=auto troll
Congratulations, you caught all the trolls and retrieved all the presents!

Images⚓︎

Scenery

Santa's Surf Shack and the "Linux 101" terminal

Terminal

The initial terminal screen

Answer

After solving the challenge, the fact will be listed as an "Achievements" in the player's badge.

Response⚓︎

Ginger Breddie

Wow, if your surfing skills are as good as your Linux skills, you could be winning competitions!