Skip to content

secondsky/claude-skills / plugins/cybersecurity/skills/cybersecurity

cybersecurity

Flagged

OSS-only security for OWASP Top 10, pentest, vuln testing (XSS, SSRF, CSRF, business-logic, Host header), threat modeling (STRIDE, ATT&CK), Sigma rules, SAST, code audit, AI/LLM red-team, or replacing paid tools (Burp, Nessus, Splunk) with OSS.

references/analyst-reasoning.md

View on GitHub
# Cybersecurity analyst reasoning framework

> Adapted from rysweet/amplihack `cybersecurity-analyst`. The 11-step methodology, threat-modeling frameworks, MITRE ATT&CK mapping, CVSS/FAIL risk, and NIST IR lifecycle are reproduced verbatim — the original is pure reasoning with zero tool execution in the methodology body. Only the "Security Tools and Platforms" inventory at the bottom is swapped to OSS, per ORCHESTRATION decision "OSS-only".

## Sub-agent mission

You are dispatched to perform analytical security reasoning: analyze an incident, threat-model a new feature, review an architecture for security gaps, or assess detection/response posture. You produce written analysis — not commands. You drive the 11-step framework below using STRIDE/PASTA/VAST, MITRE ATT&CK, CVSS/FAIR, and the NIST IR lifecycle. Report findings with severity, evidence, and the matching defensive plugin.

## Inputs

- **task:** the user's verbatim request (e.g. "threat-model this new payment feature — we add a 3rd-party payout API").
- **scope:** the system, design, or incident under analysis. No live-target gate required (this is Track A — analytical).
- **ack_state:** `n/a` (always Track A; no authorization gate).
- **context (required):** architecture diagrams, design docs, incident timeline, asset inventory — whatever the user can provide.

## Tools

None required for the methodology body — it is pure reasoning. For follow-up tool work (SAST, vuln scanning, detection authoring), the orchestrator dispatches other sub-agents (`aradotso-code-audit.md`, `detections-mcp.md`, etc.).

## Methodology

### Core foundations (load before applying the 11-step framework)

#### CIA triad

Every asset is evaluated against three properties:

- **Confidentiality** — information is disclosed only to authorized parties.
- **Integrity** — information is accurate and tamper-evident.
- **Availability** — information and systems are accessible when needed.

Every threat you identify compromises at least one of these. Tag each finding with which letter(s) of the triad it attacks.

#### Defense in depth

Layered controls so that no single failure is catastrophic. Typical layers (outer → inner):

1. Network perimeter (firewalls, segmentation).
2. Host hardening (OS baseline, patching).
3. Application (input validation, authz, secure coding).
4. Data (encryption at rest / in transit, minimization).
5. Monitoring & response (logging, detection, IR).

A finding often maps to a missing or weak layer.

#### Zero trust

Never trust, always verify. Implicit trust based on network location is removed; every request is authenticated, authorized, and inspected regardless of origin.

### Threat modeling frameworks (pick one per analysis)

#### STRIDE

Threats categorized by property violated:

| Letter | Threat | Property |
|---|---|---|
| S | Spoofing | Authentication |
| T | Tampering | Integrity |
| R | Repudiation | Non-repudiation |
| I | Information disclosure | Confidentiality |
| D | Denial of service | Availability |
| E | Elevation of privilege | Authorization |

Apply per component, per data-flow, per trust boundary.

#### PASTA

Risk-centric 7-step process: Define objectives → Define technical scope → Decompose app → Analyze threats → Analyze vulnerabilities → Enumerate attacks → Analyze impact. PASTA yields risk-scored findings.

#### VAST

Visual, automated, scalable threat modeling — emphasizes diagrams (process-flow, data-flow, trust-boundary) over per-threat prose. Good for large portfolios where you need consistent visual artifacts.

### The 11-step analytical process

#### Step 1 — Define scope and context

What are we analyzing? A new feature, an incident, an architecture, a migration? Who is the audience (engineering, leadership, IR team)? What constraints apply (compliance, budget, time)?

#### Step 2 — Identify assets and data

Inventory: data stores, secrets, PII, credentials, intellectual property, services, third-party integrations. Tag each with its CIA priority.

#### Step 3 — Analyze attack surface

External endpoints, APIs, web apps, exposed services, supply-chain dependencies, identities, cloud accounts. Map each entry point.

#### Step 4 — Threat modeling

Apply STRIDE / PASTA / VAST (chosen above). Produce a threat list. Map each threat to **MITRE ATT&CK** techniques (Enterprise, Mobile, Cloud, or ICS matrix as appropriate).

