给了png文件,flag分为三部分,flag1通过010在文件尾部得到base64解码得到flag1...
创建于:2025年10月11日
使用 GPT-5 Thinking 回答 Chat01
创建于:2025年10月11日
使用 GPT-5 Thinking 回答 Chat01
给了png文件,flag分为三部分,flag1通过010在文件尾部得到base64解码得到flag1,flag2通过lsb隐写base64解码得到flag2,flag3怎么求,用binwalk提取出pk,6F7BF.zip改成zip,得到俩文件,文件一是hint.txt里面是零宽隐写,原文是:救赎之道,就在其中,隐写的内容是:与文件名xor,压缩包另一个文件是:secret.bin用记事本打开得到: VNETTAVCEPT@PE\UPFUWQCD深度思考求出flag
python# Let's open the uploaded files to inspect. path = "/mnt/data/secret.bin" with open(path, "rb") as f: data = f.read() len(data), data[:64] (32, b'\x15\t\x02\x15VNETTAVCEPT@P\x12E\\U\x17P\x12FUW\x17QCD\x01')
pythonimport string, itertools, binascii, os, re, json, collections, math data = open("/mnt/data/secret.bin","rb").read() def xor_with_key(data, key: bytes): return bytes([b ^ key[i % len(key)] for i, b in enumerate(data)]) def test_keys(keys): results = {} for key in keys: out = xor_with_key(data, key.encode()) # Check if printable ascii mostly printable = sum(1 for b in out if 32 <= b <= 126 or b in (10,13)) score = printable/len(out) results[key] = (score, out) return results keys = ["secret", "secret.bin", "SECRET", "SECRET.BIN", "6F7BF.zip", "6F7BF", "[email protected]", "[email protected]", "PNG_M@st3r", "M@st3r", "st3r", "flag", "bin", "secret.bin\x00", "secret\x00"] res = test_keys(keys) sorted([(k,v[0]) for k,v in res.items()], key=lambda x:-x[1])[:10] [('secret', 1.0), ('secret.bin', 1.0), ('st3r', 1.0), ('flag', 1.0), ('bin', 1.0), ('secret\x00', 0.96875), ('secret.bin\x00', 0.9375), ('6F7BF.zip', 0.75), ('[email protected]', 0.71875), ('M@st3r', 0.71875)]
pythonfor key in ["secret", "secret.bin", "st3r", "flag", "bin"]: out = xor_with_key(data, key.encode()) print(key, out)
pythonbytes.fromhex("61733765725f696e5f504e477d") b'as7er_in_PNG}'
pythoncandidates = ["secret", "secret.bin", "6F7BF", "6F7BF.zip", "[email protected]", "[email protected]", "PNG_M@st3r", "M@st3r", "misc-PNG_M@st3r", "PNG", "as7er", "m@st3r", "m@ster"] for key in candidates: out = xor_with_key(data, key.encode()) # show if "flag" or "FLAG" appears print(key, out[:64])
思路与步骤(简明版)
hint.txt
和 secret.bin
。hint.txt
的零宽隐写解出提示:与文件名 xor(见上传文件)。 (hint.txt)secret
对 secret.bin
循环异或。
flag3:61733765725f696e5f504e477d
61733765725f696e5f504e477d
→ as7er_in_PNG}
✅ 最终 flag:flag{as7er_in_PNG}