https://buuoj.cn/challenges#[MRCTF2020]Hello_%20misc
try to restore it.png
提示修复,使用Stegslove
发现Red
通道有图片
保存下来,得到一个zip
压缩包密码:!@#$%67*()-+
接着分析try to restore it.png
,隐藏了zip
压缩包,foremost
分离
使用密码:!@#$%67*()-+
解压分离出来的压缩包
out.txt
内容如下
127
255
63
191
127
191
63
127
127
255
63
191
63
191
255
127
127
255
63
63
127
191
63
127
127
255
63
255
127
255
63
255
127
255
127
255
127
191
127
63
63
255
191
191
63
255
63
63
127
191
63
127
127
191
63
255
63
255
63
127
127
191
127
191
127
191
127
127
63
255
127
191
127
191
63
191
63
255
127
255
63
255
127
255
127
191
63
191
127
191
127
127
63
255
127
127
127
191
127
63
127
191
63
191
127
191
127
127
转为二进制发现只有八位二进制的前两位不同
使用Python将前两位提取提取出来,并以四个两位二进制一组,转为十进制,再转为字符
with open('out.txt','r') as Dec:
res = ''
for i in Dec.readlines():
Bin = '{:08b}'.format(int(i))
print(Bin)
Sub_Bin = Bin[:-6]
res += Sub_Bin
print(res)
for j in range(0,len(res),8):
full_bin = res[j:j+8]
print(chr(int(full_bin,2)),end="")
rar-passwd:0ac1fe6b77be5dbe
很明显是doc文档
,修改后缀为docx
打开fffflag.docx
,全选并标色
使用Python解码每一行base64编码
将解码出来的结果的1
替换为空格
import base64
with open('data.txt','r') as file:
for i in file.readlines():
line = str(base64.b64decode(i),'utf8')
print(line.replace('1',' '))
flag{He1Lo_mi5c~}