All five challenges

PRYIDA / NIBBLE-PERMUTATION

Nibble permutation

Recover the order of eight four-bit values and predict the packed word.

01 Open the executable

Open nibble-permutation.exe in PryIDA and bring up Executable Explorer. You need a Windows x64 host to run this PE.

Windows PryIDA. Open the executable.

02 Find the call

In Disassembly, select CALL at 0x140001020 for the recorded build. Its source begins at file offset 0x420. Right-click the instruction and find Save breakpoint from Assembly.

Windows PryIDA. Find the call.

03 Name the breakpoint

Select that action, enter Challenge call, and click Save breakpoint. This attaches a name to the verified instruction in this build.

Windows PryIDA. Name the breakpoint.

04 Rename and confirm

Open Runtime debugger → Saved breakpoints. Click the saved breakpoint’s Rename button and set it to Nibble permutation · entry. Confirm the file offset stays the same.

Windows PryIDA. Rename and confirm.

05 Prepare the launch

Click Prepare launch with empty stdin. Check that one saved breakpoint matches. Type nibble-permutation.exe to authorize this test and click Launch paused.

Windows PryIDA. Prepare the launch.

06 Verify the breakpoint bound

Find the named row under Saved breakpoints. Bound means PryIDA matched the source instruction to the loaded image. The startup thread is still suspended.

Windows PryIDA. Verify the breakpoint bound.

07 Read the call arguments

Click Continue. The named stop appears with raw values for RCX, RDX, R8 and R9. These are 0x13579bdf, 0x2468ace0, 9 and 3. Use them to check the prediction below.

Windows PryIDA. Read the call arguments.

Predict the result

These intermediate values come from a separate calculation using the four observed inputs. The debugger verifies the call boundary and final word.

  1. Number the nibbles from the least significant end. Index the permutation [4,1,7,2,6,0,3,5] using the lane number plus 3, wrapped to eight entries.
  2. In lane zero, the first word contributes nibble 2, which is B. The second word contributes 0. XOR that second nibble with 9.
  3. Add B + 9 and keep the low four bits, 4. Repeat for each lane and pack the digits from most significant to least significant.
  4. The packed word is 0xca66c4a4. Compare it with RAX.

08 Save the call and its screenshot

Click Save stop + screenshot. Wait for the screenshot attachment confirmation.

Windows PryIDA. Save the call and its screenshot.

09 Step Over and read the return

Click Step Over. PryIDA pairs the verified stop at 0x140001025 with the preceding call and shows RAX 0xca66c4a4.

Windows PryIDA. Step Over and read the return.

10 Save the return and its screenshot

Click Save stop + screenshot again. The return goes into a second evidence step.

Windows PryIDA. Save the return and its screenshot.

11 Confirm the clean exit

Click Continue one final time. Confirm the Runtime state says exited. The receipt separately records exit code 0.

Windows PryIDA. Confirm the clean exit.

12 Review the saved call

Open Walkthrough, choose the first step, and expand Screenshot evidence. Check the title, attached image and source range at 0x420. The Source Hex action reopens the file evidence.

Windows PryIDA. Review the saved call.

13 Review the saved return

Select the second step. Confirm its screenshot and observation identify RAX 0xca66c4a4 at file offset 0x425.

Windows PryIDA. Review the saved return.

Verified result

0xca66c4a4

Original SHA-256 07668095566092434a8a8210b838b733a7bed2dd511aa3d9dfe7b61161acbf83

Saved call image · Saved return image · Challenge receipt