All PryIDA examples

PUBLIC EXERCISE / ELF X86-64

r7 · Read an MD5 digest from instructions

Recover a 16-byte target from two machine instructions and verify a candidate.

Original puzzle at the reviewed revision · All five public exercises

Original SHA-256 1f30dec79cca5b5470186f6b5fa7ffc5c83bed7d1f34b693fd148603fb2ce495

01 Open the exact binary

Open r7 in PryIDA. Confirm the SHA-256 fingerprint and view File Details. Analyze main and check_password with REA.

PryIDA File Details and Hex for r7.
PryIDA File Details and Hex for r7.

02 Trace the input to a digest

Main sends your input into check_password. The calls named MD5_Init, MD5_Update, and MD5_Final point to a hash calculation. The input length comes from strlen, which counts bytes up to the terminating zero. The function then compares the 16-byte digest in two eight-byte pieces.

PryIDA Pseudocode for check_password in r7.
PryIDA Pseudocode for check_password in r7.
PryIDA Pseudocode for main in r7.
PryIDA Pseudocode for main in r7.

03 Read the first eight bytes in Hex

A displayed 64-bit number can appear reversed compared with the file bytes on this little-endian machine. Select the immediate operand of the first comparison’s movabs instruction. Read the actual bytes in the order shown by Hex.

Hex offset 0x75b · Virtual address 0x40075b · 8 bytes

PryIDA Hex selection at 0x75b in r7.
PryIDA Hex selection at 0x75b in r7.

04 Join the second half and test a candidate

Append the eight bytes from the second movabs, producing ec85070aa70e598eda72cbe82d99fabc. Search for the exact digest to find a published example candidate, then hash that candidate locally. Hashes let you check a guess. The successful match and the failed check with an added exclamation mark show why the exact bytes matter.

Hex offset 0x771 · Virtual address 0x400771 · 8 bytes

PryIDA Hex selection at 0x771 in r7.
PryIDA Hex selection at 0x771 in r7.
Reveal the solution

md5password

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

Published example containing the digest