RealSignin
📎 相关: | 1.图片隐写 | 3.编码分析 | 4.压缩包分析 | 1.1LSB隐写
png照片 喂随波逐流 获得藏得一段信息 像Base64但不是 考虑换表
试LSB隐写 获得那个“表”
虽然爆0 但是还是能获得一些经验嗯嗯
加密但没有额外信息 考虑伪加密
放进010 修复伪加密 把修复后的照片放进kali
用zsteg看 但是一开始报错结果告诉我没找到文件 也就是说1.png不在~目录里
find / -name "1.png" 2>/dev/null查找图片位置
会得到图片位置假设是kkk
下一步把图片放进~目录 操作是mv kkk ~/OK了
zsteg 1.png即可获得
在比赛过程中 这是第一次诶诶 出现的问题很多
1.提前检查工具是否可用 这次在比赛前十分钟下载了一个盗版的语雀 结果就是误下了一个360…同时把我的随波逐流和Archpr都卸载了
2.随波逐流可能会掉数据 比赛也尽量不用 后面掉一点 如果发现获得的flag不完整 检查 不依赖一把梭 只有010和stegsolve的数据是绝对完整的 kali命令行的zsteg也会掉一定数据
3.re手可以做一定的密码题
RecoverWallet Can you recover the flag wallet(ethereum)? You need to know BIP-39. Flag is the account address that wrapped by DASCTF{}.
1 2 Mnemonic: ankle assume estate permit (???) eye fancy spring demand dial awkward hole Ethereum Address: 0x**********************************700f80
以太坊钱包地址恢复 结合BIP-39助记词标准和以太坊地址派生流程
12个助记词 第五个缺失
目标是找到那个缺失的词,使得派生出的以太坊账户地址是
0x**********************************700f80
flag格式是DASCTF{完整的以太坊地址}
已知使用标准路径m/44'/60'/0'0/0
BIP-39是什么
BIP-39是比特币改进提案,用于将随机熵转换为人类可读的助记词。(通常是12、18、24个单词)。这些助记词用于恢复HD钱包
BIP-39英文单词表是固定的2048个单词
https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt
下载english.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 from bip32utils import BIP32Key, BIP32_HARDEN from eth_account import Account import hashlib import hmac # BIP-39 英文单词表(2048 words) # 来源: https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt with open("bip39_words.txt", "r") as f: WORDLIST = [word.strip() for word in f.readlines()] # 如果你没有文件,也可以直接硬编码(这里为了简洁,假设你有文件) # 或者你可以从在线资源复制,但注意版权。CTF 中通常允许。 def mnemonic_to_seed(mnemonic, passphrase=""): """根据 BIP-39 生成 seed""" return hashlib.pbkdf2_hmac('sha512', mnemonic.encode('utf-8'), ('mnemonic' + passphrase).encode('utf-8'), 2048) def derive_eth_address(seed): """从 seed 派生以太坊第一个地址 (m/44'/60'/0'/0/0)""" # BIP-44 path: m/44'/60'/0'/0/0 root_key = BIP32Key.fromEntropy(seed) acct = root_key.ChildKey(44 + BIP32_HARDEN) \ .ChildKey(60 + BIP32_HARDEN) \ .ChildKey(0 + BIP32_HARDEN) \ .ChildKey(0) \ .ChildKey(0) private_key = acct.PrivateKey() account = Account.from_key(private_key) return account.address.lower() # 返回小写地址 def is_valid_mnemonic(mnemonic): """简单校验:尝试生成 seed,如果失败则无效(bip32utils 不严格校验 checksum)""" try: words = mnemonic.split() if len(words) != 12: return False # 更严格的校验:计算 entropy 和 checksum # 这里我们依赖后续能否生成地址,但最好做 checksum 校验 # 我们手动实现 BIP-39 checksum 验证 indices = [] for word in words: if word not in WORDLIST: return False indices.append(WORDLIST.index(word)) # 转为二进制熵+checksum bits = ''.join(format(idx, '011b') for idx in indices) if len(bits) != 132: # 12 * 11 = 132 return False entropy_bits = bits[:128] checksum_bits = bits[128:] # 计算 entropy 的 SHA256,取前 4 bit 作为 checksum entropy_bytes = int(entropy_bits, 2).to_bytes(16, 'big') hash_bytes = hashlib.sha256(entropy_bytes).digest() computed_checksum = format(hash_bytes[0], '08b')[:4] return computed_checksum == checksum_bits except: return False def main(): known = ["ankle", "assume", "estate", "permit", None, "eye", "fancy", "spring", "demand", "dial", "awkward", "hole"] target_suffix = "700f80" count = 0 for candidate in WORDLIST: known[4] = candidate mnemonic = " ".join(known) # 第一步:快速校验助记词合法性(checksum) if not is_valid_mnemonic(mnemonic): continue # 第二步:生成 seed try: seed = mnemonic_to_seed(mnemonic) except: continue # 第三步:派生以太坊地址 try: addr = derive_eth_address(seed) except Exception as e: continue # 第四步:检查是否匹配 if addr.endswith(target_suffix): print(f"[+] Found! Mnemonic: {mnemonic}") print(f"[+] Address: {addr}") print(f"[+] FLAG: DASCTF{{{addr}}}") return count += 1 if count % 1000 == 0: print(f"Tried {count} candidates...") print("[-] Not found.") if __name__ == "__main__": main()
pip install bip32utils eth-account
1 2 3 4 5 python flag.py [+] Found! Mnemonic: ankle assume estate permit gallery eye fancy spring demand dial awkward hole [+] Address: 0x7e93e8eeeee122abf300904ebc446d31d8700f80 [+] FLAG: DASCTF{0x7e93e8eeeee122abf300904ebc446d31d8700f80} PS C:\Users\13964\Desktop\bip>