CSIT Mini Challenge 2025
The Nian Awakens - Feb
Decrypt to Defend!
Legends speak of enchanted artifacts scattered across the region when Nian was first captured. These artifacts contain vital information of Nian's weaknesses. It's up to you to decrypt their secrets and uncover information to bring the beast down.
Nian is currently resting at 34.123.42.200:80. When you're ready, face the beast and save Chinese New Year 2025.
The following three files were provided:
client- Python Executabledev_server- Python Executableč幓åē„„.pcapng- Encrypted Network Traffic

Using DetectItEasy, we identify that both executables are Python programs packed with PyInstaller. After extracting the Python scripts using PyInstxtractor and decompiling with PyLingual, we get:
client.py: Client for connecting to WebSocket serverdev_server.py: Development server with encrypted test flagcommon.py: Shared functionsconstants.py: Logging configuration and hints
I began by running both executables. The programs downloaded the necessary TLS certificates for mutual TLS (mTLS) connection, but the client is not working.
After reviewing the source code, it became apparent that the program relies on certain environmental variables. I configured these variables as follows:
The constants.py file provided several hints that trigger under specific conditions:
HINT_1: Failure to download TLS certificates from SERVER_IP:SERVER_PORT
HINT_2: Invalid SSL certificate detection
HINT_3: Failed connection attempt to WS_IP:WS_PORT
Now it works on the local setup.
Before proceeding to find flag, I decided to first connect to the remote server. The development certificates do not work with the remote server. From certificate download URL, the "REVW" in http://34.57.139.144:80/REVW/DEV_server.key represented "DEV" in Base64. Following this pattern, we determined that production certificates should be located under "PROD" in Base64 (UFJPRA==).
We retrieved the CA certificates:
Subsequently, we generated client certificates for mTLS:
After copying PROD_ca.crt to DEV_ca.crt, we can now connect to the remote server.
Now, lets go back to find the flag. The flag is found at the dev_server.py by sending a message in the format 5n@k3#88#ENCRYPTION_KEY where the ENCRYPTION_KEY is used to decrypt the encrypted flag using 3DES.
Brute-forcing doesn't sounds practical here, so the key is likely provided somewhere.
Oh! I completely forgot about the encrypted č幓åē„„.pcapng. Now that we have the private key, we can decrypt the traffic directly in Wireshark.
Here are the decrypted messages:
With this, we can construct the key as hong_huo_re_nao++++, but it is only 19 characters long, meaning we're still missing 5 bytes for the full 3DES key.
The messages also mentioned the SSL certificate, so let's revisit the DEV certificates we downloaded.
Interestingly, the extensions in DEV_server.crt seem unusual. Based on the earlier hint, decoding it using Citrix aligns with the given clue.
And using Cyberchef, we obtained the following:
I was stuck at this step for a long time, as none of the combinations I tried seemed to work.
After extensive trial and error, the correct key turned out to be simply appending the timestamp to the hex representation of hong_huo_re_nao++++
Now, sending the same message to the remote server, we finally got the flag! š

It was an incredibly fun challenge! Reversing the Python executable and navigating through the various steps was exciting, but figuring out the key was a pain for me. š©
There was one hint given by CSIT that I never encounteredāturns out, it was related to an issue with pycdc.
Last updated