Post

Spooky CTF 2026 — Web Challenge writeups

Spooky CTF 2026 — Web Challenge writeups

Hello!

Today, I will tell you how I solved three web challenges step by step in spooky CTF.

Challenge 1: Hemophobia

Screenshot 1

I have to find something hidden in places like page source, storage session or something other paths like robots.txt. I opened the link.

Screenshot 2

The first thing I did is opening view:page-source because the text includes “Pages”.

Screenshot 3

I found something juicy: nightmare.txt and script.js. I focused on nightmare.txt first. I also noticed the flag is a band’s name.

Screenshot 4

Here, I didn’t go to spotify and I searched main keywords: “Roots Bloody Roots” in google. According to the text,

Screenshot 5

I submitted spooky{Sepultura} in challenge link: http://77.112.83.127.

Screenshot 6

Ok! I got flag. In this challenge, you can give a look around in script.js. For me, I didn’t need that.

Screenshot 7

I searched FLAG_HASH’s value in hashes.com and didn’t find the flag.

Challenge 2: Job Application

Screenshot 8

The challenge contains source code and I gave some time to it.

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
import os
import re
import secrets
from flask import Flask, render_template, request, redirect, url_for, session, flash

app = Flask(__name__)
app.secret_key = os.environ.get("SECRET_KEY", secrets.token_hex(16))
app.config["MAX_CONTENT_LENGTH"] = 6 * 1024 * 1024

FLAG = os.environ.get("FLAG", "spooky{NOT_THE_FLAG}")
ALLOWED_POSITIONS = {"developer", "security", "sysadmin", "data", "intern"}


@app.route("/", methods=["GET", "POST"])
def index():
    if request.method == "POST":
        name = request.form.get("name", "").strip()
        email = request.form.get("email", "").strip()
        phone = request.form.get("phone", "").strip()
        address = request.form.get("address", "").strip()
        position = request.form.get("position", "").strip()
        coverletter = request.form.get("coverletter", "").strip()
        resume = request.files.get("resume")

        if not all([name, email, phone, address, position, coverletter]):
            flash("Please fill out all required fields.")
            return redirect(url_for("index"))

        if position not in ALLOWED_POSITIONS:
            flash("Please select a valid position.")
            return redirect(url_for("index"))

        if resume and resume.filename:
            if not resume.filename.lower().endswith(".pdf"):
                flash("Your resume must be a PDF.")
                return redirect(url_for("index"))

            resume_data = resume.read(5 * 1024 * 1024 + 1)

            if len(resume_data) > 5 * 1024 * 1024:
                flash("Your resume must be smaller than 5 MB.")
                return redirect(url_for("index"))

            if not resume_data.startswith(b"%PDF-"):
                flash("The uploaded file is not a valid PDF.")
                return redirect(url_for("index"))

        valid_letter = re.match(
            r"^[A-Za-z0-9 .,!?'-]{1,40}",
            coverletter
        )

        if not valid_letter:
            flash("Your cover letter contains invalid characters.")
            return redirect(url_for("index"))

        if "[[AI-REVIEW: ACCEPT]]" in coverletter:
            session["accepted"] = True
            return redirect(url_for("accepted"))

        session.pop("accepted", None)
        return redirect(url_for("rejected"))

    return render_template("index.html")


@app.route("/rejected")
def rejected():
    return render_template("application-result.html")


@app.route("/accepted")
def accepted():
    if not session.get("accepted"):
        return redirect(url_for("rejected"))

    return render_template("application-accepted.html", flag=FLAG)


@app.errorhandler(413)
def file_too_large(error):
    flash("Your application is too large.")
    return redirect(url_for("index"))


if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5000)

I noticed two things: To get flag, the word “[[AI-REVIEW: ACCEPT]]” must be included in cover letter. But it must not start with ‘[‘.

1
2
3
4
valid_letter = re.match(
            r"^[A-Za-z0-9 .,!?'-]{1,40}",
            coverletter
        )

Here, it contains logic flaw. Above code means that in cover letter, you have to include any char in (A-Z, a-z, 0–9, .,!?’-) and character count is from minimum, 1 to maximum, 40. The functionre.match() only checks from the beginning of the string, and without a $ anchor at the end, it stops checking as soon as it gets a valid match. Since {1,40} only needs at least one allowed character (not all 40), words like “h” or “a” or “ab” can bypass. Once it hits [, it simply ignores the rest of the text.

[[AI-REVIEW: ACCEPT]] -> Fails

a[AI-REVIEW: ACCEPT]]) -> Passes

Screenshot 9

Screenshot 10

Challenge 3: Scopophobia

Screenshot 11

Screenshot 12

I first opened the link. You can look around how the application works but here, I directly dived into viewing source code.

Screenshot 13

I noticed two things: legacy and CAM-07. I called the route: http://18.189.35.130/legacy/ and it didn’t work.

Screenshot 14

I looked around the application and found something interesting. The url says cam-01. What about we change to cam-07?

Screenshot 15

Not Found! I noticed the source shows app.js file and I opened it.

Screenshot 16

It has nothing interesting. Now the url is http://18.189.35.130/feeds/active/cam-07 and we got 404. What about changing active to legacy?

Screenshot 17

Nice! We can go to next step.

Screenshot 18

I saw two paths: /feeds/service/ and /feeds/legacy/cam-07/frame/still. Now the url is http://18.189.35.130/feeds/legacy/cam-07 and I changed to /feeds/service/cam-07.

Screenshot 19

Okay. I struggled to find a way to go to next step for a couple of minutes. Then, I found a solution. The path is /feeds/legacy/cam-07/frame/still, right? I did URL manipulation.

Screenshot 20

Now, the separated clues combined to /feeds/service/sc-12.

Screenshot 21

I did to view page source.

Screenshot 22

I found another two paths: /feeds/mirror/ and /feeds/service/sc-12/frame/still. Here, I went to the next step using the previous way. I went to the path: /feeds/service/sc-12/frame first.

Screenshot 23

Then, I went to /feeds/mirror/cam-19 in URL.

Screenshot 24

Screenshot 25

The hint changes.

Sublevel imaging uses a three-letter directory alongside the other feeds.

Ok. I did /feeds/mirror/cam-19/frame first.

Screenshot 26

I saw the words: SUB LEVEL B — SLB — 04. SLB-04 seems alike previous words: cam-01, cam-19. So, the question is:

What is the word after feeds in URL?

It may be sub.

Screenshot 27

Ok. Here, I guessed ‘sub’ after feeds because it also contains “Sublevel imaging uses a three-letter directory” in the previous hint.

Screenshot 28

Finally, I got the flag. I think this challenge is not much difficult and the challenge author used a little trick, not depending on the web-application techniques like XSS, SSRF and LFI, etc… .

I hope you enjoy my writeups. Thanks for your time. Happy Hacking !!

This post is licensed under CC BY 4.0 by the author.