HackTheBox MinMax Writeup
Explore the basics of cybersecurity in the MinMax Challenge on Hack The Box. This easy-level Challenge introduces encryption reversal and file handling concepts in a clear and accessible way, perfect for beginners.
https://app.hackthebox.com/challenges/815
Description
In a haunted graveyard, spirits hide among the numbers. Can you identify the smallest and largest among them before they vanish?
Task
MiniMax
We’ve intercepted codes from an underground organisation with intentions of malicious activity. Intelligence has informed us that most of the numbers are garbage, but the biggest and smallest numbers in the file form co-ordinates of the group’s next attack location.
Identify these 2 numbers, then print out first the minimum and then the maximum. Please be swift, agent - the clock is ticking!
Example
Input
3.29 3.09 1.34 2.89
Output
1.34
3.29
Exploitation
1
2
3
4
5
6
7
8
9
10
11
import sys
numbers = []
for line in sys.stdin:
nums = [float(x) for x in line.split()]
numbers.extend(nums)
min_num = min(numbers)
max_num = max(numbers)
print(min_num)
print(max_num)
Summary
The MinMax Challenge on Hack The Box is an easy-level task that hones participants’ skills in handling and processing data to identify crucial information under pressure. Set in a narrative where spirits hide vital coordinates among numbers in a haunted graveyard, participants must sift through intercepted codes to find the smallest and largest numbers, representing the coordinates of a potential attack. By using Python, they read, sort, and identify these critical numbers swiftly. This challenge not only improves participants’ abilities to work with numerical data but also emphasizes the importance of accuracy and speed in real-world cybersecurity operations.