The hint for today’s challenge was straight to the point. With that in mind, my first move was to fire up Burp Suite so I could capture and inspect the HTTP history. Knowing the objective, I navigated straight to the gift cards page in the application to see if I could brute-force and claim vouchers without actually paying for them.Documentation Index
Fetch the complete documentation index at: https://docs.jaspervanzeir.be/llms.txt
Use this file to discover all available pages before exploring further.
Enumeration & Pattern Recognition
To understand how the system worked, I needed a baseline. I went ahead and purchased a single gift card to see how the codes were structured.

CAFE-0803-A... followed by three variable letters. The prefix was static, and the suffix was just three uppercase characters.
This was the perfect scenario for a brute-force attack. I opened Burp Suite and checked the HTTP history to examine the exact structure of the redemption request. The request was a POST to /api/giftcards/redeem containing a JSON body with the voucher code.

Initial Access & Exploitation
I knew enough to start fuzzing, but before I could use a tool likeffuf, I needed a wordlist containing all possible three-letter combinations. Since I knew the variable part consisted only of uppercase letters (from AAA to ZZZ), I wrote a quick Python script to generate the exact text file I needed:
voucher_combinations.txt file containing every possible permutation.
Next, I constructed my ffuf command:
-w: Specifies my custom wordlist.-u: The target API endpoint.-X POST: Specifies the HTTP method.-H: Passes the necessaryContent-Typeand my JWT for authorization.-d: The JSON payload, usingFUZZas the placeholder forffufto inject the wordlist items.-mc 200: Match only200 OKresponses. I knew from Burp that submitting an invalid or already redeemed code threw an error, so a 200 would indicate a successfully brute-forced voucher.



The Obstacle: Where is the Flag?
Despite successfully brute-forcing and redeeming the vouchers, I hit a frustrating wall: I didn’t have the flag. Becauseffuf automated the redemption process, it essentially “consumed” all the valid vouchers in the background. I never actually saw the raw JSON responses, which is almost certainly where the flag was hiding. I knew what the valid codes were, but I was blind to the server’s success message.
The “Hacky” Workaround
I needed to see that JSON response. My initial thought was:
What if I just create a new account, take one of the valid codes ffuf just found, and manually submit it via Burp Suite?
I did exactly that. I created a new user, pasted a valid code into Burp Repeater, and sent the request. It worked, and the JSON response contained the flag!

ffuf run would have permanently burned all valid codes, locking me out of the flag.
The Elegant Solution
Wanting to learn the “proper” way to handle this, I decided to do some research online to see if there was a way to makeffuf log the response bodies while brute-forcing.
Looking through the official ffuf documentation on GitHub, I found the exact solution I needed: the -od (output directory) flag. This flag saves every matched HTTP response to a specified folder.
I created another new test user (to get a fresh JWT), updated my command, and ran it again:
ffuf finished, it had populated the results directory with the raw HTTP responses of every successful hit. I simply ran a recursive grep command on that folder:
.avif?fit=max&auto=format&n=os7ohE5xyrHbyp1l&q=85&s=dc5fc64ff234799fecbc9f4f79eb956b)
Tools Used
- Burp Suite (Community Edition): Proxy, HTTP History, and Repeater to analyze the API request structure.
- Python: To write a custom script generating the 3-character permutations wordlist.
- ffuf: To fuzz the API endpoint and automate the brute-force attack.
- grep: To parse the downloaded response files and extract the flag.
Summary
- Key Steps: I identified a predictable pattern in gift card codes, generated a custom wordlist using Python, and brute-forced the API endpoint using
ffuf. To capture the flag hidden in the response bodies, I utilizedffuf’s-odflag to save the output and usedgrepto parse it. - What I Learned: The most valuable takeaway from this challenge was learning how to properly log response bodies in
ffufusing the-odflag. Finding a vulnerability is only half the battle; capturing the exfiltrated data cleanly is just as important. - Crucial Mistakes/Takeaways: Relying on my initial “hacky” workaround (creating a second account to redeem an already-used code) was a bad practice. It relied on a secondary vulnerability (duplicate redemptions) to bypass a limitation in my own tooling methodology. Taking a step back to research the official tool documentation led to a much more robust and professional technique.