Noname
[crypto]
noname
I have Noname; I am but two days old.
- File #1: volga2020-encrypted
- File #2: volga2020-encryptor.py
Recon
From volga2020-encryptor.py
:
key = md5(str(int(time.time()))).digest()
The key uses time()
, bruteforce should be straightforward.
Solution
from Crypto.Cipher import AES # pip install pycrypto
import time
from hashlib import md5
from base64 import b64decode
t = 1585323501
with open('encrypted', 'r') as f:
data = b64decode(f.read())
for i in range(t, 0, -1):
if not i % 10000:
print(f'Trying {i}..')
key = md5(str(i).encode()).digest()
aes = AES.new(key, AES.MODE_ECB)
dec = aes.decrypt(data)
if b'VolgaCTF' in dec:
print(dec)
break
Trying 1585320000..
Trying 1585310000..
Trying 1585300000..
Trying 1585290000..
Trying 1585280000..
Trying 1585270000..
Trying 1585260000..
Trying 1585250000..
VolgaCTF{5om3tim3s_8rutf0rc3_i5_th3_345iest_w4y}\x10\x10\x10
Flag
VolgaCTF{5om3tim3s_8rutf0rc3_i5_th3_345iest_w4y}