Skip to content

Linux 101⚓︎

Difficulty:
Direct link: Objective URL

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.

Solution⚓︎

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.

Q1. Perform a directory listing of your home directory to find a troll and retrieve a present!

ls

Q2. Now find the troll inside the troll.

cat troll_19315479765589239

troll_24187022596776786

Q3. Great, now remove the troll in your home directory.

rm troll_19315479765589239

Q4. Print the present working directory using a command.

pwd

/home/elf

Q5. Good job but it looks like another troll hid itself in your home directory. Find the hidden troll!

ls -la

.troll_5074624024543078

Q6. Excellent, now find the troll in your command history.

history

Q7. Find the troll in your environment variables.

env

z_TROLL=troll_20249649541603754

Q8. Next, head into the workshop.

cd workshop/

Q9. 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* *

toolbox_191.txt:tRoLl.4056180441832623

Q10. A troll is blocking the present_engine from starting. Run the present_engine binary to retrieve this troll.

chmod +x present_engine
./present_engine

troll.898906189498077

Q11. Trolls have blown the fuses in /home/elf/workshop/electrical. cd into electrical and rename blown_fuse0 to fuse0.

mv blown_fuse0 fuse0

troll.898906189498077

Q12. Now, make a symbolic link (symlink) named fuse1 that points to fuse0

ln -s fuse0 fuse1

Q13. Make a copy of fuse1 named fuse2.

cp fuse1 fuse2

Q14. We need to make sure trolls don't come back. Add the characters "TROLL_REPELLENT" into the file fuse2.

echo TROLL_REPELLENT > fuse2 

Q15. Find the troll somewhere in /opt/troll_den

find /opt/troll_den/ -iname '*troll*'

/opt/troll_den/apps/showcase/src/main/resources/tRoLl.6253159819943018

Q16 - 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

Q17 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

find /opt/troll_den/ -size +108k -size -110k

Q18 List running processes to find another troll.

ps aux

elf 7134 0.3 0.0 31520 26960 pts/2 S+ 07:35 0:00 /usr/bin/python3 /14516_troll

Q19 The 14516_troll process is listening on a TCP port. Use a command to have the only listening port display to the screen.

netstat -a -t

tcp 0 0 0.0.0.0:54321 0.0.0.0:* LISTEN

Q20 The service listening on port 54321 is an HTTP server. Interact with this server to retrieve the last troll.

curl http://0.0.0.0:54321 

troll.73180338045875

Q21 Your final task is to stop the 14516_troll process to collect the remaining presents.

kill -9 7134 

Congratulations, you caught all the trolls and retrieved all the presents!

Answer

Congratulations, you caught all the trolls and retrieved all the presents!

Response⚓︎

Ginger Breddie

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