题目: I found this piece of paper on the floor. I was going to throw it away, but it somehow screamed at me while I was holding it?! 附件链接:https://pan.baidu.com/s/16vaGfjUMuxP6t2ilUrudaA?pwd=w9ij 解题: 使用Adobe Acrobat DC打开pdf,选择更多工具->JavaScript 文档级JavaScript->编辑 查看代码
x = 0 for e in enc: for c in chars: t = ord(c) ^ 283548893274 % (117 + x) ifchr(t) == chr(e): print(c, end='') x += 1
bcactf{InTerACtIv3_PdFs_W0W_cbd14436e6aea8}
My Brain Hurts
题目: My friend sent me a weird string and a “program” they wrote, although it doesn’t seem anything interpretable to me. Can you help me find out what they put through their program? script.txt
# 示例代码 bf_code = ",>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,>,<----<++++++<---------<++<-<+++++<-------<+++++++++<-------<----<---<++++<--<+++<+++++++<+++<+<++<---------------<+++++<-------<---<----.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>." m = r'^`Zheh|Ey7/r\b\T&6r/][j}'
d = string.printable instr = '' for i inrange(len(m)): for j in d: instr += j o = run_brainfuck(bf_code, instr) if o[:i + 1] == m[:i + 1]: print(instr) break else: instr = instr[:i]
for i inrange(len(enc)): print(chr(enc[i] ^ ord(key[i % 0x28])), end='')
bcactf{SYMmE7ric_eNcrYP710N_4WD0f229}
Flagtureiser
题目: Here’s a totally normal Minecraft mod (1.19.4, Forge) I’ve been making, check it out! (You do not need Minecraft to solve this challenge) 附件链接:https://pan.baidu.com/s/1Xq8ttjFGrKFAEasDstm99A?pwd=a08k 解压jar 使用idea打开 class文件 发现一段代码
for i in enc: for j in i: print(chr(j), end='') print()
bcactf{fRaCtur31s3R_sT8gE_z3R0}
web
Sea Scavenger
打开链接
查看源代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<main> <p>Explore the mysteries of the deep sea...</p> <ahref="/shark"><imgid="shark"src="/static/shark.png" alt="Shark Image"></a> <ahref="/squid"><imgid="squid"src="/static/squid.png" alt="Squid Image"></a> <ahref="/clam"><imgid="clam"src="/static/clam.png" alt="Clam Image"></a> <ahref="/shipwreck"><imgid="shipwreck"src="/static/shipwreck.png" alt="Shipwreck Image"></a> <ahref="/whale"><imgid="whale"src="/static/whale.png" alt="Whale Image"></a> <ahref="/treasure"><imgid="treasure"src="/static/treasure.png" alt="Treasure Image"></a> </main>
发现有6个链接,分别访问 /shark 源代码中
1 2 3 4 5 6 7 8 9 10 11 12 13
<body> <divclass="container"> <imgsrc="/static/shark.png"alt="Shark Image"> <divclass="riddle"> <p>Sharks swim really fast, especially through the HTML sea!</p> </div> <divclass="notFlagPartTrust"> <!-- You found the shark! Part 1 of the flag: "bcactf{b3" --> </div> <aclass="back-link"href="/">Back to the Depths of the Sea</a> </div> </body>
/squid 打开控制台得到一段
/clam
1 2 3 4 5 6 7 8 9 10 11 12
<body> <divclass="container"> <imgclass="clam-image"src="/static/clam.png"alt="Clam Image"> <divclass="riddle"> <p>Clams are shaped like a specific sweet treat when they are closed...</p> </div> <aclass="back-link"href="/">Back to the Depths of the Sea</a> </div>
<scriptsrc="/static/clam.js"></script> </body>
clam.js
1 2 3 4 5 6 7
document.cookie = "flag part 3:=dnt_f1n";
window.onbeforeunload = function () { document.cookie = "flag part 3:=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; };
console.log("Hint: how do websites remember you? Where do websites store things?")
/shipwreck
/whale
1 2 3 4 5 6 7 8 9 10 11 12
<body> <divclass="container"> <imgclass="whale-image"src="/static/whale.png"alt="Whale Image"> <divclass="riddle"> <p>Whales have many sources of food!</p> </div> <aclass="back-link"href="/">Back to the Depths of the Sea</a> </div>
<scriptsrc="/static/whale.js"></script> </body>
whale.js
1
// Part 5 of the flag: "e4sur3"
/treasure
bcactf{b3t_y0u_d1dnt_f1nd_th3_tre4sur3_t336e3}
NoSQL
题目: I found this database that does not use SQL, is there any way to break it?
app.listen(port, () => { console.log(`App server listening on ${port}. (Go to http://localhost:${port})`); });
解题: 正则绕过 通配 .*
bcactf{R3gex_WH1z_54dfa9cdba13}
Phone number
题目: I was trying to sign into this website, but now it’s asking me for a phone number. The way I’m supposed to input it is strange. Can you help me sign in? My phone number is 1234567890 解题:
js监听 禁止输入输入 控制台执行js代码进行输入
bcactf{PHoN3_num8eR_EntER3D!_17847928}
Tic-Tac-Toe
题目: My friend wrote this super cool game of tic-tac-toe. It has an AI he claims is unbeatable. I’ve been playing the game for a few hours and I haven’t been able to win. Do you think you could beat the AI? 题解:
print("Return format: (ciphertext, modulus)") print(encode()) sent = input("Did you recieve the message? (y/n) ") while sent == 'n': print(encode()) sent = input("How about now? (y/n) ") print("Message acknowledged.")
题目: We can’t speak French and just say what we see. We also don’t know what underscores are add them yourself. put ONLY the final decrypted cipher in bcactf{}, no intermediate steps key - vinegar cipher 0 - mmqaonv cipher 1 - seooizmt cipher 2 - bdoloeinbdjmmyg <- THIS ONE 解题: 维吉尼亚密码解密 解密的结果作为下一次的秘钥