目录
WEB
ez_js
游戏题一般找js
Crypto
cat's gift
1 - 1/3 + 1/5 - 1/7 + … 是求Π/4 近似值的c语言算法 分成4份,所以是派(pie)
CatCTF{pie}
盖茨比
先看原题
from Crypto.Cipher import AES
from Crypto.Util.strxor import strxor as xor
from Crypto.Util.Padding import pad
from random import *
from base64 import *
from copy import copy
from secret import data
iv=bytes([randint(0,2**8-1) for i in range(16)])
iva=copy(iv)
key=bytes([randint(0,2**8-1) for i in range(16)])
cipher=AES.new(key,mode=AES.MODE_ECB)
data=pad(data,16)
c=b""
for i in range(0,len(data),16):
s=data[i:i+16].ljust(16,b"\n")
c+=cipher.encrypt(xor(s,iv))
iv=xor(s,c[-16:])
key=b64encode(key)
c=b64encode(c)
print(key)
print(c)
"""
b'+0zkhmid1PFjVdxSP09zSw=='
b'A0bzFxdM95YoXm64g0gZkiTloPsBAq7iV56t1M7Q4zVNxRJSTdZH0lzOMa7QyIQbKN/ftm01iZgQAk+JVgCB6hlCdMPWkdpKYHix8BTq/ClEHUPwMEjUEvgKD4tH3T/thoccBw1jfJ9RjhXbMFByWn5cyA/gHVvEEJRpII/ryKMQkzelioQ5b0MfhSy4INLqQk6yAgLzihip5ho7lDJCbYcaz85bDksOo5n9kjOfjFnjUn9G7jX+AtyhygPlGfrvauTeuPdVxqrJTVHvrzUNAqiqtCElX+BWpicP2mkZLt5B/gpquTv8U+StrdTOcr7UkWuz+YdhXkTJYUZguv7EbEnRy+M64QzqfnNf8Zk0tJQ5xOumbY8hxGTuZ8w3rWxjPKLhdgTGLgMcMYF3hPb2eqG9VZKC3T9zElI5MWPyIdkmqkrLEt6vGT8AxWJy1hl2ApkGhrJFB0DobJircN6kXUXvZXitjXSH+BA48muaRlAwK13re+zIcbI+B7+Tm3LuRT9j5NWD9RBoy+IeAQvR05IKWqEpqXEScmZsQxpAFZCSnbchYaYNAuHvBwMcMW7vTMyxROHRtyZ+gWNUhpd8CcZ9FA6w+cwQLMWW5D4nUCMK+NEsSyTBBm/jTiAp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+HXMeFa/Qb452+KKEjq7vRthC4hH9gluaYMl/eXboQvvVu4xDhfVW403enI7sxdMR3t2WO1cOaLE8IN5c71W+IqhaRbJ/Prlo/pk/XAtMvimZxIN4y5/oP5vQ/lCt5jM9wAtPKSoQbJxWIYWNrXVfkZUOOwD2tlOmyxMCcKFr8921JHgtWqcYliElNX19hzmYhow+19EV3zhITzsGOX/PP1BHIKz/NJyKcGqx1hlfrDfDVedhJWkQL9sg4clbfguprs3KG5YNbbjclaK9JoEboBY3EGBGHtsWfmIRAREwy1a53y/a/NUDLaQxrMsyV/YnbiyBevGjMVNnqIY5T0YtPLL/s5Wvmq7EU9qoMDIlaosCf616TagcZalGFQumL15q6wx3FxwVB5EAjFa/MKnZNc0CqbFhXgEevp1ZXRnjEAdSK99gyAmwVawWpxIWXZQvQ5w7tIQ+nF8utoG4ab/AdLbZyKCtT8pxjiHifNcCCkLfew8Qq9S2JnrhCUMs9SEiRrLZHiE9JVlwbUJzAQjCM6G4tdeLNEApqDv4eZ7zh2U9K2+Gk9OjBgSk5xMjRkCzKCrNAKgRLoJ1Gu8L4T9LSBp1juhUsyaIaK'
"""
这段代码实现了对明文数据进行加密,并使用了 AES 加密算法,使用了 ECB 模式。
它先生成了一个 16 字节的随机密钥和一个 16 字节的随机初始化向量 (IV)。然后使用这个密钥和 IV 初始化一个 AES 加密器。接着,它对明文数据进行补齐,使其长度是 16 的倍数,并将明文分块。每一块都使用相同的密钥进行加密,但是使用的 IV 是加密的前一块的输出与当前块的异或。
最后,将加密的密钥和密文进行 base64 编码,并输出。
exp:
from Crypto.Cipher import AES
from Crypto.Util.strxor import strxor as xor
from string import printable
from base64 import b64decode
from Crypto.Util.number import *
# 将密钥和密文 base64 解码
key = b64decode(b'+0zkhmid1PFjVdxSP09zSw==')
ciphertext = b64decode(b'A0bzFxdM95YoXm64g0gZkiTloPsBAq7iV56t1M7Q4zVNxRJSTdZH0lzOMa7QyIQbKN/ftm01iZgQAk+JVgCB6hlCdMPWkdpKYH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qDv4eZ7zh2U9K2+Gk9OjBgSk5xMjRkCzKCrNAKgRLoJ1Gu8L4T9LSBp1juhUsyaIaK'
)
cipher=AES.new(key,mode=AES.MODE_ECB)
c2 = [ciphertext[i:i+16] for i in range(0,len(ciphertext),16)]
xor_s = []
xor_iv = b''
for ciphertext in c2:
xor_s.append(cipher.decrypt(ciphertext))
s = b''
tiv = b'\xd4\x5d\x47\xaf\x96\xc5\xde\x2d\x96\x51\x6d\xf5\x3e\xe9\x30'
for j in [0x99]:
iv = tiv+long_to_bytes(j)
trycry = ''
for i in range(len(xor_s)):
s = xor(xor_s[i], iv)
iv = xor(s, c2[i])
try:
trycry += s.decode()
if trycry[-1] not in printable:
break
trycry += ''
except:
break
if 'flag' in trycry: #查找关键字flag
print(trycry)
#flag{This's_why_PCBC_is_not_living}
Misc
CatCat
弟弟我出的烂题捏
图片010打开检索password出密码 catflag
然后rabbit密码解密,密钥为catflag
然后base91解码
最后Ook解码
MeowMeow
010打开
CatCTF{CAT_GOES_MEOW}
Cat_Jump
010打开检索(非预期)
CatCTF{EFI_1sv3ry_funn9}
miao~
foremost分离出一个音频
Audacity打开
得到key:CatCTF
DeepSound打开
~呜喵喵喵喵呜呜啊呜啊呜喵呜呜~喵啊喵啊喵啊呜喵呜~~~喵~呜喵啊喵啊喵喵喵呜呜~呜~呜喵呜呜啊啊~呜啊喵啊呜喵呜呜啊~喵~呜呜喵喵~喵喵喵呜呜呜喵~呜喵呜呜啊~呜啊啊喵啊呜喵呜呜喵~喵~呜喵呜~~喵喵喵呜啊呜啊喵呜喵呜呜啊~呜啊啊喵啊呜~啊喵~~喵~呜呜喵喵喵喵喵喵呜啊呜呜~呜喵呜呜~喵~喵啊喵啊呜~~啊啊~喵~呜呜喵喵啊喵喵喵呜呜呜呜~呜喵呜呜~呜啊~啊喵啊呜~~啊啊~喵~呜呜喵喵呜喵喵喵呜啊喵呜喵呜喵呜呜啊呜啊啊啊喵啊呜喵喵呜啊~喵~呜喵呜喵喵喵喵喵呜啊喵喵呜呜喵呜呜~喵~啊啊喵啊呜~~啊啊~喵~呜喵呜~啊喵喵喵呜呜~喵啊呜喵呜呜啊啊呜喵啊喵啊呜~呜~喵~喵~呜呜喵喵喵喵喵喵呜啊喵喵啊呜喵呜呜~呜呜呜啊喵啊呜喵呜啊喵啊
CatchCat
打开是GPS数据
GPS路径可视化
CatCTF{GPS_M1ao}
Peekaboo
一个一个试,试出来是百里玄策(其实我试过已经汉信码扫题目里面QQ空间的码,找到了一个博客和其他英雄的台词,但是试过都不对,手机也没下王者荣耀,唯有出此下策了捏)
CatFlag
丢linux直接cat flag
Nepnep 祝你新年快乐啦!
REVERSE
The cat did it
0~100尝试,必出,结果 0%就出了 (
经典非预期
CatCTF{9f1ef07877f9d85a82bd500f408b4814}
鼠鼠web太菜了捏,就出了一道签到呜呜呜
下面是我滚去复现的web题
EasyBypass
比赛的时候看到登录框就想到可能是越权之类的,操作了一番无果就放弃了
一看wp才知道,呜呜呜太菜了
题目提示了flag在flag.html
目录穿越:目录穿越_lnterpreter的博客-CSDN博客
访问 ../flag.html 可以穿越到根目录读取flag.html文件
非预期:【CatCTF2023-Web-ezbypass-华夏ERP认证授权绕过漏洞利用-哔哩哔哩】 https://b23.tv/wupuKXN 这个师傅讲得很好捏
华夏ERP漏洞之授权绕过漏洞+后台命令执行漏洞=未授权命令执行_黑客技术 (hackdig.com)
师傅tql,Orz
wife
又是一个登录框,发现可以注册,但是管理员登录要邀请码
听说有老哥爆破出来了Orz
这里不是管理员登录只能得到一张图片,应该是管理员登录就能拿flag了
题目上了一个hint:后端某处采用了 Object.assign()
参考:JavaScript原型链污染原理及相关CVE漏洞剖析 - FreeBuf网络安全行业门户
污染 __proto__.isAdmin 为 true 就可以在注册时验证为admin
登录:
另外的题目有点难,呜呜呜,太菜了
每日emo:
最是人间留不住,朱颜辞镜花辞树 --王国维