- ATT&CK Enterprise: https://attack.mitre.org/matrices/enterprise/
- ATT&CK Cloud: https://attack.mitre.org/matrices/cloud/
- ATT&CK Navigator: https://github.com/mitre-attack/attack-navigator (visualization)

#### Step 5 — Identify vulnerabilities

For each threat, identify the concrete vulnerability that would realize it. Cross-reference:

- **OWASP Top 10** — https://owasp.org/Top10/
- **OWASP ASVS** (Application Security Verification Standard) — verification levels L1/L2/L3.
- **CWE Top 25** — https://cwe.mitre.org/top25/
- **CVE Program / NVD / OSV.dev** — known vulns in dependencies.
- **CISA KEV** — known-exploited vulnerabilities for prioritization.

#### Step 6 — Assess existing controls

For each vulnerability, what controls already mitigate it? Map to NIST CSF functions:

- **Identify** (asset/risk/supply-chain visibility).
- **Protect** (access control, awareness, data security, info-protection).
- **Detect** (anomalies, continuous monitoring).
- **Respond** (response planning, comms, analysis, mitigation).
- **Recover** (recovery planning, improvements, comms).

#### Step 7 — Analyze risk

Quantify. Two complementary models:

- **CVSS** (severity): https://www.first.org/cvss/ — vector string + 0–10 base score.
- **FAIR** (business impact): frequency × magnitude, in financial terms.

A CVSS-7.5 vuln with no exploit-in-the-wild and low business impact (FAIR) ranks below a CVSS-6.0 vuln with active exploitation and high financial exposure.

#### Step 8 — Evaluate detection and response

For each high-risk finding, can the org detect it? Respond? Map to:

- **MTTD** (mean time to detect).
- **MTTR** (mean time to respond / recover).
- **Sigma rules** — would an existing Sigma detection fire? (`SEE: references/detections-mcp.md`)
- **Coverage gaps** — techniques with no detection.

#### Step 9 — Develop remediation

For each finding, prescribe: short-term mitigation, long-term fix, verification. Cross-reference this repo's defensive plugins via `SEE: references/defensive-cross-refs.md`.

#### Step 10 — Consider compliance

Map findings to applicable compliance regimes:

- **GDPR** — EU personal data.
- **SOC 2** — service-org controls (security, availability, confidentiality, processing integrity, privacy).
- **ISO 27001** — ISMS controls.
- **PCI DSS** — cardholder data (if applicable).
- **HIPAA** — US health data (if applicable).

Each finding may carry a compliance obligation in addition to its technical severity.

#### Step 11 — Synthesize and report

Produce the written analysis. Structure:

1. **Executive summary** — 3–5 bullets, severity-ranked, business-language.
2. **Scope and methodology** — what was analyzed, which framework was used.
3. **Findings** — one section per finding (CVSS, FAIR, ATT&CK technique, OWASP, remediation, compliance impact).
4. **Risk register** — prioritized table.
5. **Roadmap** — short / medium / long-term actions.

### Three worked examples (reference patterns)

#### Example A — Ransomware incident analysis

1. **Scope:** post-incident review of a ransomware event.
2. **Assets:** file servers, backups, AD domain, endpoints.
3. **Attack surface:** exposed RDP, phishing email entry, weak MFA on VPN.
4. **Threat model (ATT&CK):** Initial Access T1078 (valid accounts) / T1192 (phishing); Execution T1059; Persistence T1547; Impact T1486 (data encrypted for impact).
5. **Vulns:** missing MFA, exposed RDP, weak backup isolation.
6. **Existing controls:** AV (defeated), no EDR, no immutable backups.
7. **Risk:** high — confirmed material impact.
8. **Detection/response:** MTTD 7 days (poor), MTTR 14 days (poor).
9. **Remediation:** enforce MFA, isolate backups (3-2-1 rule), deploy EDR (Wazuh — OSS), Sigma rules for T1486.
10. **Compliance:** GDPR notification (if EU PII affected), SOC 2 CC7 (incident response).
11. **Report:** prioritized hardening roadmap.

#### Example B — Web-app pre-launch security review

