rev

Challenges

Plastic Shield

OPSec is useless unless you do it correctly.

chevron-rightView Hint: Hint 1hashtag

The algorithm implementation itself is not the problem, I would look elsewhere.

chevron-rightstrings plastic-shield, and you can have some good observation about the outputhashtag
  • This is after I throw it into dogbolt, and check the main of the program

  • Only one character is extracted: char var_189 = var_148[rdx >> 2];

  • That character goes directly to blake2b: crypto_blake2b(&var_188, 0x40, &var_189, 1);


  • Figedting some more then I have to look at Ghidra

  • 0x3c in hexadecimal = 60 in decimal

  • So: local_30 = (password_length * 60) / 100

  • Which simplifies to: local_30 = password_length * 0.6

With all that in places the binary plastic-shield is a password-checking program that:

  1. Asks for a password input (up to 255 characters)

  2. Applies a special character detection algorithm - it finds the character at position floor(0.6 * password_length)

  3. Uses that special character as a key to decrypt an embedded ciphertext

  4. Uses BLAKE2b hashing to derive a 64-byte hash from the special character

  5. Uses AES-CBC decryption with:

    • Key: first 32 bytes of the hash

    • IV: bytes 32-48 of the hash

  6. And we need to decrypts from the embedded hex string 713d7f2c0f502f485a8af0c284bd3f1e7b03d27204a616a8340beaae23f130edf65401c1f99fe99f63486a385ccea217

circle-info

Script

  • scriptCTF{20_cau541i71e5_d3f3n5es_d0wn}

Plastic Shield 2

Okay! Fixed last time's issue. Seriously though, I swear this one is unbreakable.

tbd, will write later.

Last updated