Files
ctf/2025/glacier/rev/c2/rc5_dec.py
2025-11-28 12:20:39 +01:00

15 lines
430 B
Python

import struct
import hashlib
from Crypto.Cipher import RC5
if __name__ == '__main__':
# 1. The Key from your network trace (Packet 4)
# Payload: 99 90 9c 9d d5 8c 81 82 91 98 94 95 dd 84 89 9a ...
KEY = bytes.fromhex("99 90 9c 9d d5 8c 81 82 91 98 94 95 dd 84 89 9a")
ITERATIONS = 85454
key_bytes = hashlib.pbkdf2_hmac("sha256", KEY, b"", ITERATIONS, dklen=16)
print(f"[+] Key: {key_bytes.hex()}")