TryHackMe: Advent of Cyber 2023 (Day 14) The Little Machine That Wanted to Learn

Samantha
4 min readDec 21, 2023

--

“The CTO has made our toy pipeline go wrong. By infecting elves at key positions in the toy-making process, he has poisoned the pipeline and caused the elves to make defective toys!

McSkidy has started to combat the problem by placing control elves in the pipeline. These elves take measurements of the toys to try and narrow down the exact location of problematic elves in the pipeline by comparing the measurements of defective and perfect toys. However, this is an incredibly tedious and lengthy process, so he’s looking to use machine learning to optimise it.”

Q1: What is the other term given for Artificial Intelligence or the subset of AI meant to teach computers how humans think or nature works?

This is Machine Learning. It’s in the title of the room and mentioned through-out the lesson.

Q2: What ML structure aims to mimic the process of natural selection and evolution?

Another answer found in the text, Genetic Algorithms.

Because you just look through the text to find these answers, and that’s pretty boring, I decided to do something more interesting and ask AI to generate images to represent the concepts.

“Generate an image which represents the concept of Genetic Algorithms”

Q3: What is the name of the learning style that makes use of labelled data to train an ML structure?

Keep reading to find the next answer, Supervised Learning.

“Generate an image which represents the concept of Supervised Learning”

Q4: What is the name of the layer between the Input and Output layers of a Neural Network?

There are only three layers, so it is the hidden layer.

“Generate an image which represents the Hidden Layer in a Neural Network”

Q5: What is the name of the process used to provide feedback to the Neural Network on how close its prediction was?

This is called Back-Propagation.

“Generate an image which represents the concept of Back-Propagation”

Q6: What is the value of the flag you received after achieving more than 90% accuracy on your submitted predictions?

Now we are going to build our own neural network (with a lot of help). And this is truly training wheel style, because everything is mostly provided for you.

I started by adjusting the code with some inputs to create the dataset in an 80/20 split:

Then we normalize the data:

And then add classifier code:

Finally, a piece of testing prediction code:

Do I know what any of this means? Barely. All the room has you do is copy and paste these into the correct spots. And frankly, I don’t have time to learn how to code a neural network from scratch today.

I saved my code and then ran it from the directory where all the data was.

This says my network performed with over 91% accuracy. So I just need to upload my file to a special website and I will be rewarded with the flag.

--

--

Samantha
Samantha

Written by Samantha

CTF writeups to facilitate cyber education and help me earn CPEs

No responses yet