@abdulr7man/pensieve 0.0.0-stage → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/LICENSE +684 -0
  2. package/README.md +180 -2
  3. package/VERSION +1 -0
  4. package/agents/README.md +16 -0
  5. package/agents/pensieve-code-auditor.md +58 -0
  6. package/agents/pensieve-mapper.md +46 -0
  7. package/agents/pensieve-planner.md +67 -0
  8. package/agents/pensieve-reconner.md +76 -0
  9. package/agents/pensieve-reporter.md +61 -0
  10. package/agents/pensieve-roe-checker.md +46 -0
  11. package/agents/pensieve-scoper.md +77 -0
  12. package/agents/pensieve-tester.md +83 -0
  13. package/agents/pensieve-validator.md +62 -0
  14. package/bin/pensieve +452 -0
  15. package/bin/pensieve-installer.cjs +5 -0
  16. package/commands/pensieve-close.md +6 -0
  17. package/commands/pensieve-map.md +6 -0
  18. package/commands/pensieve-new-engagement.md +6 -0
  19. package/commands/pensieve-pause.md +15 -0
  20. package/commands/pensieve-plan.md +6 -0
  21. package/commands/pensieve-progress.md +34 -0
  22. package/commands/pensieve-quick.md +8 -0
  23. package/commands/pensieve-recon.md +6 -0
  24. package/commands/pensieve-report.md +6 -0
  25. package/commands/pensieve-resume.md +6 -0
  26. package/commands/pensieve-retest.md +10 -0
  27. package/commands/pensieve-scope.md +49 -0
  28. package/commands/pensieve-surface.md +8 -0
  29. package/commands/pensieve-test.md +6 -0
  30. package/commands/pensieve-validate.md +6 -0
  31. package/docker/Dockerfile.pensieve-toolbox +75 -0
  32. package/docker/compose.pensieve-net.yml +37 -0
  33. package/docker/squid.conf.template +21 -0
  34. package/package.json +39 -4
  35. package/packs/ad/ad-killchain/checklist.md +64 -0
  36. package/packs/ad/ad-killchain/pack.yaml +19 -0
  37. package/packs/cloud/cloud-cis/checklist.md +66 -0
  38. package/packs/cloud/cloud-cis/pack.yaml +20 -0
  39. package/packs/fintech/practice-core/checklist.md +33 -0
  40. package/packs/fintech/practice-core/learnings.md +5 -0
  41. package/packs/fintech/practice-core/pack.yaml +18 -0
  42. package/packs/infra/ptes-infra/checklist.md +22 -0
  43. package/packs/infra/ptes-infra/pack.yaml +19 -0
  44. package/packs/mobile/owasp-masvs/checklist.md +80 -0
  45. package/packs/mobile/owasp-masvs/pack.yaml +20 -0
  46. package/packs/owasp-api-v4/checklist.md +85 -0
  47. package/packs/owasp-api-v4/learnings.md +6 -0
  48. package/packs/owasp-api-v4/pack.yaml +23 -0
  49. package/packs/owasp-api-v4/runbooks/API1/SKILL.md +66 -0
  50. package/packs/owasp-api-v4/runbooks/API10/SKILL.md +67 -0
  51. package/packs/owasp-api-v4/runbooks/API2/SKILL.md +129 -0
  52. package/packs/owasp-api-v4/runbooks/API3/SKILL.md +55 -0
  53. package/packs/owasp-api-v4/runbooks/API4/SKILL.md +59 -0
  54. package/packs/owasp-api-v4/runbooks/API5/SKILL.md +60 -0
  55. package/packs/owasp-api-v4/runbooks/API6/SKILL.md +63 -0
  56. package/packs/owasp-api-v4/runbooks/API7/SKILL.md +70 -0
  57. package/packs/owasp-api-v4/runbooks/API8/SKILL.md +72 -0
  58. package/packs/owasp-api-v4/runbooks/API9/SKILL.md +66 -0
  59. package/packs/thickclient/thickclient-core/checklist.md +60 -0
  60. package/packs/thickclient/thickclient-core/pack.yaml +24 -0
  61. package/packs/web/asvs-l2/checklist.md +50 -0
  62. package/packs/web/asvs-l2/learnings.md +6 -0
  63. package/packs/web/asvs-l2/pack.yaml +19 -0
  64. package/packs/web/asvs-l2/runbooks/V2-AUTH-ENUM/SKILL.md +75 -0
  65. package/packs/web/asvs-l2/runbooks/V2-AUTH-LIVE/SKILL.md +78 -0
  66. package/packs/web/asvs-l2/runbooks/V2-AUTH-MFA/SKILL.md +76 -0
  67. package/packs/web/asvs-l2/runbooks/V2-AUTH-RATE/SKILL.md +72 -0
  68. package/packs/web/owasp-testing-checklist/checklist.md +52 -0
  69. package/packs/web/owasp-testing-checklist/learnings.md +47 -0
  70. package/packs/web/owasp-testing-checklist/pack.yaml +21 -0
  71. package/packs/web/unauth-perimeter/checklist.md +72 -0
  72. package/packs/web/unauth-perimeter/pack.yaml +18 -0
  73. package/packs/web/unauth-perimeter/runbooks/PERIM-01/SKILL.md +60 -0
  74. package/packs/web/unauth-perimeter/runbooks/PERIM-02/SKILL.md +63 -0
  75. package/packs/web/unauth-perimeter/runbooks/PERIM-03/SKILL.md +62 -0
  76. package/packs/web/unauth-perimeter/runbooks/PERIM-04/SKILL.md +75 -0
  77. package/packs/web/unauth-perimeter/runbooks/PERIM-05/SKILL.md +66 -0
  78. package/packs/web/unauth-perimeter/runbooks/PERIM-06/SKILL.md +59 -0
  79. package/packs/web/unauth-perimeter/runbooks/PERIM-07/SKILL.md +56 -0
  80. package/packs/web/unauth-perimeter/runbooks/PERIM-08/SKILL.md +57 -0
  81. package/packs/web/unauth-perimeter/runbooks/PERIM-09/SKILL.md +62 -0
  82. package/packs/web/unauth-perimeter/runbooks/PERIM-10/SKILL.md +60 -0
  83. package/packs/whitebox/code-audit-core/checklist.md +36 -0
  84. package/packs/whitebox/code-audit-core/learnings.md +6 -0
  85. package/packs/whitebox/code-audit-core/pack.yaml +14 -0
  86. package/prompts/orchestrator-core.md +52 -0
  87. package/reference/attack-playbooks.md +57 -0
  88. package/reference/otp-relay.md +98 -0
  89. package/reference/param-profiles.md +48 -0
  90. package/reference/templates/FINDING.md +97 -0
  91. package/reference/tool-selection.md +64 -0
  92. package/reference/vulnerability-finding-standard.md +80 -0
  93. package/runtimes/hermes/hooks/injection-scan.py +290 -0
  94. package/runtimes/hermes/hooks/scope-guard.py +136 -0
  95. package/skills/pensieve/SKILL.md +134 -0
  96. package/skills/pensieve-close/SKILL.md +31 -0
  97. package/skills/pensieve-map/SKILL.md +25 -0
  98. package/skills/pensieve-new-engagement/SKILL.md +28 -0
  99. package/skills/pensieve-pause/SKILL.md +22 -0
  100. package/skills/pensieve-plan/SKILL.md +39 -0
  101. package/skills/pensieve-progress/SKILL.md +35 -0
  102. package/skills/pensieve-quick/SKILL.md +47 -0
  103. package/skills/pensieve-recon/SKILL.md +30 -0
  104. package/skills/pensieve-report/SKILL.md +46 -0
  105. package/skills/pensieve-resume/SKILL.md +33 -0
  106. package/skills/pensieve-retest/SKILL.md +35 -0
  107. package/skills/pensieve-scope/SKILL.md +35 -0
  108. package/skills/pensieve-surface/SKILL.md +36 -0
  109. package/skills/pensieve-test/SKILL.md +35 -0
  110. package/skills/pensieve-validate/SKILL.md +28 -0
  111. package/skills/pensieve-wiki/SKILL.md +39 -0
  112. package/src/installer/cli.cjs +209 -0
  113. package/src/installer/home.cjs +155 -0
  114. package/src/installer/runtimes.cjs +276 -0
  115. package/src/installer/uninstall.cjs +342 -0
  116. package/src/pensieve-sdk/bin/pensieve-sdk.cjs +1045 -0
  117. package/src/pensieve-sdk/lib/agent-translate.cjs +50 -0
  118. package/src/pensieve-sdk/lib/approvals.cjs +408 -0
  119. package/src/pensieve-sdk/lib/audit.cjs +290 -0
  120. package/src/pensieve-sdk/lib/checklist.cjs +337 -0
  121. package/src/pensieve-sdk/lib/clientlist.cjs +814 -0
  122. package/src/pensieve-sdk/lib/close.cjs +133 -0
  123. package/src/pensieve-sdk/lib/config.cjs +156 -0
  124. package/src/pensieve-sdk/lib/cvss.cjs +91 -0
  125. package/src/pensieve-sdk/lib/env.cjs +272 -0
  126. package/src/pensieve-sdk/lib/evidence.cjs +217 -0
  127. package/src/pensieve-sdk/lib/findings.cjs +1096 -0
  128. package/src/pensieve-sdk/lib/frontmatter.cjs +178 -0
  129. package/src/pensieve-sdk/lib/graph.cjs +607 -0
  130. package/src/pensieve-sdk/lib/ids.cjs +63 -0
  131. package/src/pensieve-sdk/lib/init.cjs +79 -0
  132. package/src/pensieve-sdk/lib/liveness.cjs +176 -0
  133. package/src/pensieve-sdk/lib/loop.cjs +619 -0
  134. package/src/pensieve-sdk/lib/migrate.cjs +57 -0
  135. package/src/pensieve-sdk/lib/monitor.cjs +69 -0
  136. package/src/pensieve-sdk/lib/pack.cjs +607 -0
  137. package/src/pensieve-sdk/lib/paths.cjs +73 -0
  138. package/src/pensieve-sdk/lib/pdf.cjs +291 -0
  139. package/src/pensieve-sdk/lib/recon.cjs +296 -0
  140. package/src/pensieve-sdk/lib/renderers/__pycache__/formal_report.cpython-314.pyc +0 -0
  141. package/src/pensieve-sdk/lib/renderers/formal_report.py +608 -0
  142. package/src/pensieve-sdk/lib/report.cjs +1135 -0
  143. package/src/pensieve-sdk/lib/runbook.cjs +124 -0
  144. package/src/pensieve-sdk/lib/sarif.cjs +154 -0
  145. package/src/pensieve-sdk/lib/scope.cjs +621 -0
  146. package/src/pensieve-sdk/lib/security.cjs +61 -0
  147. package/src/pensieve-sdk/lib/skills.cjs +193 -0
  148. package/src/pensieve-sdk/lib/state.cjs +610 -0
  149. package/src/pensieve-sdk/lib/subagent.cjs +658 -0
  150. package/src/pensieve-sdk/lib/target.cjs +149 -0
  151. package/src/pensieve-sdk/lib/tools.cjs +66 -0
  152. package/src/pensieve-sdk/lib/vault.cjs +122 -0
  153. package/src/pensieve-sdk/lib/vendor/cvss40.LICENSE +22 -0
  154. package/src/pensieve-sdk/lib/vendor/cvss40.js +1208 -0
  155. package/src/pensieve-sdk/package.json +11 -0
  156. package/templates/ACCOUNTS.md +35 -0
  157. package/templates/ATTACK-SURFACE.md +30 -0
  158. package/templates/FINDING.md +43 -0
  159. package/templates/PLAN.md +33 -0
  160. package/templates/PROJECT.md +29 -0
  161. package/templates/ROE.md +50 -0
  162. package/templates/RUN-LOG.md +19 -0
  163. package/templates/SCOPE.md +32 -0
  164. package/templates/VALIDATION.md +62 -0
  165. package/templates/report/REPORT.md +49 -0
  166. package/workflows/close.md +34 -0
  167. package/workflows/map.md +39 -0
  168. package/workflows/new-engagement.md +37 -0
  169. package/workflows/plan.md +45 -0
  170. package/workflows/progress.md +28 -0
  171. package/workflows/quick.md +67 -0
  172. package/workflows/recon.md +87 -0
  173. package/workflows/report.md +51 -0
  174. package/workflows/resume.md +26 -0
  175. package/workflows/retest.md +53 -0
  176. package/workflows/scope.md +47 -0
  177. package/workflows/surface.md +29 -0
  178. package/workflows/test.md +95 -0
  179. package/workflows/validate.md +34 -0
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: V2-AUTH-MFA — Per-account MFA enforcement
3
+ item: V2-AUTH-MFA
4
+ description: MFA enforcement differs per account/role — walk the login for EVERY ACCOUNTS.md row and record which accounts enforce step-up; a single-account verdict generalizes wrongly.
5
+ agents: [pensieve-tester]
6
+ pack: web/asvs-l2
7
+ ---
8
+
9
+ ## Tools
10
+
11
+ curl, jq, the ACCOUNTS.md matrix (MFA columns), tools/otp_watch.py for
12
+ code entry on device/X targets
13
+
14
+ ## Steps
15
+
16
+ MFA enforcement is PER ACCOUNT/ROLE, not a property of the app. A
17
+ single-account verdict generalizes wrongly: the admin lane may enforce
18
+ step-up while the plain-user lane does not (or the reverse). Test every
19
+ row. And every lane is gated first: without the auth-stage marker the walk
20
+ is INVALID evidence (a naive POST that never entered the auth stage proves
21
+ nothing about its MFA either). OTP codes are a scarce, client-costed
22
+ resource — plan the OTP economy per reference/otp-relay.md (chain before
23
+ you ask, one code consumed once).
24
+
25
+ ```sh
26
+ export PROXY=http://127.0.0.1:8080
27
+ export TS=$(date -u +%Y%m%dT%H%M%SZ)
28
+
29
+ # 1. LIVENESS GATE (V2-AUTH-LIVE) — each account lane's login path is proven
30
+ # LIVE (auth-stage marker present) before its MFA verdict is recorded.
31
+ # Per-account lanes can even hit DIFFERENT endpoints; gate each one.
32
+
33
+ # 2. PER-ACCOUNT WALK — for EVERY row of ACCOUNTS.md (read the MFA columns:
34
+ # channel, code lifetime, lockout policy), one genuine login walk; the
35
+ # credentials come from the vault (never pasted into the transcript):
36
+ for acct in <every account/role row in the ACCOUNTS.md matrix>; do
37
+ curl -sS -x "$PROXY" -o "authmfa-$acct-$TS.json" \
38
+ -w "acct=$acct status=%{http_code} time=%{time_total}\n" \
39
+ -H 'Content-Type: application/json' \
40
+ -d '{"username":"<from vault>","password":"<from vault>","<crypto fields>":"<genuine>"}' \
41
+ https://$TARGET/login
42
+ # does the response carry an MFA/step-up stage marker BEFORE any session
43
+ # token is issued? grep the stage-transition keys:
44
+ jq -r '.. | objects | to_entries[]? | select(.key|test("otp|mfa|challenge|step|verify";"i")) | "\(.key)=\(.value)"' \
45
+ "authmfa-$acct-$TS.json" | tee -a authmfa-stage-$TS.txt
46
+ done
47
+
48
+ # 3. VERDICT TABLE — record per account: MFA enforced? channel? code
49
+ # lifetime? lockout policy (from the ACCOUNTS.md MFA columns)? plus the
50
+ # stage-marker line that proves it. One row per ACCOUNTS.md account.
51
+ column -t -s'|' ACCOUNTS.md | tee authmfa-input-matrix-$TS.txt
52
+ ```
53
+
54
+ ## Expected Evidence
55
+
56
+ One capture per account (`authmfa-<acct>-$TS.json`), the accumulated
57
+ `authmfa-stage-$TS.txt` stage-marker lines, and the verdict table mapping
58
+ every ACCOUNTS.md row → {enforced?, channel, lifetime, lockout}. WHICH
59
+ LINES MATTER: per account, the presence or absence of a step-up marker
60
+ before session issuance, and — where a code IS required — the OTP economy
61
+ notes (how many codes were consumed: they must equal the number of stages
62
+ tested; every code consumed exactly once).
63
+
64
+ ## Pass/Fail
65
+
66
+ The deliverable is the PER-ACCOUNT TABLE — a verdict for every row, never
67
+ one verdict for "the app". FINDING when an account whose role touches
68
+ sensitive functions (per V2-AUTH-02: admin, money movement, profile/PAN
69
+ changes) reaches an authenticated session with NO step-up marker, or when
70
+ enforcement differs between roles in a way the design docs do not explain
71
+ (silent partial enforcement is itself reportable). PASS when every role
72
+ that should enforce does, with the marker lines quoted per account.
73
+ GUARDRAILS: consume each OTP exactly once; never burn a second code on a
74
+ re-prompt (reference/otp-relay.md); stop a lane the moment lockout policy
75
+ (from the ACCOUNTS.md MFA columns) says further attempts would lock the
76
+ account.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: V2-AUTH-RATE — Real-path rate limiting
3
+ item: V2-AUTH-RATE
4
+ description: ~10 rapid genuine-path logins with a NONEXISTENT username — distinct statuses, 429/403/captcha/lockout markers, timing escalation. Never a real account.
5
+ agents: [pensieve-tester]
6
+ pack: web/asvs-l2
7
+ ---
8
+
9
+ ## Tools
10
+
11
+ curl, jq
12
+
13
+ ## Steps
14
+
15
+ PREREQUISITE: V2-AUTH-LIVE must have proven this request shape LIVE (the
16
+ auth-stage marker reproduces). A negative naive-POST burst is INVALID evidence —
17
+ crypto-gated logins silently ignore naive posts, so "10 refusals"
18
+ on a dead path proves nothing about rate limiting.
19
+
20
+ ```sh
21
+ export PROXY=http://127.0.0.1:8080
22
+ export TS=$(date -u +%Y%m%dT%H%M%SZ)
23
+
24
+ # 1. LIVENESS GATE (V2-AUTH-LIVE) re-check — one genuine-shaped probe with a
25
+ # NONEXISTENT username; confirm the auth-stage marker appears in the body
26
+ # before any burst is interpreted. No marker => STOP: not a live path.
27
+ curl -sS -x "$PROXY" -o authrate-live-$TS.json \
28
+ -w 'liveness status=%{http_code} time=%{time_total}\n' \
29
+ -H 'Content-Type: application/json' \
30
+ -d '{"username":"nosuchuser-0-xyz","password":"x","<crypto fields>":"<from the V2-AUTH-LIVE capture>"}' \
31
+ https://$TARGET/login
32
+ grep -c "$AUTH_STAGE_MARKER" authrate-live-$TS.json
33
+
34
+ # 2. BURST — 10 rapid logins on the GENUINE crypto path, NONEXISTENT username
35
+ # each time (never a real account — lockout of a real user harms the
36
+ # client and burns the engagement window). Paced per PROJECT.md intensity:
37
+ # measure, never DoS.
38
+ for i in $(seq 1 10); do
39
+ curl -sS -x "$PROXY" -o authrate-$i-$TS.json \
40
+ -w "try=$i status=%{http_code} time=%{time_total}\n" \
41
+ -H 'Content-Type: application/json' \
42
+ -d '{"username":"nosuchuser-'"$i"'-xyz","password":"x","<crypto fields>":"<genuine>"}' \
43
+ https://$TARGET/login
44
+ done | tee authrate-table-$TS.txt
45
+
46
+ # 3. ESCALATION ANALYSIS — distinct statuses, lockout/captcha markers, timing:
47
+ grep -o 'status=[0-9]*' authrate-table-$TS.txt | sort | uniq -c # distinct status counts
48
+ grep -ciE '429|403|captcha|lock|too many|throttl|delay|blocked' authrate-*-?-$TS.json authrate-10-$TS.json 2>/dev/null
49
+ awk '{print $NF}' authrate-table-$TS.txt | sort -n | head -3 # timing floor…
50
+ awk '{print $NF}' authrate-table-$TS.txt | sort -n | tail -3 # …vs tail — escalation?
51
+ ```
52
+
53
+ ## Expected Evidence
54
+
55
+ `authrate-table-$TS.txt` (all 10 try/status/time rows), the distinct-status
56
+ count table, the marker-grep output, and the timing floor-vs-tail numbers.
57
+ WHICH LINES MATTER: the first line where the status CHANGES (200→429/403),
58
+ any captcha/lockout marker line in a body, and a time= column that grows
59
+ across tries (server-side delay). All 10 attempts used the genuine crypto
60
+ shape recorded by V2-AUTH-LIVE — cite that capture in the notes.
61
+
62
+ ## Pass/Fail
63
+
64
+ FINDING (missing rate limit) ONLY when the path was LIVE and 10 genuine-path
65
+ attempts show a single repeated same-stage failure: no distinct status
66
+ transition, no 429/403/captcha/lockout marker anywhere, flat timing. PASS
67
+ when a rate-limit control appears within the 10 attempts — a distinct
68
+ 429/403 status, a captcha/lockout body marker, or clear timing escalation
69
+ (record the onset attempt number). INCONCLUSIVE — never a PASS and never a
70
+ FINDING — when liveness was not established first. GUARDRAILS: never use a
71
+ real account in the burst; when touching real credentials at all, apply the
72
+ single-attempt-then-stop rule (one try, observe, stop).
@@ -0,0 +1,52 @@
1
+ # OWASP Testing Checklist — web engagements
2
+
3
+ | WSTG ID | Test | Status | Notes |
4
+ |---------|------|--------|-------|
5
+ | WSTG-INFO-02 | Fingerprint Web Server | | |
6
+ | WSTG-INFO-05 | Review Webpage Content for Information Leakage | | |
7
+ | WSTG-CONF-02 | Test Application Platform Configuration | | |
8
+ | WSTG-CONF-05 | Enumerate Infrastructure and Application Admin Interfaces | | |
9
+ | WSTG-CONF-06 | Test HTTP Methods | | |
10
+ | WSTG-CONF-08 | Test RIA Cross Domain Policy | | |
11
+ | WSTG-CONF-11 | Test Cloud Storage | | |
12
+ | WSTG-ATHN-02 | Testing for Default Credentials | | |
13
+ | WSTG-ATHN-03 | Testing for Weak Lock Out Mechanism | | |
14
+ | WSTG-ATHN-04 | Testing for Bypassing Authentication Schema | | |
15
+ | WSTG-ATHN-06 | Testing for Browser Cache Weaknesses | | |
16
+ | WSTG-ATHN-09 | Testing for Weak Password Change or Reset Functionalities | | |
17
+ | WSTG-ATHZ-02 | Testing for Bypassing Authorization Schema | | |
18
+ | WSTG-ATHZ-03 | Testing for Privilege Escalation | | |
19
+ | WSTG-ATHZ-04 | Testing for Insecure Direct Object References | | |
20
+ | WSTG-SESS-01 | Testing for Session Management Schema | | |
21
+ | WSTG-SESS-02 | Testing for Cookies Attributes | | |
22
+ | WSTG-SESS-04 | Testing for Exposed Session Variables | | |
23
+ | WSTG-SESS-05 | Testing for Cross Site Request Forgery | | |
24
+ | WSTG-INPV-01 | Testing for Reflected Cross Site Scripting | | |
25
+ | WSTG-INPV-02 | Testing for Stored Cross Site Scripting | | |
26
+ | WSTG-INPV-05 | Testing for SQL Injection | | |
27
+ | WSTG-INPV-11 | Testing for Code Injection | | |
28
+ | WSTG-INPV-12 | Testing for Command Injection | | |
29
+ | WSTG-INPV-15 | Testing for HTTP Splitting Smuggling | | |
30
+ | WSTG-INPV-17 | Testing for Host Header Injection | | |
31
+ | WSTG-ERRH-01 | Testing for Improper Error Handling | | |
32
+ | WSTG-BUSL-01 | Test Business Logic Data Validation | | |
33
+ | WSTG-BUSL-05 | Test Number of Times a Function Can Be Used Limits | | |
34
+ | WSTG-CLNT-03 | Testing for HTML Injection | | |
35
+ | WSTG-CLNT-05 | Testing for CSS Injection | | |
36
+ | WSTG-CLNT-09 | Testing for Clickjacking | | |
37
+
38
+ ## WSTG-ATHZ-04 — Testing for Insecure Direct Object References
39
+
40
+ - test: two same-role accounts (ACCOUNTS.md matrix) — swap object ids in URL, body, headers
41
+ - test: cross-tenant victim from the matrix
42
+ - test: GUID/sequential/composite reference patterns
43
+
44
+ ## WSTG-INPV-05 — Testing for SQL Injection
45
+
46
+ - test: error/boolean/time-based on every parameter — sqlmap --batch --risk=1 --level=1 first, escalate only with finding evidence
47
+ - test: second-order sinks (stored values rendered elsewhere)
48
+
49
+ ## WSTG-BUSL-01 — Test Business Logic Data Validation
50
+
51
+ - test: tamper price/quantity/role/state fields end-to-end
52
+ - test: skip/reorder multi-step flow steps; replay completed flows
@@ -0,0 +1,47 @@
1
+ # Engagement learnings — candidate pool
2
+
3
+ _appended by pensieve-sdk pack.learn; promoted into the checklist by the pack author (ADR-022)_
4
+
5
+ - L-001 [candidate] (2026-09-27, edge-origin-probe-20260924) Enumerate direct-origin ports bypassing the edge: nmap -p- against the origin IP (not just 80/443); app servers often answer directly (F-001 pattern, 20260924).
6
+ - L-002 [candidate] (2026-09-27, edge-origin-probe-20260924) Probe unauthenticated health/version routes (/health, /ready, /status, /metrics, version) and diff against authenticated responses — disclosure primitives.
7
+
8
+ ## Row-title audit (2026-12-03, 36-01 TD-04)
9
+
10
+ Every row's Title was checked against the official OWASP WSTG v4.2 catalog (the v4.2
11
+ category test listings under document/4-Web_Application_Security_Testing at the v4.2
12
+ tag of OWASP/wstg). All 33 rows carried paraphrased or substance-mismatched titles;
13
+ each row now carries the official v4.2 title for its ID — titles only, NO id changes,
14
+ NO renumbering. Beyond WSTG-INFO-02 (the full-lab flag: "Fingerprint web
15
+ server/framework" -> "Fingerprint Web Server", framework fingerprinting is INFO-08),
16
+ the substantive mismatches were:
17
+
18
+ - WSTG-INFO-05 "Enumerate leaked content (robots, sitemaps, comments)" ->
19
+ "Review Webpage Content for Information Leakage" (robots/sitemaps are webserver
20
+ metafiles, INFO-03).
21
+ - WSTG-CONF-11 "CSP and security headers" -> "Test Cloud Storage" (v4.2 CONF has no
22
+ CSP test; the id maps to Cloud Storage).
23
+ - WSTG-CONF-08 "Cross-domain policies (CORS, crossdomain.xml)" -> "Test RIA Cross
24
+ Domain Policy" (CORS is CLNT-07).
25
+ - WSTG-ATHN-06 "Remember-me / session token weaknesses" -> "Testing for Browser
26
+ Cache Weaknesses" (remember-me is ATHN-05).
27
+ - WSTG-ATHZ-02/WSTG-ATHZ-04 were substance-swapped: the IDOR row is ATHZ-04
28
+ "Testing for Insecure Direct Object References" and ATHZ-02 is "Testing for
29
+ Bypassing Authorization Schema"; the IDOR execution-detail section moved with its
30
+ substance (header WSTG-ATHZ-02 -> WSTG-ATHZ-04 — parseChecklist headings enrich
31
+ their row and override its title, so the heading had to follow the row it
32
+ describes; no table-row id changed).
33
+ - WSTG-SESS-04 "Session fixation" -> "Testing for Exposed Session Variables"
34
+ (fixation is SESS-03).
35
+ - WSTG-INPV-15 "HTTP parameter pollution" -> "Testing for HTTP Splitting Smuggling"
36
+ (HPP is INPV-04); WSTG-INPV-17 "File upload (type, content, path, size)" ->
37
+ "Testing for Host Header Injection" (file upload lives in BUSL-08/09).
38
+ - WSTG-ATHN-09 "Password reset poisoning / token flaws" -> "Testing for Weak
39
+ Password Change or Reset Functionalities" (the 4.4.9 substance, official wording).
40
+
41
+ Operational hints that lived in row-title parentheses (sqlmap options, cookie-flag
42
+ names, verb-tamper lists) were dropped per the titles-only rule; the sqlmap guidance
43
+ survives in the WSTG-INPV-05 execution detail below.
44
+
45
+ - L-003 [candidate] (2026-12-04, external-release-test-20261204) Edge-rate-limited targets: recovery-probe-first on every unit, single-digit request budgets, >=2s spacing — a 157-request sweep earned a 1h+ persistent block
46
+ - L-004 [candidate] (2026-12-04, external-release-test-20261204) Byte-identity baseline-vs-probe comparison as the standard negative technique: response invariance across parameter values proves no sink without output scanning
47
+ - L-005 [candidate] (2026-12-04, external-release-test-20261204) Feature-disabled routes still run server actions: POST-liveness check verifies the feature flag fails closed (unroute or 404 the action, not just the page)
@@ -0,0 +1,21 @@
1
+ name: OWASP Testing Checklist (WSTG-derived)
2
+ slug: web/owasp-testing-checklist
3
+ version: "1.0"
4
+ tier: DEFAULT
5
+ applies_to:
6
+ - web
7
+ - gray
8
+ - black
9
+ - white
10
+ source: https://github.com/OWASP/wstg
11
+ license: CC-BY-SA-4.0 (document); structure adapted for PENSIEVE
12
+ tools:
13
+ - curl|A|builtin|curl
14
+ - httpx|A|builtin|httpx
15
+ - nmap|A|builtin|nmap
16
+ - ffuf|A|builtin|ffuf
17
+ - nuclei|A|builtin|nuclei
18
+ - sqlmap|A|builtin|sqlmap
19
+ - python3|A|builtin|python3
20
+ checklist: checklist.md
21
+ notes: Row-per-test web checklist (ID / test / status / notes) as used by the practice; WSTG ids kept for traceability.
@@ -0,0 +1,72 @@
1
+ # Unauth Perimeter First-Pass — engagement checklist
2
+
3
+ The deterministic ~10-request unauthenticated sweep that starts every web
4
+ assessment. Run items individually via `/pensieve-quick --item <ID>
5
+ <in-scope-target>` — the resolved runbook is the plan. **Body verification is
6
+ mandatory on every probe: status codes lie — fetch and inspect the body.** A
7
+ 200 with a friendly-error body is a NEGATIVE, not a finding.
8
+
9
+ | ID | Category | Status | Finding |
10
+ |----|----------|--------|---------|
11
+ | PERIM-01 | Security headers + CSP parse (fusion, HSTS, XFO, nosniff) | | |
12
+ | PERIM-02 | Cookie flags on every Set-Cookie | | |
13
+ | PERIM-03 | CORS reflection with foreign Origin | | |
14
+ | PERIM-04 | TLS floor (SECLEVEL=0 offers + controls) | | |
15
+ | PERIM-05 | Docs/debug probes, body-verified | | |
16
+ | PERIM-06 | Verb tampering + TRACE echo | | |
17
+ | PERIM-07 | robots.txt origin/path disclosure | | |
18
+ | PERIM-08 | sitemap.xml entry + internal-parameter inventory | | |
19
+ | PERIM-09 | WAF block-page body leaks | | |
20
+ | PERIM-10 | Header consistency (XFO vs frame-ancestors) + cache discipline | | |
21
+
22
+ ## PERIM-01 — Security headers + CSP directive parse
23
+
24
+ - test: curl -skI header snapshot of the root AND one deep app route; read the header lines from the capture, never infer from a green status
25
+ - test: parse CSP into one directive per line; flag malformed-directive fusion (a stray quote gluing tokens, e.g. img-src'/connect-src fused) — the policy silently stops meaning what it says
26
+ - test: HSTS present with a real max-age, X-Frame-Options, X-Content-Type-Options: nosniff — each judged by its line in the body of the capture
27
+
28
+ ## PERIM-02 — Cookie flags on every Set-Cookie
29
+
30
+ - test: capture Set-Cookie on every hop of the unauth journey (root, login page, login POST reply) — cookies ride redirects and 30x replies, and any status can carry them
31
+ - test: every session-bearing cookie carries Secure, HttpOnly, SameSite — the flag lines in the capture are the evidence, the response body/status is not
32
+
33
+ ## PERIM-03 — CORS reflection with foreign Origin
34
+
35
+ - test: GET + OPTIONS preflight with Origin: https://evil.example; a suffix-confusable origin (target host as subdomain of evil.example) catches substring allow-lists
36
+ - test: judged ONLY on the Access-Control-* header lines of the fetched response, body-over-status — a 200 preflight with no ACAO is blocked, a 403 with an ACAO echo is reflected; the status lies
37
+
38
+ ## PERIM-04 — TLS floor (SECLEVEL=0 offers + controls)
39
+
40
+ - test: control FIRST — forced modern protocol must negotiate; a failing control voids every weak offer result below (false-positive guard)
41
+ - test: openssl s_client offers at TLS1.0/1.1/2 with -cipher 'DEFAULT@SECLEVEL=0' (WHY: OpenSSL 3 clients refuse weak suites locally, before the server answers — without it the probe measures our client, not the target: false-negative risk)
42
+ - test: read the negotiated `New,` protocol/cipher lines in the body of the capture, not the exit code; a TLS-floor finding validated later must carry forced-protocol: and control-cipher: markers (21-01 controls)
43
+
44
+ ## PERIM-05 — Docs/debug probes, body-verified
45
+
46
+ - test: /swagger.json /openapi.json /api-docs /WEB-INF/web.xml /.git/HEAD — every 200 is BODY-verified against the artifact's real shape (openapi/swagger keys + paths object, web-app XML, `ref: refs/` line)
47
+ - test: the endemic false-positive trap: 200 with a friendly-error or SPA-catch-all body is a NEGATIVE — never file docs/debug exposure on status alone
48
+
49
+ ## PERIM-06 — Verb tampering + TRACE echo
50
+
51
+ - test: PUT/DELETE/PATCH on a known unauth route — a 200/204 is NOT state change until the body/state diff proves it (re-GET and diff before/after)
52
+ - test: TRACE echo check — finding only when the response body echoes the request line/headers; a 405 with an echoing body still counts, a bare 200 does not
53
+
54
+ ## PERIM-07 — robots.txt origin/path disclosure
55
+
56
+ - test: body-verify it is a robots file (User-agent/Disallow lines) — a 200 HTML error page is not a robots.txt
57
+ - test: parse Disallow paths + Sitemap/absolute URLs for origin and host disclosure — RECORD for recon; never probe out-of-scope origins
58
+
59
+ ## PERIM-08 — sitemap.xml entry + internal-parameter inventory
60
+
61
+ - test: body-verify real sitemap XML (<loc> entries present) before counting — the friendly-error 200 body is a negative
62
+ - test: count entries and inventory internal-ID-class URL parameters (p_l_id-style portlet/session ids, record ids) — they feed the IDOR/API lanes
63
+
64
+ ## PERIM-09 — WAF block-page body leaks
65
+
66
+ - test: trigger one block with a malicious-looking-but-harmless probe; then READ the block-page body — the page itself is the finding surface
67
+ - test: leak material is in the body lines: internal hostnames/IPs, contact addresses, rule/transaction ids, stack traces, backend banners — a bare 403 status is just "blocked", not a finding
68
+
69
+ ## PERIM-10 — Header consistency (XFO vs frame-ancestors) + cache discipline
70
+
71
+ - test: X-Frame-Options vs CSP frame-ancestors must not conflict (or both be absent) — read both lines from the header captures
72
+ - test: cache headers on the SENSITIVE replies (login POST response, auth replies), not just the login page GET — body-over-status: judge the Cache-Control: no-store line of the fetched POST response, never its 302 status
@@ -0,0 +1,18 @@
1
+ name: Unauth Perimeter First-Pass (web)
2
+ slug: web/unauth-perimeter
3
+ version: "1.0"
4
+ tier: DEFAULT
5
+ applies_to:
6
+ - web
7
+ - gray
8
+ - black
9
+ - white
10
+ source: internal (distilled operational record — the first-pass sweep as practiced)
11
+ license: Internal PENSIEVE methodology content
12
+ tools:
13
+ - curl|A|builtin|curl
14
+ - openssl|A|builtin|openssl
15
+ - jq|A|builtin|jq
16
+ - nmap|A|builtin|nmap
17
+ checklist: checklist.md
18
+ notes: The deterministic ~10-request unauthenticated sweep that starts every web assessment. Run per item via /pensieve-quick --item <ID> <in-scope-target>. Body-over-status is the pack-wide rule — status codes lie; fetch and inspect the body. All traffic through the engagement proxy.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: PERIM-01 — Security headers + CSP directive parse
3
+ item: PERIM-01
4
+ description: Unauth header snapshot (HSTS, XFO, nosniff) with a line-by-line CSP parse that catches malformed-directive fusion from stray quotes.
5
+ agents: [pensieve-tester]
6
+ pack: web/unauth-perimeter
7
+ ---
8
+
9
+ ## Tools
10
+
11
+ curl
12
+
13
+ ## Steps
14
+
15
+ Body-over-status: status codes lie — the header LINES of the saved capture are
16
+ the evidence; a green status never implies protective headers. Snapshot at
17
+ least two routes: the CDN edge at `/` and one deep app route often differ.
18
+ PLACEHOLDER trap: `$TARGET` only, bound by the --item lane to an in-scope asset.
19
+
20
+ ```sh
21
+ export PROXY=http://127.0.0.1:8080 # engagement proxy from PROJECT.md
22
+ export TS=$(date -u +%Y%m%dT%H%M%SZ)
23
+
24
+ # 1. Header snapshots — HEAD for the map, then GET (some stacks answer HEAD
25
+ # with different headers; the GET capture is authoritative).
26
+ curl -skI -x "$PROXY" -D "perim01-head-$TS.txt" -o /dev/null "https://$TARGET/"
27
+ curl -sk -x "$PROXY" -D "perim01-get-$TS.txt" -o /dev/null \
28
+ "https://$TARGET/<deep-app-route>"
29
+
30
+ # 2. The lines that matter:
31
+ grep -iE '^(strict-transport-security|x-frame-options|x-content-type-options|content-security-policy|referrer-policy):' "perim01-get-$TS.txt"
32
+
33
+ # 3. CSP parse — one directive per line (semicolon split):
34
+ grep -i '^content-security-policy:' "perim01-get-$TS.txt" \
35
+ | cut -d' ' -f2- | tr ';' '\n' | sed 's/^ *//' | tee "perim01-csp-$TS.txt"
36
+
37
+ # 4. MALFORMED-DIRECTIVE FUSION — a stray quote glues tokens/directives
38
+ # together (e.g. `img-src'/connect-src` or `default-src'none';script-src`
39
+ # fused): the policy silently stops meaning what it says and browsers may
40
+ # drop it wholesale. Flag any quote immediately followed by a directive
41
+ # name/token, any `'/` or `/'` glue, or two directive names with no space:
42
+ grep -nE "[a-z]'[a-z-]|[a-z-]'|'-src|[a-z]+-src[a-z-]*src" "perim01-csp-$TS.txt"
43
+ ```
44
+
45
+ ## Expected Evidence
46
+
47
+ Timestamped raw captures `perim01-get-$TS.txt` (+ head/deep-route variants).
48
+ WHICH LINES MATTER: the `strict-transport-security:` line (the max-age value),
49
+ the `x-frame-options:` line, the `x-content-type-options:` line, and EVERY line
50
+ of `perim01-csp-$TS.txt` — fusion hits are cited by that file's line numbers.
51
+
52
+ ## Pass/Fail
53
+
54
+ FINDING if: HSTS absent (on an HTTPS origin) or max-age < 15552000; both XFO and
55
+ CSP frame-ancestors absent (cross-check PERIM-10); nosniff absent; CSP absent;
56
+ or any directive-fusion hit in `perim01-csp-$TS.txt`. PASS if all protective
57
+ lines are present on the deep-route capture and the CSP parses clean.
58
+ FALSE-POSITIVE TRAP: clean headers on `/` prove only the edge — the deep app
59
+ route is the authoritative capture; and HEAD/GET disagreement is itself worth
60
+ recording. Cite capture filenames + line numbers in any finding.
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: PERIM-02 — Cookie flags on every Set-Cookie
3
+ item: PERIM-02
4
+ description: Secure/HttpOnly/SameSite audited on every Set-Cookie across the whole unauth journey, including redirect and POST replies.
5
+ agents: [pensieve-tester]
6
+ pack: web/unauth-perimeter
7
+ ---
8
+
9
+ ## Tools
10
+
11
+ curl
12
+
13
+ ## Steps
14
+
15
+ Body-over-status: status codes lie — cookies ride ANY status (302 replies and
16
+ failed logins set cookies as a matter of course), so every hop's header capture
17
+ is read; the response body/status alone reveals nothing about cookie flags.
18
+ Capture the full unauth journey: root, login page, login POST (adapt the login
19
+ path to the engagement's real route).
20
+
21
+ ```sh
22
+ export PROXY=http://127.0.0.1:8080 # engagement proxy from PROJECT.md
23
+ export TS=$(date -u +%Y%m%dT%H%M%SZ)
24
+
25
+ # 1. The journey — headers of EVERY hop captured (do NOT collapse with -L
26
+ # blindly; intermediate 30x Set-Cookie lines are the classic miss).
27
+ curl -sk -x "$PROXY" -c "perim02-jar-$TS.txt" -D "perim02-root-$TS.txt" -o /dev/null "https://$TARGET/"
28
+ curl -sk -x "$PROXY" -c "perim02-jar-$TS.txt" -D "perim02-login-$TS.txt" -o /dev/null "https://$TARGET/login"
29
+ curl -sk -x "$PROXY" -c "perim02-jar-$TS.txt" -D "perim02-post-$TS.txt" -o /dev/null \
30
+ -X POST -d 'username=probe&password=probe' "https://$TARGET/login"
31
+
32
+ # 2. Every Set-Cookie line across all captures, one per line:
33
+ grep -ih '^set-cookie:' perim02-root-$TS.txt perim02-login-$TS.txt perim02-post-$TS.txt \
34
+ | sort -u | tee "perim02-setcookie-$TS.txt"
35
+
36
+ # 3. Flag review — show each cookie's missing flags (one block per cookie,
37
+ # eyeball the output; a cookie line WITHOUT `Secure`, `HttpOnly`, or
38
+ # `SameSite=` is the finding surface):
39
+ while IFS= read -r line; do
40
+ echo "== $line"
41
+ echo "$line" | grep -q 'Secure;' || echo ' MISSING Secure'
42
+ echo "$line" | grep -q 'HttpOnly' || echo ' MISSING HttpOnly'
43
+ echo "$line" | grep -q 'SameSite=' || echo ' MISSING SameSite'
44
+ done < "perim02-setcookie-$TS.txt" | tee "perim02-flags-$TS.txt"
45
+ ```
46
+
47
+ ## Expected Evidence
48
+
49
+ Timestamped raw captures `perim02-root/login/post-$TS.txt` (headers of every
50
+ hop) plus the consolidated `perim02-setcookie-$TS.txt` and
51
+ `perim02-flags-$TS.txt`. WHICH LINES MATTER: each Set-Cookie line and its
52
+ MISSING-flag annotations — the finding cites cookie name + missing flag +
53
+ which capture line set it.
54
+
55
+ ## Pass/Fail
56
+
57
+ FINDING if any session-bearing cookie (name matching sess|auth|token|jsession|
58
+ aspsess|phpsess|id) lacks Secure, lacks HttpOnly (unless the app legitimately
59
+ reads it from JS — record which), or lacks SameSite. PASS if every
60
+ session-bearing cookie carries all three. FALSE-POSITIVE TRAP: do not flag
61
+ intentional throwaway cookies (CSRF nonce set AND consumed same-response) at
62
+ the same severity — record them; and a failed-login 302 still counts: its
63
+ Set-Cookie lines are in `perim02-post-$TS.txt` and are judged exactly the same.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: PERIM-03 — CORS reflection with foreign Origin
3
+ item: PERIM-03
4
+ description: Foreign-Origin GET + preflight; reflection judged only on the Access-Control-* header lines, never the status.
5
+ agents: [pensieve-tester]
6
+ pack: web/unauth-perimeter
7
+ ---
8
+
9
+ ## Tools
10
+
11
+ curl
12
+
13
+ ## Steps
14
+
15
+ Body-over-status: status codes lie — a 200/204 preflight with NO
16
+ Access-Control-Allow-Origin means blocked, and a 403 that still ECHOES ACAO
17
+ means reflected. ONLY the Access-Control-* header lines of the captures
18
+ decide; never the status, never the body's opinion.
19
+
20
+ ```sh
21
+ export PROXY=http://127.0.0.1:8080 # engagement proxy from PROJECT.md
22
+ export TS=$(date -u +%Y%m%dT%H%M%SZ)
23
+
24
+ # 1. Simple GET with a foreign origin (evil.example is the placeholder
25
+ # foreign origin — never a real client host):
26
+ curl -sk -x "$PROXY" -D "perim03-get-$TS.txt" -o /dev/null \
27
+ -H 'Origin: https://evil.example' "https://$TARGET/"
28
+
29
+ # 2. Preflight with a method + a sensitive header requested:
30
+ curl -sk -x "$PROXY" -D "perim03-pre-$TS.txt" -o /dev/null -X OPTIONS \
31
+ -H 'Origin: https://evil.example' \
32
+ -H 'Access-Control-Request-Method: GET' \
33
+ -H 'Access-Control-Request-Headers: authorization' \
34
+ "https://$TARGET/<api-route>"
35
+
36
+ # 3. Substring allow-list probe — an origin whose SUFFIX contains the target
37
+ # host catches naive `endsWith`/substring allow-lists:
38
+ curl -sk -x "$PROXY" -D "perim03-suffix-$TS.txt" -o /dev/null \
39
+ -H "Origin: https://$TARGET.evil.example" "https://$TARGET/"
40
+
41
+ # 4. The lines that matter, from all three captures:
42
+ grep -i '^access-control-' perim03-get-$TS.txt perim03-pre-$TS.txt perim03-suffix-$TS.txt
43
+ ```
44
+
45
+ ## Expected Evidence
46
+
47
+ Timestamped raw captures `perim03-get/pre/suffix-$TS.txt`. WHICH LINES MATTER:
48
+ every `Access-Control-Allow-Origin` line (does it echo `evil.example` verbatim,
49
+ the suffix-confusable host, or `*`?), the `Access-Control-Allow-Credentials:
50
+ true` line, and `Access-Control-Allow-Headers` reflecting the requested
51
+ `authorization` header.
52
+
53
+ ## Pass/Fail
54
+
55
+ FINDING if ACAO reflects the foreign origin (verbatim or the suffix probe),
56
+ especially with Allow-Credentials: true; or ACAH reflects arbitrary requested
57
+ headers. PASS if no Access-Control-* lines appear for foreign origins, or a
58
+ fixed allow-list unrelated to the probes. FALSE-POSITIVE TRAP (both ways):
59
+ `ACAO: *` with `ACAC: true` is an invalid combo browsers reject — record as
60
+ misconfiguration, not exploitable reflection; and an endpoint that answers
61
+ preflight 403 but STILL sets ACAO is reflected — the 403 status is the trap,
62
+ the header line is the evidence.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: PERIM-04 — TLS floor (SECLEVEL=0 offers + controls)
3
+ item: PERIM-04
4
+ description: Forced-protocol TLS1.0/1.1/1.2 offers with -cipher DEFAULT@SECLEVEL=0, a control-cipher negative control first, and the 21-01 forced-protocol/control-cipher validation markers.
5
+ agents: [pensieve-tester]
6
+ pack: web/unauth-perimeter
7
+ ---
8
+
9
+ ## Tools
10
+
11
+ openssl, nmap
12
+
13
+ ## Steps
14
+
15
+ Body-over-status: status codes lie — and so do exit codes. s_client can exit 0
16
+ while the session inside the output FAILED. The `New, <proto>, Cipher is
17
+ <suite>` line in the body of the capture is the only negotiation proof.
18
+
19
+ WHY SECLEVEL=0 (the hard-won part): OpenSSL 3 clients REFUSE weak
20
+ ciphers/protocols locally, before the server ever answers. Without
21
+ `-cipher 'DEFAULT@SECLEVEL=0'` a failed handshake means "our client declined",
22
+ not "the server declined" — the classic TLS-floor FALSE-NEGATIVE. If the
23
+ toolbox build rejects the flags outright (no TLS1/1.1 support compiled in),
24
+ record that and fall back to `nmap --script ssl-enum-ciphers`.
25
+
26
+ ```sh
27
+ export TS=$(date -u +%Y%m%dT%H%M%SZ)
28
+ # if egress must traverse the HTTP engagement proxy, add:
29
+ # -proxy <proxy-host>:<proxy-port>
30
+
31
+ # 1. CONTROL FIRST (negative control): forced modern protocol MUST negotiate.
32
+ # If this fails, the endpoint/port is wrong or non-TLS — every "accepted"
33
+ # weak offer below is VOID (false-positive guard). This is the
34
+ # control-cipher leg of the 21-01 validation controls.
35
+ openssl s_client -connect "$TARGET:443" -tls1_3 </dev/null 2>/dev/null \
36
+ | tee "perim04-control-$TS.txt" | grep -E '^(New,|Protocol\s|Cipher\s)'
37
+
38
+ # 2. THE OFFERS — forced protocol, weak suites enabled (SECLEVEL=0):
39
+ for proto in tls1 tls1_1 tls1_2; do
40
+ echo "== forced -$proto (DEFAULT@SECLEVEL=0) ==" | tee -a "perim04-floor-$TS.txt"
41
+ openssl s_client -connect "$TARGET:443" "-$proto" \
42
+ -cipher 'DEFAULT@SECLEVEL=0' </dev/null 2>/dev/null \
43
+ | grep -E '^(New,|Protocol\s|Cipher\s|SSL-Session)' | tee -a "perim04-floor-$TS.txt"
44
+ done
45
+
46
+ # 3. Fallback offer tool when the build refuses the flags:
47
+ nmap --script ssl-enum-ciphers -p 443 "$TARGET" -oN "perim04-nmap-$TS.txt"
48
+
49
+ # 4. VALIDATION MARKERS (21-01 controls) — any TLS-floor finding (CWE
50
+ # 319/310/326/327) later flipped to validated MUST carry, at column 0 in
51
+ # findings/VALIDATION-<id>.md:
52
+ # forced-protocol: TLSv1.0 forced via openssl s_client -tls1 (no negotiation)
53
+ # control-cipher: <the suite observed on that forced protocol>
54
+ ```
55
+
56
+ ## Expected Evidence
57
+
58
+ Timestamped raw captures `perim04-control-$TS.txt` and
59
+ `perim04-floor-$TS.txt` (+ `perim04-nmap-$TS.txt` if used). WHICH LINES MATTER:
60
+ in the control, the `New, TLSv1.3, Cipher is TLS_AES_...` line (probe works);
61
+ in the floor file, each block's `New,` line — `New, TLSv1, Cipher is <weak
62
+ suite>` is the server accepting TLS1.0; a block with no `New,` line = refused
63
+ at that protocol.
64
+
65
+ ## Pass/Fail
66
+
67
+ FINDING (TLS floor) if the control negotiated AND any of TLS1.0/TLS1.1
68
+ negotiates on a forced offer — cite the exact `New,` line; validation must
69
+ carry the forced-protocol:/control-cipher: markers above. PASS if the control
70
+ succeeds and TLS1.0/1.1 offers all fail while TLS1.2 negotiates.
71
+ FALSE-POSITIVE TRAPS: (a) negotiating TLS1.2 while THINKING you tested 1.0 —
72
+ read the protocol on the `New,` line, never the flag you passed; (b) the
73
+ control failing (wrong port, proxy interference) — then a "weak accept" below
74
+ is void; (c) openssl exit 0 with a failed session body — the line, not the
75
+ exit code.