TExcelTAD
Home › Security Projects, Study Plan, Certifications & Careers › Mini Project: The Capstone Report

Mini Project: The Capstone Report

The capstone's last deliverable is the one the client actually reads: the report. This mini project finishes the Lab Library assessment. You add one more finding yourself, keep the findings as data, generate the report's summary and overview from that data so the numbers can't drift, write the finding details and the recommendations by hand, check the whole thing against the rubric, and pass it through the publishing gate if it is going into your portfolio. The structure follows the penetration-test report of the Penetration Testing course; the content is yours.

Step 1: add finding F8 yourself

Capstone 2's third practice question pointed at a gap: /login has no rate limit. Turn it into a finding the way the other seven were made:

  1. Check. Add a check to the Capstone 2 harness that sends 20 wrong passwords for alice and expects a 429 (or a lockout message) before the twentieth. It fails on both builds.
  2. Score. Unauthenticated, network, no interaction; the direct impact is that passwords can be guessed online: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N, 5.3 Medium. Map it to A07:2025 (authentication failures).
  3. Fix. A counter per account and per source address in the app (a dictionary of timestamps is enough for the lab), returning 429 after, say, five failures in five minutes; then rerun the harness. If you don't implement it, the finding stays open, and the report says so.
  4. Detection. Bursts of failures per account and per source; the brute-force lab shows how to choose the window and thresholds.

Step 2: findings as data, summary from data

A report's summary and its tables disagree more often than anyone admits ("three high findings" in the summary, four in the table). Generating them from one list of findings prevents that. The script holds all eight findings, with F8 still open, prints the summary and the overview table in Markdown, and then checks each finding against the rubric:

python · try it yourself
from collections import Counter

FINDINGS = [  # id, title, score, severity, OWASP 2025, evidence, fix, detection, retest
    ("F6", "Debug endpoint leaks the session signing key", 9.1, "Critical", "A02",
     "GET :9090/debug returned the signing key; a forged admin cookie read loan 3",
     "remove the endpoint from production builds; rotate the key", "requests to 9090; old-key sessions", "fixed"),
    ("F1", "SQL injection in book search", 7.5, "High", "A05",
     "q=zzz' UNION SELECT name, pw FROM users-- listed users and hashes",
     "parameterised query; generic errors", "SQL keywords in q; 500s on /search", "fixed"),
    ("F3", "Path traversal in /download", 7.5, "High", "A01",
     "file=../config/app.env returned the configuration", "normalise, then require public/",
     "'..' in file=; 403s", "fixed"),
    ("F4", "Reflected XSS in search", 6.1, "Medium", "A05",
     "q=<script>alert(1)</script> echoed unescaped", "escape output; CSP", "script tags in q; CSP reports", "fixed"),
    ("F5", "Unsalted SHA-256 password hashes", 5.9, "Medium", "A04",
     "code review: hashlib.sha256(pw)", "scrypt with per-user salt; rehash at login", "", "fixed"),
    ("F2", "IDOR on /api/loans", 4.3, "Medium", "A01",
     "alice read bob's loan 2", "owner check in the query", "many loan ids per session", "fixed"),
    ("F8", "No rate limit on /login", 5.3, "Medium", "A07",
     "20 wrong passwords for alice, no 429 or lockout", "per-account and per-source limits",
     "failure bursts per account and source", "not fixed"),
    ("F7", "Missing CSP; cookie without HttpOnly/Secure/SameSite", 3.1, "Low", "A02",
     "Set-Cookie: session=...; Path=/", "security headers; cookie flags", "header scan in CI", "fixed"),
]

findings = sorted(FINDINGS, key=lambda f: -f[2])
counts = Counter(f[3] for f in findings)
lines = ["# Security assessment: Lab Library (fictional client, lab build)", "",
         "## 1. Executive summary", "",
         f"{len(findings)} findings: " + ", ".join(f"{counts[s]} {s.lower()}" for s in
                                              ("Critical", "High", "Medium", "Low") if counts[s]) + ".",
         f"Most serious: {findings[0][1]} ({findings[0][3]}, {findings[0][2]}).",
         f"Retest: {sum(f[8] == 'fixed' for f in findings)} of {len(findings)} fixed.", "",
         "## 2. Findings overview", "", "| ID | Title | CVSS | Severity | OWASP | Retest |", "|---|---|---|---|---|---|"]
lines += [f"| {f[0]} | {f[1]} | {f[2]} | {f[3]} | {f[4]}:2025 | {f[8]} |" for f in findings]
print("\n".join(lines))

print("\nself-check against the rubric:")
for f in findings:
    missing = [name for name, value in zip(("evidence", "fix", "detection"), f[5:8]) if not value]
    if missing or f[8] != "fixed":
        note = f"missing {', '.join(missing)}" if missing else ""
        note += ("; " if note and f[8] != "fixed" else "") + ("open: retest pending" if f[8] != "fixed" else "")
        print(f"  {f[0]}: {note}")
