Do You Know Chinese - SMP CTF 2024 - Selection Round
Hi everyone, this is Parvez Mosharaf Siam again with another write-up. So without any delay, let's jump into the solution! Before anything else, let's read the challenge description.
Here is Description:
We have caught a corrupt politician whom we analyzed to be responsible for killing a Chinese person. So, we apprehended him based on port number 65536. Can you help me find out what the Chinese person's last words were?
Step 1: Analyzing the Provided File
When we download the file, we see what appears to be a corrupt image:
Step 2: Inspecting the File
Opening the file in Notepad, we discover a Google Drive link embedded in the data:
Step 3: Accessing the Drive Content
Following the link, we find a code snippet:
word = '下去'
end_string = '艓𠅐教鑕𒁇鑔顁𓍔ꍡ睟𓄴𠌳'
for _ in range(10):
for char in word:
print(char)
print()
print("等检查下一张")
print(end_string)
Step 4: Running the Code
When we run the provided code in our terminal, we observe the following output:
Step 5: Understanding the Output
After analyzing the output, we realize the words printed are in Chinese.
Translating these characters reveals the meaning Next
:
After looking at the line before the last one, it appears to indicate that my flag is on the next line.
But it is not a Chinese language anymore. Then we notice that the description mentions 'based on port 65536,' which might be a hint for this encryption. After some research, we find that it refers to Base65536 encryption. By pasting the encrypted text into a Base65536 decoder, we retrieve our flag.
Happy Hacking...