Post

1337UP Live CTF 2023

Writeup on 1337UP Live CTF 2023.

Decided to try some cryptography challenges on 1337UP LIVE CTF 2023 organised by Intigriti.

Really Secure Apparently

Apparently this encryption is “really secure” and I don’t need to worry about sharing the ciphertext, or even these values..

n = 689061037339483636851744871564868379980061151991904073814057216873412583484720768694905841053416938972235588548525570270575285633894975913717130070544407480547826227398039831409929129742007101671851757453656032161443946817685708282221883187089692065998793742064551244403369599965441075497085384181772038720949

e = 98161001623245946455371459972270637048947096740867123960987426843075734419854169415217693040603943985614577854750928453684840929755254248201161248375350238628917413291201125030514500977409961838501076015838508082749034318410808298025858181711613372870289482890074072555265382600388541381732534018133370862587

Author: CryptoCat

Downloadable File SHA256 checksum
ciphertext d7d7fc3befaf2696bc5de01a9f7e92d055a66ba2f10d22eb1ac4c1284310ff7f

Remove white space from hexdump of Ciphertext.

027401CA8188B58051F88ED8E4136762375D5D8DADF88FD1475D7E55125B379D25CC8D39DF7A56EBC0415BF1BF5D8A672A98E865B43CD9553AF6CF975AD9464755313D5309BB55F1DD307F9EB0C4A1AB3EABA4806D1F275230D53801BECD48238C45CF4FD9052C42776F5A79C0FE63C3AE7092DE1D26586209804AD6AB6F767FFC

Convert from Hexadecimal to Decimal. Reference: https://www.rapidtables.com/convert/number/hex-to-decimal.html

image

With the following variables:

1
2
3
4
5
N = 689061037339483636851744871564868379980061151991904073814057216873412583484720768694905841053416938972235588548525570270575285633894975913717130070544407480547826227398039831409929129742007101671851757453656032161443946817685708282221883187089692065998793742064551244403369599965441075497085384181772038720949

E = 98161001623245946455371459972270637048947096740867123960987426843075734419854169415217693040603943985614577854750928453684840929755254248201161248375350238628917413291201125030514500977409961838501076015838508082749034318410808298025858181711613372870289482890074072555265382600388541381732534018133370862587

C = 441001510077083440712098978980133930415086107290453312932779721137710693129669898774537962879522006041519477907847531444975796042514212299155087533072902229706427765901890350700252954929903001909850453303487994374982644931473474420223319182460327997419996588889034403777436157228265528747769729921745312710652

Solve RSA challenge. Reference: https://www.dcode.fr/rsa-cipher

image

Flag: INTIGRITI{0r_n07_50_53cur3_m4yb3}

Keyless

My friend made a new encryption algorithm. Apparently it’s so advanced, you don’t even need a key!

Author: CryptoCat

Downloadable File SHA256 checksum
keyless.zip e3f14512e804d092eb51467aad9e2e82f04fab7d754613a098e8a5dacce6da0d

Provided with encrypt.py and flag.txt.enc.

Used ChatGPT to produce python script with the following prompts.

1
2
3
4
5
Write a python script that implements the reverse process

Modify the script such that encrypted flag is supplied as 'flag.txt.enc'

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 25: character maps to <undefined>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def decrypt(encrypted_message):
    decrypted_message = ""
    for char in encrypted_message:
        decrypted_char = ord(char) ^ 23
        c = decrypted_char + 7
        b = c // 3
        a = (b - 5) ^ 42
        original_char = (a - 10) // 2
        decrypted_message += chr(original_char)
    return decrypted_message
# Reading the encrypted flag from file using binary mode
with open("flag.txt.enc", "rb") as file:
    encrypted_flag = file.read().decode('utf-8').strip()
decrypted_flag = decrypt(encrypted_flag)
print("Decrypted Flag:", decrypted_flag)

Flag: INTIGRITI{m4yb3_4_k3y_w0uld_b3_b3773r_4f73r_4ll}

I am still trying to solve the following challenges. Appreciate a nudge in the correct direction!

Not So Smooth

Can you find a and b?

Author: ConnorM

Downloadable File SHA256 checksum
notsosmooth.py 5b667b991f176eb3173f0d41a2993c679f822983b0d93fd1f84b0680b326f0c7

1-10

One equation, ten unknowns?

Author: ConnorM

Downloadable File SHA256 checksum
one_equation.zip 621d798dfe4bea8fcc0440549c47031250d5c7aa4f5b53effe2bd76828265fa1
This post is licensed under CC BY 4.0 by the author.