Author: Nathan Yam, Jonathan Kartawidjaja


image.png

#!/usr/bin/env python3
import time as yam

cipher = "HNDN{esp_nzh_htyd_zynp_lrlty}"

print("🐄 Cow says: 'I have a secret message for you, adventurer!'")

while True: 
	for i, c in enumerate(cipher):
    		print("cow says ")
    		yam.sleep(.1)
    		print(c)

Executing this python script in the terminal simply iterates through the variable cipher as shown below:

image.png

cipher = "HNDN{esp_nzh_htyd_zynp_lrlty}"

The cipher variable seems to be a hardcoded altered version of the flag, mostly indicated by the four character long prefix and the wrapped curly braces present.

The while loop itself does not change the cipher, so there is no logic to reverse in the code.

Solution

You can solve this challenge with the tool CyberChef, The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis.

CyberChef

Since we notice that the overall structure of the cipher variable stays the same but each character is shifted, we can infer that some kind of rotation cipher is being used. (or at least its the first thing we should try)