PicoCTF 2025 Cryptography—Guess My Cheese Part 2 Writeup

Glad to have y’all back to my WriteUp! In today’s post, I’ll walk you through a detailed, step-by-step breakdown of how I successfully tackled the Guess My Cheese Part2 challenge from picoCTF 2025. Get ready for an in-depth look at my approach, techniques, and insights into solving this exciting puzzle. Let’s dive in!
Analyzing the hints provided:
Hint 1: I heard that SHA-256 is the best hash function out there!
Hint 2: Remember Squeexy, we enjoy our cheese with exactly 2 nibbles of hexadecimal-character salt!
Hint 3: Ever heard of rainbow tables?
Here’s the challenge

As you can see it provides us some SHA-256 Hash and it’s clear that it’s salted.
Now what is SHA-256 first?
SHA-256 is a type of cryptographic hash function, meaning it takes any input (like text or data) and turns it into a fixed-size string of characters, typically 64 characters long when written in hexadecimal. It’s part of the SHA-2 family, which is a set of algorithms created by the NSA to provide secure ways of verifying data.
Now, let’s dive back into the challenge. If you take a closer look at the Cheese List, you’ll notice that the cheese names aren’t consistent. Some names mix uppercase and lowercase letters, and even include symbols like parentheses. This inconsistency means that different text encodings can represent these names as bytes in different ways. Some common encodings to consider are UTF-8, UTF-16 (both little-endian and big-endian), and Latin-1.
The goal here is to pair each cheese name with salt values, but with so many cheese names in the list, how do we efficiently handle this? For every cheese name (and its variations), we combine it with salt values that range from 0 to 255. The salt can be appended to the end, prepended to the beginning, or inserted at various points within the cheese name itself. This creates a wide range of potential combinations. The next step is to hash each combination. For every possible combination of cheese name, salt value, case variation, and encoding, we will calculate the SHA-256 hash.
Next, as the hash-cracking tools run, we will compare the computed hash with the target hash. If a match is found, we’ve successfully identified the correct combination.
Here’s my custom Python tool that automates the entire process:
After execution, this is the output (Keep in mind that the cracking process might take some time):

We’ve finally obtained the cheese name and its corresponding salt in hexadecimal format, now let’s verify it!

As shown here, the tool prompts for the cheese name and the result. When we enter the plaintext version of the hash with the salt in it, it reveals the flag!
So fun!!!!
Last updated