All PryIDA examples

PUBLIC EXERCISE / ELF X86-64

r8 · Test the parser’s actual rules

Follow a 39-character formatted input from parsing through a repeated hash check.

Original puzzle at the reviewed revision · All five public exercises

Original SHA-256 d89c461413aaa2bc6ea5898c1b8d8deece20b77ae3a6420c5c64f0337b4c8273

01 Open the file and plan the analysis

Open r8 in PryIDA and compare its SHA-256 with the fingerprint above. Analyze main, check_password, and parse_cereal so you can follow the checker into the parser.

PryIDA File Details and Hex for r8.
PryIDA File Details and Hex for r8.

02 Read the expected input shape

Use the parser’s 0x27 length comparison as a clue. Construct a 39-character example with eight groups of four characters and seven separating colons. Check where the parser tests group separators, then look separately at the accepted characters within the input.

PryIDA Pseudocode for parse_cereal in r8.
PryIDA Pseudocode for parse_cereal in r8.
PryIDA Pseudocode for main in r8.
PryIDA Pseudocode for main in r8.

03 Notice a permitted punctuation byte

The allowed-character pass accepts the colon byte, 0x3A. The parser also checks the separator positions. Ask what happens when one additional colon is placed inside the final four-character group and the total still has 39 characters.

Hex offset 0x7f3 · Virtual address 0x4007f3 · 4 bytes

PryIDA Hex selection at 0x7f3 in r8.
PryIDA Hex selection at 0x7f3 in r8.

04 Calculate the last field exactly

The digit conversion clears the uppercase distinction with a bitwise OR and subtracts 0x57 for a character above 9. A colon is 0x3A, so the four characters 000: produce 0, 0, 0 and then minus 29. This follows the parser’s arithmetic for the puzzle.

Hex offset 0x8a8 · Virtual address 0x4008a8 · 5 bytes

PryIDA Hex selection at 0x8a8 in r8.
PryIDA Hex selection at 0x8a8 in r8.

05 Check the loop’s starting value

The seventh field must be positive. Use 0001. The hash loop uses the sum of fields seven and eight, interpreted as a signed value. One plus minus 29 is minus 28, so the condition that continues the hash loop is false before its first round.

Hex offset 0xb08 · Virtual address 0x400b08 · 16 bytes

PryIDA Hex selection at 0xb08 in r8.
PryIDA Hex selection at 0xb08 in r8.

06 Compare the untouched words

Before the hash loop, the checker copies the numbers into a buffer of 16-bit words. Choose small positive values 1 through 6 for the first six fields so those values survive the copy. The independent replay shows zero hash rounds and confirms all six final comparisons match.

PryIDA Pseudocode for check_password in r8.
PryIDA Pseudocode for check_password in r8.
Reveal the solution

0001:0002:0003:0004:0005:0006:0001:000:

The replay reads the original ELF bytes and applies the recovered check to this input. Open the receipt for the exact byte ranges and verification values.

Evidence receipt · Python checker replay