# Security assessment: Lab Library (fictional client, lab build)

## 1. Executive summary

8 findings: 1 critical, 2 high, 4 medium, 1 low.
Most serious: Debug endpoint leaks the session signing key (Critical, 9.1).
Retest: 7 of 8 fixed.

## 2. Findings overview

| ID | Title | CVSS | Severity | OWASP | Retest |
|---|---|---|---|---|---|
| F6 | Debug endpoint leaks the session signing key | 9.1 | Critical | A02:2025 | fixed |
| F1 | SQL injection in book search | 7.5 | High | A05:2025 | fixed |
| F3 | Path traversal in /download | 7.5 | High | A01:2025 | fixed |
| F4 | Reflected XSS in search | 6.1 | Medium | A05:2025 | fixed |
| F5 | Unsalted SHA-256 password hashes | 5.9 | Medium | A04:2025 | fixed |
| F8 | No rate limit on /login | 5.3 | Medium | A07:2025 | not fixed |
| F2 | IDOR on /api/loans | 4.3 | Medium | A01:2025 | fixed |
| F7 | Missing CSP; cookie without HttpOnly/Secure/SameSite | 3.1 | Low | A02:2025 | fixed |

self-check against the rubric:
  F5: missing detection
  F8: open: retest pending

The summary counts, the most serious finding and the retest line all come from the same list as the table. The self-check finds two things to deal with before the report goes out. F8 is open: the report must say so plainly, with the recommended fix and its priority, rather than letting the "7 of 8" pass unremarked. F5 has no detection: that is honest (there is no runtime signal for weak password storage), but an empty field looks like an omission; write "not detectable at runtime; found by code review; add a check on the stored hash format" instead.

Step 3: write the report

Use this template. The parts in angle brackets are yours; sections 1 and 2 come from the script.

text
# Security assessment: Lab Library (fictional client, lab build)
Version, date, author; classification: lab exercise, synthetic data

1. Executive summary                 (half a page, for a non-specialist)
   What was tested and why; the overall risk in one sentence;
   the 3 most important actions, in order; retest status.
2. Findings overview                 (generated table: ID, title, CVSS, severity, OWASP, retest)
3. Scope and method
   Rules of engagement (from Capstone 1), deployment assumption,
   test accounts, tools, dates, what was not tested and why.
4. Finding details                   (one block per finding, most severe first)
   F6 <title>
   Severity and CVSS v3.1 vector (and v4.0 if requested), with the reason
   for any arguable metric
   Description: what is wrong, in two or three sentences
   Evidence: the request and the relevant part of the response (secrets described, not copied)
   Impact: what an attacker could do, and any chain with other findings (F3 -> F6)
   Fix: the change, with code where useful
   Detection: what the client's logs or monitoring would show
   Retest: date, result
5. Recommendations beyond the findings
   e.g. access logging (none existed), CI checks for headers and dependencies,
   secrets out of config files, a review before each release.
Appendix: recon notes, the harness and how to run it.

Three things separate a good report from a list of tool output: the executive summary that a manager can act on without reading further; the chains (F3 and F6 lead to the same key, F1 and F5 together expose passwords), which change priorities; and recommendations beyond the findings, the systemic causes (no logging, no review, secrets in files) that would produce the next seven findings.

Rubric

The common project rubric, applied to the capstone:

Criterion Weight 3 = excellent
Scope and safety 15 % rules of engagement written first; everything on 127.0.0.1 or lab addresses; no secret copied into the report
Technical work 30 % all eight findings confirmed by a check, root cause shown in the code, CVSS vectors justified
Detection 15 % every finding has a detection or an explicit reason why none exists; recon's own visibility discussed
Fix and retest 20 % fixes implemented in the code, retest run, open findings stated as open
Write-up 20 % executive summary usable alone; tables generated from data; chains and systemic recommendations present

Checklist before you hand it in

  • Every number in the summary matches the table (generated, not typed).
  • Every finding: vector, evidence, impact, fix, detection, retest.
  • Open findings are marked open, with a priority.
  • The leaked key and the password hashes are described, not reproduced.
  • The report passes the publishing gate if it goes public.
  • Someone who was not there can follow section 3 and reproduce section 4.

Test yourself

Why generate the summary and the findings table from one list?

  1. It is faster to type
  2. So the counts in the summary can never disagree with the table
  3. Clients require Python
  4. To hide open findings

What CVSS v3.1 score does F8 (no rate limit on login) get with AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N?

  1. 3.1
  2. 4.3
  3. 5.3
  4. 7.5

The self-check flags F5 for a missing detection. What is the right response?

  1. Delete F5
  2. Invent a log signature
  3. State that it is not detectable at runtime and how it is found instead (code review, a stored-format check)
  4. Leave the field empty

Which part of the report should a manager be able to act on without reading anything else?

  1. The appendix
  2. The executive summary
  3. The CVSS vectors
  4. The recon notes