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

CM02 - 250pts

PreviousCM01 - 250ptsNextCX01 - 1000pts

Last updated 4 years ago

Was this helpful?

Briefing

Download the file and find a way to get the flag. Contents: cm02.txt

Challenge Files:

Solution

  1. There are several methods for encoding text as emojis:

    1. A common one is to simply offset the alphabet by some unicode value so each letter maps to an emoji. This can be detected because the difference between the maximum and minimum unicode values in the supplied string will be 26, or another number (like 34 for ascii lowercase and digits) that makes sense for the alphabet the flag could be using.

    2. Another method is to simply use the last byte of the unicode value as the ascii letter.

    3. Finally, the approach used for this challenge is a substitution cipher.

  2. This is a substitution cipher because there are 26 unique emojis. We can use a Python to map each emoji to a letter in the alphabet and then replace each emoji with its assigned letter. The output of is in .

  3. Now that we have transformed the input, we can use a normal substitution solver such as , , or to get the key for the substitution cipher.

  4. finds the key to be psndvylqigjfzcerhoumxtwakb and prints the decoded message. This section corresponds to the flag text: yfpl: yovhxvcmfk_uxsumimxmv_yoewck_ypnv_yeo_uzifvk_ypnv. It decodes to flag: frequently_substitute_frowny_face_for_smiley_face

Flag

frequently_substitute_frowny_face_for_smiley_face

cm02.zip
script.py
script.py
substitution_cipher.txt
quipqiup
guballa
Boxentriq
guballa