AOC2 - Day 16 - TryHackMe

 

Room Link

Advent Of CyberSecurity 2

Task 21 : [Day 16] Scripting Help! Where is Santa?

Let us start with a nmap scan

/assets/images/posts/aoc216/Untitled.png

What is the port number for the web server?

8000

Without using enumerations tools such as Dirbuster, what is the directory for the API? (without the API key)

/api

looking at the source code of the index.html page we can find the api directory

/assets/images/posts/aoc216/Untitled%201.png

Where is Santa right now?

Winter Wonderland, Hyde Park, London.

We can bruteforce for the correct api key

import requests

for x in range(1,100,2):
	url = "http://<ip>:8000/api/"+str(x)
	response = requests.get(url)
	print(x,": ",response.text	)

/assets/images/posts/aoc216/Untitled%202.png

Find out the correct API key.

57