TGCTF2025 WP
AAAAAAAA·真·签到
观察发现,每个字母依次移位了-1、0、1、2……
写脚本循环移位(忽略特殊字符)
c = 'UGBRC{RI0G!O04_5C3_OVUI_DV_MNTB}'
flag=''
count = -1
for i in c:
if i.isalpha():
print(i+" "+str(ord(i))+" "+str(count)+" "+chr(ord(i)+count))
flag+=chr(((ord(i)+count)-ord('A'))%26+ord('A'))
else:
flag+=i
count=count+1
print(flag)
TGCTF{You_caught_up_with_time!}
next is the end
发现是嵌套压缩包,直接解压出来(还好不是压缩包炸弹
用everything搜索直接看到flag

flag{so_great!}
where it is(osint)
截取校门那块,百度识图

发现是
台北市立内湖高级工业职业学校

百度搜一下找到站台名

TGCTF{港墘站}
你的运气是好是坏?
好臭的数字
TGCTF{114514}
这是啥o_o
发现是gif文件
分解帧发现疑似有汉信码,但是ps技术不行,没拼出来
最后发现flag在帧间隔,用puzzlesolver解帧间隔

用python转ascii
a = ['840', '710', '670', '840', '700', '1230', '890', '1110', '1170', '950', '990', '970', '1170', '1030', '1040', '1160', '950', '1170', '1120', '950', '1190', '1050', '1160', '1040', '950', '1160', '1050', '1090', '1010', '330', '1250']
for i in a:
print(chr(int(i)//10),end="")
TGCTF{You_caught_up_with_time!}
TeamGipsy&ctfer
狂按ESC键进到GRUP里面,加一个single

成功进入终端

发现用户桌面有个mimi.txt

是history历史操作,对docker有操作,目前终端docker没有启动,passwd改一下用户的密码,exit退出single模式进入系统,方便操作
docker image list只有个mysql的镜像,其他的应该是被删了
于是猜想flag应在在docker镜像的目录里面
由于没学过docker的文件结构
直接grep搜索找一下flag,注意sudo
grep -r CTF{ /var/lib/docker
有了
注意0和O的区别
HZNUCTF{0H!_YOu_are_really_the_TeamGipsy_ctfer}
ez_zip
爆破密码

解压后发现有个压缩包和一个txt文件,怀疑是明文攻击,但是txt文件的大小又不一样
根据txt文件名,sh512,怀疑是需要先sha512一下
明文攻击


解压得到一个flag压缩包,但是flag压缩包解压出错
观察一下,发现文件名的长度有问题,修改一下
010中没有没有看到明文flag,但是压缩算法却为store,这里修改为DEFLATE

然后就可以正常解压了,忽略解压报错。
TGCTF{Warrior_You_have_defeated_the_giant_dragon!}
你能发现图中的秘密吗?
第一张图拖到随波逐流梭哈发现是lsb隐写

key=i_1ove_y0u
flag2在图片左上角

flag2=_attentive_and_conscientious}
用tweak打开另一张图,发现后面有一大块数据,猜测有隐写

复制出来,并且补全文件头文件尾

可以正常打开,但是显示有问题,使用puzzlesolver爆破一下宽高

得到flag

flag{you_are_so_attentive_and_conscientious}
mm不躲猫猫
用脚本在factor批量查因数,发现都查不到
于是想到可能有公因数
chatgpt梭哈
from math import gcd
from collections import defaultdict
# 用于存储哪些 n_i 和 n_j 有公因数
shared_factors = defaultdict(list)
moduli = [n for n, _ in rsa_data]
# 遍历所有组合,找出有非平凡公因数的
for i in range(len(moduli)):
for j in range(i + 1, len(moduli)):
g = gcd(moduli[i], moduli[j])
if 1 < g < min(moduli[i], moduli[j]):
shared_factors[g].append((i, j))
# 输出找到了多少组有公因数的 n,以及示例
len(shared_factors), list(shared_factors.items())[:3] # 只展示前3个因数和其对应的 (i, j) 组合
from Crypto.Util.number import long_to_bytes, inverse
# 选择第一个公因子和其对应的 (i, j) 下标组合
first_shared_prime = list(shared_factors.keys())[0]
related_indices = set()
for pair in shared_factors[first_shared_prime]:
related_indices.update(pair)
# 对这些 index 的 (n, c) 解密
plaintexts = []
for idx in related_indices:
n, c = rsa_data[idx]
p = first_shared_prime
q = n // p
phi = (p - 1) * (q - 1)
try:
d = inverse(e, phi)
m = pow(c, d, n)
pt = long_to_bytes(m)
plaintexts.append((idx, pt))
except ValueError:
continue # 有些可能 phi 不可逆(理论上不会),跳过
# 展示前几段明文
plaintexts[:5]

TGCTF{ExcePt10n4lY0u_Fl4gF0rY0u_555b0nus}
宝宝rsa
观察发现flag有两端,而且都是分开的没有共用epq什么的
第一个的e很小,可以爆破,得到
TGCTF{!!3xP_Is_S
第二个的e也很小, 密文也很小,猜测是小e攻击
m@ll_But_D@ng3r0}
chatgpt解题脚本如下
from Crypto.Util.number import inverse, long_to_bytes, isPrime
import math
# Given values
p1 = ... # provided p1
q1 = ... # provided q1
c1 = ... # provided c1
# Calculate n1 and phi
n1 = p1 * q1
phi = (p1 - 1) * (q1 - 1)
# Function to find possible e1 values
def find_possible_e1(phi):
possible_e1 = []
# Check 18-bit primes first (131072 to 262144)
for e in range(131072, 262144):
if isPrime(e) and math.gcd(e, phi) == 1:
possible_e1.append(e)
# Check 17-bit primes (65536 to 131072)
for e in range(65536, 131072):
if isPrime(e) and math.gcd(e, phi) == 1:
possible_e1.append(e)
return possible_e1
# Find possible e1 values
possible_e1 = find_possible_e1(phi)
# Try each possible e1
for e1 in possible_e1:
try:
d1 = inverse(e1, phi)
m1 = pow(c1, d1, n1)
flag_part = long_to_bytes(m1)
# Check if the decoded message looks like a flag (e.g., starts with 'flag{')
if b'TGCTF{' in flag_part:
print(f"Found e1: {e1}")
print(f"Flag part: {flag_part}")
break
except:
continue
小e攻击使用工具梭哈

费克特尔
用factordb解,发现有多个因数

梭哈



浙公网安备 33010602011771号