#Why this matters
Solving an expert CTF challenge once inside a cluttered terminal does not prove you understand the vulnerability or that another engineer can reproduce your result. In real incident response, penetration testing, and team competitions, findings only become useful when someone else can verify the evidence, re-run the proof of concept, and understand the root cause without guessing missing steps.
A capstone simulation combines technical triage under uncertainty with engineering discipline. You must preserve raw forensic or web artifacts, avoid duplicating existing challenge records in shared repositories, and deliver a Markdown writeup that replays cleanly from scratch.
#Capstone triage and evidence isolation
When starting an unsolved expert-tier task, separate immutable evidence from your working experiments. In forensics (raqamli-izquarlik) and multi-category misc challenges, opening an image or archive directly with editing tools can alter timestamps, metadata, or compressed headers.
- IngestHash raw artifacts with sha256sum
- Check IndexSearch Git for existing challenge record
- IsolateWork inside a clean copy or branch
- VerifyReplay final script in a fresh directory
Begin every capstone session with four lightweight checks:
- Record baseline hashes: Compute
sha256sumon every downloaded file before extracting or mounting it. - Search before creating: Check the repository index and
git logso you extend an existing record instead of creating a duplicate folder. - Timebox dead ends: After 25-30 minutes on one hypothesis without progress, log what you ruled out in a short negative-result note and pivot.
- Keep raw vs. derived files apart: Store untouched inputs in
artifacts/(read-only) and place extracted files or scripts inwork/.
$ sha256sum artifacts/capture.pcapng artifacts/app.tar.gz
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 artifacts/capture.pcapng
4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a artifacts/app.tar.gz
$ git grep -i "vault-audit" challenges/
$ git status -sb
## main...origin/mainIf git grep returns an existing entry, read its notes first. You may discover a teammate already decoded part of the traffic or disproved a tempting false lead.
#Canonical challenge records in Git
Teams and security knowledge bases break down quickly when analysts create duplicate records for the same challenge (vault-audit, vault-audit-2, vault-audit-final). Duplicate records split flags, scatter scripts, and hide prior root-cause notes.
Enforce a single canonical challenge record rule: one challenge slug maps to one directory and one primary README.md or writeup.md. When two team members find different solve paths for the same task, append an ## Alternate Solve Path section or place a linked script inside that same canonical folder rather than opening a second challenge entry.
| Practice | Fragile habit | Canonical discipline |
|---|---|---|
| Record naming | task1-new, task1-v2, misc-copy |
Single slug challenges/<event>/<slug>/writeup.md |
| Alternate solves | New folder with copied artifacts | Section or linked script under the existing record |
| Artifact storage | Large binaries re-committed twice | Hash-verified reference or single tracked archive |
| Merge conflicts | Overwriting teammate triage notes | Feature branch per update, fast-forward or clean merge |
#Anatomy of a reproducible Markdown writeup
A strong writeup reads like an engineering postmortem, not a stream-of-consciousness chat log. Anyone holding the original challenge archive should be able to read your document and reproduce the flag within minutes.
Structure every capstone writeup with these core sections:
- Metadata header: Challenge title, category, target lab endpoint (such as
http://lab.local:8080), artifact SHA-256 digests, and tool/runtime versions (Python 3.11,Git 2.43). - Root cause summary: Two to four sentences explaining why the vulnerability existed, not just which command worked.
- Step-by-step reconstruction: Numbered commands, exact offsets or HTTP requests, and key output snippets showing how each clue led to the next.
- Self-contained solve script: One runnable script with no hardcoded home-directory paths, expired cookies, or unrecorded manual clicks.
- Verification and remediation: Expected output when re-run, plus concrete engineering fixes.
# Challenge: vault-audit (veb-tahlil / raqamli-izquarlik)
- **Artifact SHA-256:** `9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08`
- **Environment:** Python 3.11, curl 8.5, lab target `http://lab.local:8080`
- **Root Cause:** Backup archive leaked in PCAP exposed an unauthenticated admin header check.
## Reproduction
1. Extract the leaked endpoint path `/internal/export` from HTTP stream 4.
2. Run `python3 solve.py --url http://lab.local:8080` from a clean directory.
3. Confirm output prints the verification marker `FLAG{...}`.
## Remediation
Remove debug exports from production builds and enforce server-side session validation.#Clean-room replay and verification
Before declaring a capstone task complete, run a clean-room replay. Copy only the original artifacts (verified by SHA-256) and your solve.py or shell script into a temporary directory, then execute the verification steps exactly as written in your Markdown file.
# Clean-room verification inside an isolated temporary directory
TMP_VERIFY=$(mktemp -d)
cp artifacts/capture.pcapng "$TMP_VERIFY/"
cp solve.py "$TMP_VERIFY/"
(
cd "$TMP_VERIFY" || exit 1
sha256sum -c <(echo "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 capture.pcapng")
python3 solve.py --input capture.pcapng --target http://lab.local:8080
)
rm -rf "$TMP_VERIFY"If solve.py fails inside $TMP_VERIFY, you have caught a hidden dependency: an environment variable, a leftover temporary file, or a missing Python package that was not documented. Fix the script or add requirements.txt before committing to Git.
#Common mistakes and defensive takeaways
- Duplicating existing records: Creating
task-finalortask-altdirectories fragments knowledge. Always check existing slugs and hashes first, then update or extend the canonical record. - Mutating original artifacts: Running repair tools or editors directly on the sole copy of a disk image or PCAP destroys forensic chain of custody. Work on copies and keep baseline SHA-256 digests.
- Screenshots instead of text: Images of terminal windows cannot be searched with
git grep, copied by defenders, or diffed in code review. Always record exact commands and text outputs. - Undocumented state: Relying on an old browser cookie or hardcoded
/home/user/ctf/...path breaks reproducibility. Verify from a fresh directory. - Committing secrets: Pushing real API keys, competition server credentials, or unredacted internal hostnames into Git history creates persistent exposure even after a later commit deletes them.
#Summary
- Capstone simulations test both technical triage and reproducible engineering documentation.
- Hash raw artifacts first, isolate working files from evidence, and log disproven hypotheses to avoid wasted effort.
- Never duplicate existing challenge records: maintain one canonical slug per challenge in Git and attach alternate solves to it.
- Validate every Markdown writeup with a clean-room replay in an empty directory before committing.