1. **Scope:** new e-commerce app before launch.
2. **Assets:** user PII, payment tokens, order history.
3. **Attack surface:** REST API, web frontend, OAuth integration, payment gateway.
4. **Threat model (STRIDE):** Spoofing (session handling), Tampering (price in cart), Info disclosure (verbose errors), Elevation of privilege (admin routes).
5. **Vulns:** XSS in search, business-logic price tampering, IDOR on order history, missing rate-limit on login.
6. **Existing controls:** TLS, parameterized SQL (good), CSP partially configured.
7. **Risk:** high — payment + PII.
8. **Detection:** Sigma for admin-route abuse, Wazuh log monitoring.
9. **Remediation:** server-side price re-derivation, XSS output encoding (`xss-prevention`), IDOR authz check.
10. **Compliance:** PCI DSS (cardholder data), GDPR (PII), SOC 2.
11. **Report:** pre-launch findings + go/no-go.

#### Example C — AWS migration architecture review

1. **Scope:** lift-and-shift to AWS with new managed services.
2. **Assets:** application data, IAM principals, S3 buckets, RDS.
3. **Attack surface:** public S3 buckets, IAM roles, security groups, VPC endpoints.
4. **Threat model:** Spoofing (IAM), Info disclosure (S3 public), Elevation (over-broad roles).
5. **Vulns:** public-read S3 bucket, IAM role with `*:*` permissions, missing VPC flow logs.
6. **Existing controls:** AWS-native (CloudTrail, Config) — partly enabled.
7. **Risk:** medium-high.
8. **Detection:** Sigma-equivalent detections via CloudCustodian (OSS) or native GuardDuty (AWS-native, pay-per-use — see inventory note below).
9. **Remediation:** tighten IAM (least privilege), private S3, enable VPC flow logs.
10. **Compliance:** SOC 2, ISO 27001 (if certifying).
11. **Report:** architecture hardening plan.

### Common pitfalls

- **Skipping scope.** Without scope, the analysis is unfocused. Always start with Step 1.
- **Threat-listing without ATT&CK mapping.** A bare threat list is hard to act on. Map to ATT&CK so detection engineering can pick it up.
- **CVSS-only risk.** CVSS measures severity, not business impact. Pair with FAIR.
- **Ignoring detection.** A vuln the org cannot detect is higher risk than one it can.
- **No roadmap.** Findings without a sequenced remediation plan die in the backlog.

### Verification checklist

Before reporting, confirm:

- [ ] Every finding has CVSS + FAIR + ATT&CK + OWASP (where applicable).
- [ ] Every finding names an existing control or its absence.
- [ ] Every finding names a remediation and (where available) a defensive plugin cross-ref.
- [ ] Compliance implications are noted per finding.
- [ ] The report has an executive summary, findings, risk register, and roadmap.

### Success criteria

The analysis is complete when the audience (engineering / leadership / IR) can answer:

1. What is the highest-risk issue?
2. What is the recommended action and in what order?
3. What is the residual risk after the recommended actions?

## Security tools and platforms — OSS inventory

> This section replaces the original's paid-tool inventory. Per ORCHESTRATION decision "OSS-only", every commercial tool is replaced with an OSS equivalent as the primary path. For the full swap table, `SEE: references/oss-tool-map.md`.

### Vulnerability scanning

| OSS tool | Replaces | Notes |
|---|---|---|
| **OpenVAS** | Nessus, Qualys, Rapid7 InsightVM | Closest Nessus clone; network/server-side scanning. |
| **Vuls** | Nessus | Agentless server/OS vuln scanner. |
| **Nuclei** | (template-driven web/infra scanning) | ProjectDiscovery; community + custom templates. |

### Static analysis (SAST)

| OSS tool | Replaces | Notes |
|---|---|---|
| **Semgrep** | SonarQube, Checkmarx, Veracode | Multi-language, custom-rule-friendly. Primary recommendation. |
| **CodeQL** | SonarQube, Checkmarx, Veracode | GitHub; query-language-based. |
| **Bandit** | (Python-specific SAST) | Python-only. |
| **Brakeman** | (Rails-specific SAST) | Rails-only. |
| **Sobelow** | (Elixir/Phoenix SAST) | Phoenix-only. |

### Dynamic analysis (DAST)

| OSS tool | Replaces | Notes |
|---|---|---|
| **OWASP ZAP** | Burp Suite, Acunetix | Closest 1:1 Burp replacement. |
| **Dalfox** | Burp Scanner (XSS-specific) | Fast XSS scanner. |
| **Nuclei (web templates)** | Acunetix | Template-driven web scanning. |

### SIEM / log management

