BDSec CTF 2025

The Promise Was Not True – Misc Challenge Writeup | BDSec CTF 2025

This CTF challenge involved reverse-engineering an esoteric stack-based program to derive a 7-digit passcode. The provided code resembled a recursive factorial function, and when executed with input 10, it computed 10! = 3,628,800, which is the correct flag.

Explanation:

The function f(n) computes the factorial of n recursively.

When called with 10, it returns 3628800 (a 7-digit number).

The flag is formatted as BDSEC{3628800}.

Run the script to get the flag instantly!

Python Script to Solve It:

def f(n): if n == 1: # Base case ($1=) return 1 else: # Recursive case ([$1-f;!*]?) return n * f(n - 1)

passcode = f(10) # Compute 10! print(f"BDSEC{{{passcode}}}") # Output: BDSEC{3628800}

1 people love this