Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Latest commit

 

History

History
44 lines (29 loc) · 1.35 KB

3in1.md

File metadata and controls

44 lines (29 loc) · 1.35 KB

3in1

Description Like Nescafeeeee!

Attachments

https://ctf.k3rn3l4rmy.com/kernelctf-distribution-challs/nescafeee/AES.py


分析代码,发现是AES加密,密钥为hkey

password = ("abda")    
hash_obj = SHA256.new(password.encode('utf-8'))    
hkey = hash_obj.digest()

def decrypt(info):
    cipher = AES.new(hkey, AES.MODE_ECB)
    result = cipher.decrypt(info)
    return result
msg =  b'\x1bkw\x00\x01#\x1dv\xd1\x1e\xfb\xba\xac_b\x02T\xfbZ\xca\xac8Y\\8@4\xba;\xe1\x11$\x19\xe8\x89t\t\xc8\xfd\x93\xd8-\xba\xaa\xbe\xf1\xa0\xab\x18\xa0\x12$\x9f\xdb\x08~\x81O\xf0y\xe9\xef\xc41\x1a$\x1cN3\xe8F\\\xef\xc1G\xeb\xdb\xa1\x93*F\x1b|\x1c\xec\xa3\x04\xbf\x8a\xd9\x16\xbc;\xd2\xaav6pWX\xc1\xc0o\xab\xd5V^\x1d\x11\xe4}6\xa4\x1b\\G\xd4e\xc2mP\xdb\x9b\x9f\xb0Z\xf12'

print(decrypt(msg))

AES解密得到两个url,访问url得到文件hint.txtflag.wav

b'https://www.mediafire.com/file/oii1sm3oyt4tyjc/flag.wav/file\nhttps://www.mediafire.com/file/rgdww91os3we7eo/hint.txt/file'

查看hint.txt,提示我们“图形或照片表示”

A graphic or photographic representation 

使用Sonic Visualiser打开flag.wav,点击Layer->Add Spectrogram,得到flag

image-20211119215941779

flag:flag{34sY_CH4LL3nGe_w1tH_3Xtr4_St3Ps}