[ \mathbfx \in \mathbbR^n \longrightarrow \psi_\mathbfx \in \mathcalH, ] nhdta-793
max_len_inside = 12 # try up to 12 characters inside the braces nhdta-793
/* Compute SHA‑256 of the input */ uint8_t digest[32]; SHA256_CTX ctx; SHA256_Init(&ctx); SHA256_Update(&ctx, input, strlen(input)); SHA256_Final(digest, &ctx); nhdta-793
| Step | What we did | Why it mattered | |------|--------------|-----------------| | | Disassembled the binary → located check function | Revealed the hidden verification logic | | Key extraction | Copied the 64‑byte key array from .rodata | Provided the data needed to compute the target hash | | Equation derivation | SHA256(input) XOR K0 = K1 ⇒ SHA256(input) = K0 XOR K1 | Turned a “black‑box” check into a deterministic condition | | Target hash computation | TARGET = K0 ^ K1 (byte‑wise XOR) | Gave the exact hash we must match | | Search space reduction | Used known flag format NHDTA… and limited inner length | Made brute‑force feasible | | Brute‑force script | Enumerated candidates, hashed each, compared to TARGET | Recovered the only string satisfying the equation | | Verification | Ran the binary with the recovered string | Confirmed correctness, captured the flag |
The challenge provides a single downloadable file: nhdta-793 . Running the binary prints a short banner and then waits for user input: