3-1(来源:攻防世界)
1.关卡描述
2.解题步骤
分析:
下载附件,解压得到:
editor分析,得到:
发现是一个流量包,修改后缀,分析http对象:
发现flag.rar,导出之后,发现是一个加密的压缩包,然后追踪TCP流,找密码,在流6中发现关键信息:
发现3个核心数据,第一个是flag.rar,
第二个是base64编码
19aaFYsQQKr+hVX6hl2smAUQ5a767TsULEUebWSajEo=
第三个是AES脚本,
base64直接解密无果,很显然这跟AES脚本息息相关
# coding:utf-8 __author__ = 'YFP' from Crypto import Random from Crypto.Cipher import AES import sys import base64 IV = 'QWERTYUIOPASDFGH' def decrypt(encrypted): aes = AES.new(IV, AES.MODE_CBC, IV) return aes.decrypt(encrypted) def encrypt(message): length = 16 count = len(message) padding = length - (count % length) message = message + '\0' * padding aes = AES.new(IV, AES.MODE_CBC, IV) return aes.encrypt(message) str = 'this is a test' example = encrypt(str) print(decrypt(example))
只需添加
但是发现脚本,运算失败:
没有找到其他writeup,详细讲解的
得到密码passwd={No_One_Can_Decrypt_Me}
解压
得到flag
WDCTF{Seclab_CTF_2017}