Repository navigation
docs: substantiate threat model with NIST SP 800-30 + ATT&CK framework - #19
Conversation
Closes the Phase 0 threat-model deliverable. Replaces the "To be filled in." skeleton (54 lines) with substantive content (~1300 lines) covering assets, threat actors, trust boundaries, attack vectors, mitigations, residual risk, out-of-scope items, and verified references. Anchoring choices, recorded explicitly because they shape future RFC discussions: - Adversary capability is described with NIST SP 800-30 Rev.1 Appendix D's qualitative scale (Very Low -> Very High). The document notes that "Tier I-V" labels common in secondary literature are not used by NIST Rev.1 and are avoided here to prevent collision with SP 800-39's organisational tiers. - Attack vectors cross-reference MITRE ATT&CK Enterprise v17 (April 2026) technique IDs. Each vector includes a "Test handle" paragraph so Phase 1 implementers can derive test cases from the model rather than reinventing them. - Out-of-scope items each carry a rationale; the project's CNSA 2.0 posture (ML-KEM-768 vs NSS-mandated ML-KEM-1024) is recorded explicitly so operators in regulated spaces know to look elsewhere. - Maintenance gating mirrors the ADR-0015 errata mechanism: typographical fixes land as ordinary PRs; structural changes go through the RFC process. Closes #8.
There was a problem hiding this comment.
Pull request overview
This PR completes Phase 0’s “threat model document” deliverable by replacing the placeholder docs/threat-model.md skeleton with a substantive threat model anchored in NIST SP 800-30 Rev.1 terminology and cross-referenced with MITRE ATT&CK, and updates the roadmap in README.md accordingly (closes #8).
Changes:
- Replaces
docs/threat-model.mdskeleton content with a comprehensive threat model covering assets, threat actors, trust boundaries, attack vectors (with “Test handle” guidance), mitigations, residual risk, out-of-scope items, and references. - Aligns threat-actor capability terminology with NIST SP 800-30 Rev.1 Appendix D (Very Low → Very High) and documents the terminology choice.
- Updates
README.mdPhase 0 roadmap entry to mark the threat model as complete and to note RFC-gating for future structural changes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Marks the Phase 0 threat model deliverable as complete and points readers to the threat model doc. |
| docs/threat-model.md | Replaces the placeholder skeleton with a full threat model document, including maintenance posture and references. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gonzafg2
left a comment
There was a problem hiding this comment.
Code Review — PR #19
Revisión multi-agente en paralelo: editorial, sustancia de seguridad, verificación de citas externas, y consistencia interna del repo. Documento revisado: docs/threat-model.md (1297 líneas) + README.md (1 línea).
🔴 Blockers
-
Versión de MITRE ATT&CK mal etiquetada en tres lugares. El PR body, §3.1, §5.5.1 y §9 dicen "ATT&CK Enterprise v17 (April 2026)". v17 = abril 2025; la release de abril 2026 es v19. La consolidación de
T1685que el documento atribuye a v17 también ocurrió en v19. Corregir av19 (April 2026)(ov17 (April 2025), updated through v19 (April 2026)si se quiere preservar el anclaje a v17). —docs/threat-model.md§3.1 (~L244), §5.5.1 (~L913), §9. -
§5.2.2 — Terrapin (CVE-2023-48795) ausente. El texto afirma que "la negotiation MAC liga la lista de algoritmos a la clave de sesión", que es exactamente el binding que Terrapin derrotó: la prefix-truncation attack opera a pesar de algorithm-name binding, porque los sequence numbers pre-NEWKEYS no estaban autenticados post-NEWKEYS. Para un servidor SSH que declara defenderse de adversarios on-path, omitir
strict-kex/kex-strict-{c,s}[email protected]es un hueco sustantivo. Agregar bullet en §6.1 y una frase en §5.2.2 reconociendo que el algorithm-name binding por sí solo es insuficiente post-CVE-2023-48795. —docs/threat-model.md:666-670. -
§7 — cita cruzada incorrecta. Bullet 2 dice "Compromise of the host or operator account (§5.3.4, §5.5.4)". §5.3.4 es "Authentication-process tampering", no compromiso de host/operator. Apuntar a §5.5.4 (+ §8.1 si aplica). —
docs/threat-model.md:1082. -
§9 — back-reference invertida.
infrastructure.mdse cita como "referenced from §6.4"; en realidad solo §6.5 lo menciona. Cambiar a §6.5 o añadir el cross-link en §6.4. —docs/threat-model.md:1290. -
ADR-0006 sobre-citado. §3.2.5 lo atribuye a "signed-commits, signed-tags, and dependency-discipline posture". ADR-0006 cubre solo firma de commits/etiquetas; la disciplina de dependencias vive en
deny.toml/ ADR-0011. Narrar a "signed-commits posture" o agregar la cita correcta. —docs/threat-model.md:394.
🟡 Should-fix
-
§1.3 contradice §3.2.5. El "one-sentence posture" dice "well-resourced state-level capability", pero §3.2.5 argumenta deliberadamente que el adversario HNDL Very-High no necesita ser nation-state en la práctica (bulk recording es barato; la criptanálisis futura es la parte cara — esa asimetría es el motivo del default PQ). Reformular §1.3 sin "state-level". —
:68-74vs:397-402. -
Insider / maintainer compromise no tiene actor propio. §3.2 enumera solo actores externos; §5.5.2 cubre cadena de suministro upstream pero no la toma de cuenta del maintainer del proyecto (clave de firma robada, takeover con merge rights). §3.2.5 lo menciona de pasada como técnica nation-state. Dado que ADR-0006/ADR-0008 son citados como mitigaciones, una entrada explícita —aunque sea Low likelihood— hace que esas mitigaciones cuelguen de una amenaza nombrada en lugar de flotar.
-
§4.3 — zeroización es softer de lo que la prosa sugiere. "Is zeroised after use where the language permits, is not written to swap" mezcla la garantía de Rust con responsabilidad operacional. La zeroización vía
zeroizees best-effort contra compiler reordering y no previene paging sinmlock/equivalente. Reformular a "best-effort zeroisation viazeroize; operators relying on memory-confidentiality should disable swap or usemlockall." —:483-486. -
§5.3.1 — rate-limit per-target-user crea oráculo de enumeración. En un servidor solo public-key, limitar por (source, target-user) diferencia respuesta para usuarios conocidos vs desconocidos. Eliminar la dimensión per-user o documentar el trade-off explícitamente. —
:735-736. -
§2.7 — audit record integrity goal mal clasificada como "long-term". El servidor no puede entregar integridad de largo plazo de registros que ya entregó a un sink externo. Reformular a "integrity at emission, plus a one-way emission path to a sink the attacker cannot reach". —
:198. -
§5.5.3 — forward secrecy necesita una precondición explícita. FS solo se sostiene si el ephemeral KEM material fue efectivamente destruido (§2.4) y si la host key no se usó para autenticar el KEX de manera que filtre el ephemeral. Una línea cierra el argumento. —
:965-968. -
§5.2.3 — SSHFP conflado con responsabilidad del servidor. El test handle vende SSHFP "via DNSSEC-validating tooling" como server-side; en realidad SSHFP es responsabilidad del operador de la zona DNS. —
:689-692. -
Test-handle paragraphs que no son test handles. §5.3.4 (
:800), §5.4.4 (:888), §5.5.4 (:986) devuelven "out of scope" bajo el header Test handle. Rompe la expectativa del implementador. Renombrar esos a Disposition o convertir en callouts de "Out of scope". -
Verbatim quotes de Tablas D-3/D-4 sin verificación byte-a-byte. Las citas entrecomilladas en §3.2.1 y §3.2.4 (
"May or may not target any specific organisations","very concerned about minimising detection") no pudieron cross-checkearse contra el PDF de NIST en esta sesión. Hacer una pasada manual contra el PDF antes del merge; si difieren, convertir las comillas en paráfrasis. -
§6.1 —
ssh-rsa(RSA con SHA-1) no mencionado. RFC 9142 también lo deprecia; agregar a la lista de "no legacy primitives" para completitud.
⚪ Nits
- Sin TOC en un documento de ~1300 líneas. Considerar un índice de una pantalla bajo el bloque de audiencia. —
:17-25. channelestá sobrecargado: qualifier de fuerza en §2, capa SSH en §2.5, "audit channel" en otros lugares. Definir en primer uso. —:88, :165.- Estilo de tactic-alignment inconsistente. §5.5 incluye gloss "(formerly Defense Evasion)"; §5.1-5.4 no glosan ATT&CK. Uniformar. —
:897. - Hyphenate "Single-command execution" para que case con la semántica del canal
exec. —:56. docs/rfcs/está vacío salvo template. Linkear arfcs/README.mden vez derfcs/para que el lector aterrice en prosa, no en un directory listing. —:12, :30.README.md:87es notablemente más largo que sus pares en la lista Phase 0. Cortar "Substantive content anchored in NIST SP 800-30 Rev.1 and MITRE ATT&CK;" (ya está en el documento) iguala la cadencia.- §1.3 y §3.2.5 tienen oraciones compuestas de 40-50 palabras. Partir mejora legibilidad. —
:68-74, :397-402. - Disambiguación SP 800-39 "Tier 1/2/3" es un punto editorial fuerte enterrado en prosa. Promover a footnote o callout. —
:233-239.
✅ Lo que está bien (no tocar)
- Estructura general, asset/goal mapping, posture HNDL, asimetría record-now-decrypt-later, out-of-scope con rationale, CNSA 2.0 disclaimer — coherentes, honestos, bien calibrados. La declaración explícita de no-perseguir NSS está fraseada de forma que no engañará a un operador federal.
- Citas externas verificadas: drafts IETF
draft-ietf-sshm-mlkem-hybrid-kexv10 (26 feb 2026), métodomlkem768x25519-sha256, predecesordraft-kampanakis-curdle-ssh-pq-ke; OpenSSH 10.0 default; RFCs 4251/4252/4253/4254/8709/9142; FIPS 203/204/205 (13 ago 2024); NIST SP 800-227 (sept 2025); NIST IR 8547 IPD (nov 2024, deprecation 2030 / disallow 2035); CISA/NSA/NIST Quantum-Readiness factsheet (21 ago 2023); Mosca 2015/1075; CNSA 2.0 (ML-KEM-1024 + ML-DSA-87 para NSS); framing de CVE-2024-3094 vía NVD + Red Hat RHSB-2024-001 (correcto: ATT&CK no lo documenta como procedure example deT1195.002). - IDs MITRE individuales (
T1190,T1110.001/.004,T1098.004,T1552.004,T1078,T1556,T1557+.002/.003/.004,T1563.001,T1550,T1572,T1090,T1685.004/.006,T1195.002,T1573,T1071,T1041,T1040) — todos resuelven con nombres consistentes con el uso del documento. - NIST SP 800-30 Rev.1 terminology note (Tier I-V no es del Rev.1; los "Tier 1/2/3" de SP 800-39 son tiers organizacionales) — correcto.
Closes #8confirmado (gh issue view 8: "Substantiate docs/threat-model.md before Phase 1 crypto code", labelsdocumentation+security).- Sin scope creep: exactamente dos archivos cambian (
README.md+1/-1,docs/threat-model.md+1279/-36). El cambio en README es exactamente la línea anunciada. - ADR-0006/0008/0015 existen y el framing de ADR-0015 como "intent mirrors" (no mapeo literal) es honesto.
- Convención de idioma (English en
docs/, Spanish solo enMANIFIESTO.es.md) respetada.
Recomendación
Pedir cambios. Blockers #1 (versión ATT&CK) y #2 (Terrapin) son sustantivos; #3-#5 son arreglos de minutos. Una vez resueltos, el documento queda en muy buena forma para acompañar Phase 1.
Revisión generada con cuatro agentes especializados en paralelo (technical-writer · security-engineer · deep-research · code-reviewer). Citas externas verificadas con WebFetch contra fuentes primarias (datatracker.ietf.org, attack.mitre.org, nvlpubs.nist.gov, csrc.nist.gov, nvd.nist.gov, openssh.org). Verbatim quotes de NIST SP 800-30 Rev.1 Tablas D-3/D-4 son la única clase de cita que no se pudo verificar byte-a-byte en esta pasada — requieren ojo humano antes del merge.
…fixes Applies the blockers and automatable should-fix items from the multi-agent code review of PR #19: Blockers: - Correct MITRE ATT&CK version references from v17 (April 2026) to v19 (April 2026); v17 was April 2025 and the T1685 consolidation occurred in v19. - Add Terrapin / CVE-2023-48795 coverage to §5.2.2 (algorithm-name binding alone is insufficient) and a strict-kex bullet to §6.1. - Fix §7 residual-risk cross-reference: (§5.3.4, §5.5.4) was wrong; §5.3.4 is authentication-process tampering, the intended target is (§5.5.4, §8.1) for host/operator-account compromise. - Fix §9 back-reference: infrastructure.md is cited from §6.5, not §6.4. - Narrow the §3.2.5 ADR-0006 citation: ADR-0006 covers signed commits/tags but not dependency discipline; the latter lives in deny.toml and is recorded in §5.5.2 / §6.4. Should-fix: - §1.3 no longer claims "state-level capability" so it stops contradicting §3.2.5's argument that HNDL need not be a nation-state. - §4.3 zeroisation goal made honest about best-effort guarantees and operator responsibility for swap/mlockall. - §5.3.1 drops the per-target-user rate-limit dimension that would create a user-enumeration oracle on a public-key-only server. - §2.7 audit-record integrity reframed as "integrity at emission" with a one-way path; long-term integrity belongs to the sink. - §5.5.3 forward-secrecy precondition (ephemeral KEM material destroyed; host key not used in a way that leaks the ephemeral) made explicit. - §5.2.3 SSHFP test handle no longer conflates server with DNS-zone responsibility. - §6.1 adds ssh-rsa (SHA-1-signed RSA host keys per RFC 9142 §4) to the legacy-primitives exclusion list. - §5.3.4, §5.4.4, §5.5.4 — out-of-scope "Test handle" headers renamed to "Disposition" to stop misleading implementers. Nits: - Add a one-line Contents index under the audience block. - Hyphenate "Single-command execution" in §1.2. - Re-link the first docs/rfcs/ reference to rfcs/README.md. - Drop the inconsistent "(formerly Defense Evasion)" gloss in §5.5. - README.md Phase-0 bullet shortened to match siblings' cadence. - §2 channel disambiguation note added at first use. Deferred to follow-up (#20): adding a "Project maintainer compromise" actor under §3.2. The document's own maintenance clause requires structural additions to the actor table to go through the RFC process. NIST SP 800-30 Rev.1 verbatim quotes in §3.2.1 and §3.2.4 still need a byte-for-byte check against the PDF before merge.
…th threat-model The threat model uses the hyphenated form to match the SSH exec channel semantics. README's Phase 1 roadmap listed the same feature unhyphenated.
…current Copilot's review of f98ba45 / 109062c flagged that §1.2's "The default profile supports:" and §6.2's "MVP supports pubkey auth, command execution, PTY, SFTP" read as current-state, even though README's roadmap scopes PTY and SFTP to Phase 2 and no Rust code has landed yet. §1.2 now names the phase target explicitly (Phase 1 vs Phase 2) and points at the README roadmap. §6.2 mirrors the same phase attribution. The convention matches the existing client-side disclaimer at §1.2 line 65 ("a client-side threat model will be added before any client code lands").
cd76907 to
e4b9789
Compare
Summary
docs/threat-model.mdwith ~1300 lines of substantive content across assets, threat actors, trust boundaries, attack vectors (each with a Test handle paragraph for Phase 1 implementers), mitigations, residual risk, out-of-scope items, and verified references.T1685consolidating the oldT1070.002/T1562.006audit-log mappings;T1219renamed to "Remote Access Tools"; tactic relabels).README.mdto mark the Phase 0 threat-model deliverable as complete, with future structural changes gated by the RFC process (mirroring ADR-0015).Anchoring decisions worth flagging
draft-ietf-sshm-mlkem-hybrid-kex(v10, 26 Feb 2026), not the olderdraft-kampanakis-curdle-ssh-pq-keslug. The standardised method name ismlkem768x25519-sha256, matching OpenSSH 10.0's default.T1195.002, because ATT&CK does not at present document the incident as a procedure example.docs/rfcs/.Closes #8.
Test plan
This is a documentation-only change; there is no code to run. Verification is editorial:
ADR-0006,ADR-0008,ADR-0015) resolves.T1190,T1110.x,T1098.004,T1552.004,T1078,T1556,T1557,T1563.001,T1550,T1572,T1090,T1685.004,T1685.006,T1195.002,T1573,T1071,T1041,T1040) matchattack.mitre.orgas of v19 (April 2026).README.md's Phase 0 roadmap entry no longer points at Substantiate docs/threat-model.md before Phase 1 crypto code #8 as open.