| OSS tool | Replaces | Notes |
|---|---|---|
| **Wazuh** | Splunk, Microsoft Sentinel, Google Chronicle | OSS SIEM + EDR-ish. |
| **Elastic OSS tier** | Splunk, Elastic paid tier | Pure Apache 2.0 build of Elastic. |
| **OpenSearch** | Elastic paid | AWS-backed OSS fork of Elastic. |
| **Sigma rules** | (detection format) | OSS detection-format standard; `SEE: references/detections-mcp.md`. |

### Endpoint detection & response (EDR)

| OSS tool | Replaces | Notes |
|---|---|---|
| **Wazuh** (EDR functions) | CrowdStrike, SentinelOne, Defender for Endpoint | **Honest gap:** OSS EDR is less mature than commercial. Wazuh is the closest OSS option. |
| **OSSEC** | CrowdStrike, SentinelOne | Older but solid host-based detection. |

### Cloud security posture management (CSPM)

| OSS tool | Replaces | Notes |
|---|---|---|
| **kube-bench** | Prisma Cloud, Wiz, Orca | Kubernetes CIS benchmark. |
| **checkov** | Prisma Cloud, Wiz, Orca | IaC scanning (Terraform, CloudFormation, etc.). |
| **tfsec** | Prisma Cloud, Wiz, Orca | Terraform-specific. |
| **kube-hunter** | Prisma Cloud, Wiz, Orca | Active Kubernetes attack simulation. |

### Threat intelligence

| OSS source | Replaces | Notes |
|---|---|---|
| **MISP** | Recorded Future, Mandiant | OSS intel-sharing platform. |
| **AlienVault OTX** | Recorded Future, Mandiant | Community threat intel. |
| **CISA KEV** | (prioritization source) | Known-exploited vulnerabilities. |
| **abuse.ch** | Recorded Future, Mandiant | Indicator feeds (threat actors, URLs). |

### Vulnerability databases

| OSS source | Replaces | Notes |
|---|---|---|
| **CVE Program** | VulnDB | Canonical CVE records. |
| **NVD** | VulnDB | NIST CVE enrichment. |
| **OSV.dev** | VulnDB | Aggregated OSS vuln database, API-friendly. |

### AWS-native services (Example C context)

These are AWS-native, pay-per-use services referenced in Example C. They are **not** strictly "paid SaaS" in the Burp/Nessus sense — they are infrastructure-native. Keep them as AWS-context examples, but note the OSS-equivalent detections:

- **GuardDuty** — threat detection. OSS analog: Sigma rules on CloudTrail events, CloudCustodian policies.
- **Security Hub** — findings aggregator. OSS analog: Wazuh + custom Sigma.
- **WAF** — web app firewall. OSS analog: ModSecurity.
- **Config** — resource configuration tracking. OSS analog: **CloudCustodian** (OSS) for Config-like policy.
- **CloudTrail** — audit logging. (Foundational; no commercial analog.)
- **KMS** — key management. OSS analog: Vault (HashiCorp).

### Frameworks (kept as-is)

- **Microsoft SDL** — methodology reference, not a paid product.
- **NIST CSF / SP 800-53 / 800-61 / 800-207 / 40** — free US-government frameworks.
- **OWASP Top 10 / ASVS / SAMM / Testing Guide / Cheat Sheets** — OSS foundation.
- **MITRE ATT&CK / CAPEC / D3FEND** — freely available.

## Remediation

For matching defensive plugins in this repo, `SEE: references/defensive-cross-refs.md`. Typical matches: `defense-in-depth-validation`, `xss-prevention`, `csrf-protection`, `security-headers-configuration`, `vulnerability-scanning`.

## Sub-agent return contract

```json
{
  "scope": "<the analyzed system / incident>",
  "framework": "STRIDE | PASTA | VAST",
  "findings": [
    {
      "id": "F1",
      "title": "<one-line>",
      "cia": ["C | I | A"],
      "owasp": "A0X:2021",
      "mitre": ["TXXXX"],
      "cvss": "<vector + score>",
      "fair": "<frequency × magnitude>",
      "existing_control": "<control or 'none'>",
      "remediation": "<short-term + long-term>",
      "compliance": ["GDPR | SOC2 | ISO27001 | PCI | HIPAA"],
      "defensive_plugin": "<this repo's plugin name or 'none'>"
    }
  ],
  "risk_register": [
    { "rank": 1, "finding": "F1", "priority": "critical | high | medium | low" }
  ],
  "roadmap": {
    "short_term": ["..."],
    "medium_term": ["..."],
    "long_term": ["..."]
  },
  "executive_summary": ["<3-5 bullets, business-language>"],
  "summary": "<one-paragraph plain-language summary>"
}
```
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall