SerialHacker

Description

A freshly downloaded flag-dispenser from The Pirate Bay, the only thing you need is a valid serial key. The description said it’s not a virus and they NEVER lie, ignore the comments.

All jokes aside the executable is NOT malicious, however Windows Defender or other AVs might pop an alert.

Solution

Before heading into this, I have to commend chronos on the music here. Absolute banger. Made the challenge at least twice as good. Now, for the solution.

I have done a little bit of PE reversing before, so I knew, dnSpy would make reversing easy.

First thing I tried, is inputting some random stuff, see what the program spits out. It had some answers like ‘most certainly not’, ‘nope’ and ‘nice try’. This gave me a good starting point what to look for.

The program was basically doing some basic checks on the “serial” you entered. From here one could easily see the format, what needed to be entered:

AAAAA-BBBBB-CCCCC-DDDDD

If you get the format right, then came some other basic checks:

  • The first five character summed must equal 385
  • The product of the 2nd quintet % 512 = 420
  • i[0] == i[4] && i[1] == i[3] && i[2] == ‘E’ for the 3rd quintet
  • j[0] == j[1] - ‘\u0001’ && j[1] == j[2] - ‘\u0001’ && j[2] == j[3] - ‘\u0002’ && j[3] == j[4] - ‘\u0003’ for the 4th quintet
  • and all quintets must be upper case

From here, I wrote a little program (which I can’t share yet), that brute forced these equtations, and I quickly grabbed the flag, just in time to enjoy the celebratory music at the end.

The acquired flag is:

cd21{HIDDEN}

← Back to SecChallenge21

all tags