NCS Competition 2021 Writeup
  • HHousen National Cyber Scholarship Competition 2021 Writeup
  • Forensics
    • FE02 - 100pts
    • FE03 - 100pts
    • FH01 - 500pts
    • FE04 - 100pts
    • FM01 - 250pts
    • FM02 - 250pts
    • FM03 - 250pts
    • FE01 - 100pts
  • Crypto
    • CM01 - 250pts
    • CM02 - 250pts
    • CX01 - 1000pts
    • CH01 - 500pts
    • CH02 - 500pts
  • Binary
    • BM01 - 250pts
    • BM02 - 250pts
    • BM03 - 250pts
    • BX01 - 1000pts
    • BX02 - 100pts
    • BE01 - 100pts
    • BE02 - 100pts
    • BH01 - 500pts
  • Networking
    • NM01 - 250pts
    • NE01 - 100pts
  • Web
    • WX01 - 1000pts
    • WE01 - 100pts
    • WE02 - 100pts
    • WH01 - 500pts
    • WH02 - 500pts
    • WM01 - 250pts
    • WM02 - 250pts
    • WM03 - 250pts
    • WM04 - 250pts
    • WM05 - 250pts
  • Challenge Name
Powered by GitBook
On this page
  • Briefing
  • Solution
  • Flag

Was this helpful?

Edit on Git
  1. Crypto

CM01 - 250pts

PreviousCryptoNextCM02 - 250pts

Last updated 4 years ago

Was this helpful?

Briefing

Download the file and find a way to get the flag. Contents: code.png, frame.png

Challenge Files:

Solution

  1. This is a bad solution. You have been warned. I'm sure there are quicker methods than this. You have been warned.

  2. We can decode frame.png using to get Hey, I've put the flag into the other file using the same trick we always use. You know what to do. :).

  3. Now, invert the code.png file using any method you want (GIMP works great)

  4. Next, open the frame.png in GIMP and open code_inverted.png as a layer. Make sure the code_inverted.png layer is on top and set its opacity to 50%. This will reveal a gray QR code.

  5. Flatten the layers and then select all the black pixels using the "Select by Color" feature. Use the bucket to fill them with white.

  6. We should be able to simply replace all the gray with black and have the QR code, but there are noise pixels. I tried various methods to remove them, but I ended up using the pen tool to draw over all the entire QR code. After that, I selected the black pixels using the magic wand, inverted the selection, and filled the selection with white.

  7. Finally, save the image as answer.png and decode it using to get FLAG: A_Code_For_A_Code

Flag

A_Code_For_A_Code

cm01.zip
ZXing
ZXing