Polar-misc-cat flag

发布时间 2023-12-20 20:36:30作者: ashashash

解压后是一张534k的图片,里面应该有其他东西

用binwalk可以看到有其他文件,但是binwalk -e分离不了文件

foremost -i flag.png

分离出文件,拖进010editor看文件格式

文件头是 D0 CF 11 E0,在网上查到是doc/ppt/xls文件的文件头,修改后缀,一个一个尝试

显示文档已经加密,找解密工具,去看了writeup是用Accent OFFICE Password Recovery解密的,我没找到,用python调库解密

wp里说密码是19631,模拟一下

import itertools
import string
import comtypes.client

word = comtypes.client.CreateObject('Word.Application')
word_path = "00000168.doc"
pwd = ''
password = list(itertools.product(list(string.digits),repeat=5)) #生成5位的数字字典
for item in password:
    pwd = ''.join(item)
    print(pwd)
    try:
        doc = word.Documents.Open(word_path, False, True, None, pwd)
    except Exception as e:
        e = str(e)
        if "密码不正确" in e:
            print("cuole")
        else:
            print("duile")
            print(pwd)
            exit(0)

输入密码后提示无法正确读取,上面说了D0 CF 11 E0可能是doc,ppt,xls文件,改一下后缀名

改成ppt后可以正常打开并显示,搜索flag直接跳到最后一页ppt

把图片挪开,ctrl+a选中所有改个颜色,找到flag