CTF学习笔记-攻防世界WP Mysterious-GIF
- 题目名称:Mysterious-GIF
- 题目来源:breakin-ctf-2017
- 题目类型:MISC
- 题目链接:https://adworld.xctf.org.cn/task/answer?type=misc&number=1&grade=1&id=5557&page=6
- 关键词:图片隐写、binwalk
看别的大佬另一种解法:
用python脚本直接解密+合成
所用到脚本如下:
# coding=utf-8
import os
import Crypto.PublicKey.RSA
import Crypto.Cipher.PKCS1_v1_5
path = r"C:\Users\USER\Desktop\CTF-TEMP\_temp.zip.extracted"
# 读取所有文件
file = [name for name in os.listdir(path)]
flag = b''
# 载入私钥
cipher = Crypto.Cipher.PKCS1_v1_5.new(Crypto.PublicKey.RSA.importKey(open(r'C:\Users\USER\Desktop\CTF-TEMP\key.key','rb').read()))
for fi in file:
message = open(os.path.join(path,fi),'rb').read()
flag += cipher.decrypt(message,b'rsa')
open(r'C:\Users\USER\Desktop\CTF-TEMP\out','wb').write(flag)
我也尝试了一下这种方法,确实更佳高效。但是关于Python的“Crypto”这个库,直接pip install crypto会报错,查资料有很多说用pycrypto的,我试了试也是报错。最后找到了“pycryptodome”这个库,成功安装。
CTF学习笔记-攻防世界WP Mysterious-GIF
https://mrcx-personal.github.io/2021/01/30/adworld-wp-Mysterious-GIF/
You need to set
install_url
to use ShareThis. Please set it in _config.yml
.