All Father's Wisdom

Description

We found this binary in the backroom, its been marked as "The All Fathers Wisdom" - See hex for further details. Not sure if its just old and hex should be text, or they mean the literal hex.

Anyway can you get this 'wisdom' out of the binary for us?

Author: pix

Download: the-all-fathers-wisdomarrow-up-right

Solution

In Ghidra we see print_flagfunction and buffer of characters:

  local_8 = 0x75;
  local_10 = 0x26;
  local_18 = 0x31;
  local_20 = 0x22;
  local_28 = 0x25;
  local_30 = 0x31;
  local_38 = 0x77;
  local_40 = 0x24;
  local_48 = 0x31;
  local_50 = 0x25;
  local_58 = 0x26;
  local_60 = 0x31;
  local_68 = 0x21;
  local_70 = 0x22;
  local_78 = 0x31;
  local_80 = 0x74;
  local_88 = 0x25;
  local_90 = 0x31;
  local_98 = 0x75;
  local_a0 = 0x23;
  local_a8 = 0x31;
  local_b0 = 0x22;
  local_b8 = 0x24;
  local_c0 = 0x31;
  local_c8 = 0x20;
  local_d0 = 0x22;
  local_d8 = 0x31;
  local_e0 = 0x77;
  local_e8 = 0x24;
  local_f0 = 0x31;
  local_f8 = 0x74;
  local_100 = 0x27;
  local_108 = 0x31;
  local_110 = 0x20;
  local_118 = 0x22;
  local_120 = 0x31;
  local_128 = 0x25;
  local_130 = 0x27;
  local_138 = 0x31;
  local_140 = 0x77;
  local_148 = 0x25;
  local_150 = 0x31;
  local_158 = 0x73;
  local_160 = 0x26;
  local_168 = 0x31;
  local_170 = 0x27;
  local_178 = 0x25;
  local_180 = 0x31;
  local_188 = 0x25;
  local_190 = 0x24;
  local_198 = 0x31;
  local_1a0 = 0x22;
  local_1a8 = 0x25;
  local_1b0 = 0x31;
  local_1b8 = 0x24;
  local_1c0 = 0x24;
  local_1c8 = 0x31;
  local_1d0 = 0x25;
  local_1d8 = 0x25;

print_flag - Line 137: In here each character is getting XOR-ed with 0x11. Statement looks confusing, because it's pseudo code and indexing with pointers (essesnitally iteration happens over buffer but at low level).

all-father-wisdom-1

The output wasn't making sense, it was't hex so I used Cipher Identifierarrow-up-right and found Circular Bit Shiftarrow-up-right.

all-father-wisdom-2
circle-check

Note

I logically assumed buffer layoat to be local_8 -> local_1d8, turns out its reverse.

Correct order:

Cyberchef Recipe:

  1. From Hex

  2. XOR 0x11 (Hex)

  3. From Hex

Last updated