JKUATCTF 2021

trustie_rity
7 min readNov 30, 2021

Although this writeup includes challenges i was unable to solve during the challenge it might not include some of the challenges i solved. I am kidding ,it includes them except for the web challenge which became inaccessible after the session expired.

CRYPTOGRAPHY

  1. Easy_Peasy
    In this challenge ,we were provide with a file with the following string
JJFUGVCGPNKGQMJVL5UXGX2CGQ2TGXZTGJ6QU===

basically what came in my mind was the base32 numeral system .It uses a set of 32 digits, each of which can be represented by 5 bits (25). One way to represent Base32 numbers in a human-readable way is by using a standard 32-character set, such as the twenty-two upper-case letters A–V and the digits 0–9. i quickly launched my terminal ,i echoed the string piping it to base32 decode.This is not the only way , You can use also online decoders.

echo JJFUGVCGPNKGQMJVL5UXGX2CGQ2TGXZTGJ6QU=== | base32 -d
JKCTF{Th15_is_B453_32}

2.Heightened senses
A file was provided with braille data format. I rushed to an online decoder (https://www.dcode.fr/braille-alphabet) to decode it.

JKCTF{BRAILLE_IS_SIMPLE}

3.Needle in the HayStack
I wasn’t able to solve this at the time of playing the CTF. There was a flag file and a key.pem .On doing “file key.pem” i got PEM RSA private key.We will use openssl rsautl utility which processes rsa keys that is, it is a utility to sign, verify, encrypt and decrypt data using RSA private key and public key.

openssl rsautl -decrypt -inkey key.pem -in flag
V1hQR1N7R3U0Z2ZfSlVMX0ozX1A0MXlfR1Uzel9UblozNSF9Cg==

this looks like a base64 string so we can decode it these way:

echo V1hQR1N7R3U0Z2ZfSlVMX0ozX1A0MXlfR1Uzel9UblozNSF9Cg==|base64 -d
WXPGS{Gu4gf_JUL_J3_P41y_GU3z_TnZ35!}

So still this flag didn’t really make sense since it doesn’t even follow the flag format of the ctf ,so i quickly figure out through trial and error that this is rot13 .

4. Numbers This challenge involves playing around with number systems ,i just happened to know of a site that really came in handy for that certain scenario (http://icyberchef.com/) .so there’s this file named coolnumbers which has decimal numbers,changing from decimal we get octal,changing from octal i get Binary changing it from Binary i get flag.

54 48 32 54 49 32 54 48 32 54 48 32 54 49 32 54 48 32 54 49 32 54 48 32 52 48 32 54 48 32 54 49 32 54 48 32 54 48 32 54 49 32 54 48 32 54 49 32 54 49 32 52 48 32 54 48 32 54 49 32 54 48 32 54 48 32 54 48 32 54 48 32 54 49 32 54 49 32 52 48 32 54 48 32 54 49 32 54 48 32 54 49 32 54 48 32 54 49 32 54 48 32 54 48 32 52 48 32 54 48 32 54 49 32 54 48 32 54 48 32 54 48 32 54 49 32 54 49 32 54 48 32 52 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 49 32 54 48 32 54 49 32 54 49 32 52 48 32 54 48 32 54 49 32 54 48 32 54 49 32 54 48 32 54 49 32 54 48 32 54 48 32 52 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 49 32 54 48 32 54 48 32 54 48 32 52 48 32 54 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 48 32 54 49 32 54 49 32 52 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 48 32 54 48 32 54 49 32 54 49 32 52 48 32 54 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 48 32 54 49 32 54 49 32 52 48 32 54 48 32 54 48 32 54 49 32 54 48 32 54 48 32 54 48 32 54 48 32 54 48 32 52 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 48 32 54 48 32 54 48 32 54 49 32 52 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 48 32 54 48 32 54 49 32 54 48 32 52 48 32 54 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 48 32 54 49 32 54 49 32 52 48 32 54 48 32 54 48 32 54 49 32 54 48 32 54 48 32 54 48 32 54 48 32 54 48 32 52 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 49 32 54 48 32 54 49 32 54 48 32 52 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 48 32 54 49 32 54 48 32 54 49 32 52 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 48 32 54 48 32 54 49 32 54 49 32 52 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 48 32 54 49 32 54 48 32 54 48 32 52 48 32 54 48 32 54 48 32 54 49 32 54 48 32 54 48 32 54 48 32 54 48 32 54 48 32 52 48 32 54 48 32 54 49 32 54 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 48 32 52 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 48 32 54 49 32 54 48 32 54 49 32 52 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 49 32 54 49 32 54 48 32 54 49 32 52 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 48 32 54 48 32 54 49 32 54 48 32 52 48 32 54 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 48 32 54 49 32 54 49 32 52 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 48 32 54 48 32 54 49 32 54 48 32 52 48 32 54 48 32 54 48 32 54 49 32 54 49 32 54 48 32 54 49 32 54 48 32 54 49 32 52 48 32 54 48 32 54 49 32 54 49 32 54 49 32 54 49 32 54 49 32 54 48 32 54 49JKCTF{Th3s3 ar3 just Numb3r5}

5.Mind Games Here we had this file with base64 encrypted

MzIgNjUgMjAgMzIgNjQgMjAgMzIgNjQgMjAgMzIgMzAgMjAgMzIgNjQgMjAgMzIgNjUgMjAgMzIgNjUgMjAgMzIgNjQgMjAgMzIgMzAgMjAgMzIgNjUgMjAgMzIgNjQgMjAgMzIgNjQgMjAgMzIgNjUgMjAgMzIgMzAgMjAgMzIgNjQgMjAgMzIgNjQgMjAgMzIgNjUgMjAgMzIgMzAgMjAgMzIgNjUgMjAgMzIgNjUgMjAgMzIgNjUgMjAgMzAgNjEgMjAgMzIgNjUgMjAgMzIgNjUgMjAgMzIgNjUgMjAgMzIgNjQgMjAgMzAgNjEgMjAgMzIgNjUgMjAgMzIgNjUgMjAgMzIgNjQgMjAgMzIgNjUgMjAgMzIgMzAgMjAgMzIgNjUgMjAgMzIgNjQgMjAgMzIgNjUgMjAgMzIgMzAgMjAgMzIgNjUgMjAgMzIgNjQgMjAgMzIgNjUgMjAgMzAgNjEgMjAgMzIgNjUgMjAgMzIgNjQ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ypting it gave Hexadecimal number system numbers changing this numbers from hexadecimal i get another bunch of hexadecimal numbers,doing the same i get a morsecode,changing it from morsecode i get a ROT13 cipher text, decrypting this i get the Flag:

JKCTF I SEE YOU WATCHED SQUID GAMES
JKCTF{I_SEE_YOU_WATCHED_SQUID_GAMES}

Reverse Engineering

  1. crackme.py This was pretty easy . The code is as follows .
# Hiding this really important number in an obscure piece of code is brilliant!
# AND it’s encrypted!
# We want our biggest client to know his information is safe with us.
bezos_cc_secret = “yzr%uLH92E0H60E9:?<0H60364@>6N”
# Reference alphabet
alphabet = “!\”#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ”+ \
“[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~”
def decode_secret(secret):
“””
NOTE: encode and decode are the same operation in the ROT cipher family.
“””
# Encryption key
rotate_const = 47
# Storage for decoded secret
decoded = “”
# decode loop
for c in secret:
index = alphabet.find(c)
original_index = (index + rotate_const) % len(alphabet)
decoded = decoded + alphabet[original_index]
print(decoded)
def choose_greatest():
“””Echo the largest of the two numbers given by the user to the program
Warning: this function was written quickly and needs proper error handling
“””
user_value_1 = input(“What’s your first number? “)
user_value_2 = input(“What’s your second number? “)
greatest_value = user_value_1 # need a value to return if 1 & 2 are equal
if user_value_1 > user_value_2:
greatest_value = user_value_1
elif user_value_1 < user_value_2:
greatest_value = user_value_2
print( “The number with largest positive magnitude is “
+ str(greatest_value) )
choose_greatest()
decode_secret()
i realised this decode secret was doing some rot47 operations to decode the secret i decided to pass the secret above to it to do the work for us.
decode_secret(“yzr%uLH92E0H60E9:?<0H60364@>6N”)

i run the program and boom i had the flag .

JKCTF{what_we_think_we_become}

2.rev_1

This was pretty easy too .Using file utility i saw it is a 64 bit executable. I decided to use ghidra in this case.I wanted to see what the assembly looked like more than the actual code in c.

i saw an interesting pattern on the assembly from the DAT_00100648 whose content is being printed after a certain action by the scanf function. 
using `strings chal2.o` i got the flag.
JKCTF{oh_the_things_you_can_find_if_you_dont_stay_behind}

These are the challenges i solved both after the ctf challenge and before . I am working on the remaining ones.Meanwhile enjoy this writeup as i cook something more interesting for you .

--

--

trustie_rity

Offensive Penetration Tester | M4lici0s Lif3 | Find video walkthroughs on my yt channel: https://www.youtube.com/@trustie_rity