@vigolium/piolium 0.0.1
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.
- package/LICENSE +21 -0
- package/README.md +117 -0
- package/agents/access-auditor.md +300 -0
- package/agents/assumption-breaker.md +154 -0
- package/agents/attack-designer.md +116 -0
- package/agents/code-scanner.md +139 -0
- package/agents/concurrency-auditor.md +238 -0
- package/agents/confirm-writer.md +257 -0
- package/agents/context-reviewer.md +274 -0
- package/agents/cross-verifier.md +165 -0
- package/agents/cve-scout.md +381 -0
- package/agents/env-builder.md +282 -0
- package/agents/env-profiler.md +205 -0
- package/agents/evidence-collector.md +140 -0
- package/agents/finding-grader.md +142 -0
- package/agents/finding-writer.md +148 -0
- package/agents/flow-tracer.md +106 -0
- package/agents/goal-backtracer.md +146 -0
- package/agents/history-miner.md +467 -0
- package/agents/independent-verifier.md +118 -0
- package/agents/intent-mapper.md +183 -0
- package/agents/longshot-collector.md +128 -0
- package/agents/longshot-prober.md +126 -0
- package/agents/patch-auditor.md +73 -0
- package/agents/poc-author.md +124 -0
- package/agents/poc-runner.md +194 -0
- package/agents/probe-lead.md +269 -0
- package/agents/red-challenger.md +101 -0
- package/agents/report-composer.md +208 -0
- package/agents/review-adjudicator.md +216 -0
- package/agents/spec-auditor.md +155 -0
- package/agents/taint-tracer.md +265 -0
- package/agents/test-locator.md +209 -0
- package/agents/threat-modeler.md +132 -0
- package/agents/variant-scanner.md +108 -0
- package/agents/variant-spotter.md +110 -0
- package/bin/piolium.mjs +376 -0
- package/extensions/piolium/_vendor/yaml.bundle.d.mts +6 -0
- package/extensions/piolium/_vendor/yaml.bundle.mjs +139 -0
- package/extensions/piolium/agent-runner.ts +322 -0
- package/extensions/piolium/agents.ts +266 -0
- package/extensions/piolium/audit-state.ts +522 -0
- package/extensions/piolium/bundled-resources.ts +97 -0
- package/extensions/piolium/candidate-scan.ts +966 -0
- package/extensions/piolium/command-target.ts +177 -0
- package/extensions/piolium/console-stream.ts +57 -0
- package/extensions/piolium/export-results.ts +380 -0
- package/extensions/piolium/findings.ts +448 -0
- package/extensions/piolium/heartbeat.ts +182 -0
- package/extensions/piolium/help.ts +234 -0
- package/extensions/piolium/index.ts +1865 -0
- package/extensions/piolium/longshot.ts +530 -0
- package/extensions/piolium/matcher-suggestions.ts +196 -0
- package/extensions/piolium/matcher-utils.ts +83 -0
- package/extensions/piolium/modes/balanced.ts +750 -0
- package/extensions/piolium/modes/confirm-bootstrap.ts +186 -0
- package/extensions/piolium/modes/confirm.ts +697 -0
- package/extensions/piolium/modes/deep.ts +917 -0
- package/extensions/piolium/modes/diff.ts +177 -0
- package/extensions/piolium/modes/lite.ts +540 -0
- package/extensions/piolium/modes/longshot.ts +595 -0
- package/extensions/piolium/modes/merge.ts +204 -0
- package/extensions/piolium/modes/phase-runner.ts +267 -0
- package/extensions/piolium/modes/reinvest.ts +546 -0
- package/extensions/piolium/modes/revisit.ts +279 -0
- package/extensions/piolium/modes.ts +48 -0
- package/extensions/piolium/phase-labels.ts +123 -0
- package/extensions/piolium/phase-status-strip.ts +92 -0
- package/extensions/piolium/prompt-prefix-editor.ts +39 -0
- package/extensions/piolium/providers/anthropic-vertex.ts +836 -0
- package/extensions/piolium/recon.ts +409 -0
- package/extensions/piolium/result-stats.ts +105 -0
- package/extensions/piolium/retry.ts +120 -0
- package/extensions/piolium/scheduler.ts +212 -0
- package/extensions/piolium/secrets.ts +368 -0
- package/extensions/piolium/tools/web-tools.ts +148 -0
- package/package.json +77 -0
- package/skills/agentic-actions-auditor/SKILL.md +327 -0
- package/skills/agentic-actions-auditor/references/action-profiles.md +186 -0
- package/skills/agentic-actions-auditor/references/cross-file-resolution.md +209 -0
- package/skills/agentic-actions-auditor/references/foundations.md +94 -0
- package/skills/agentic-actions-auditor/references/vector-a-env-var-intermediary.md +77 -0
- package/skills/agentic-actions-auditor/references/vector-b-direct-expression-injection.md +83 -0
- package/skills/agentic-actions-auditor/references/vector-c-cli-data-fetch.md +83 -0
- package/skills/agentic-actions-auditor/references/vector-d-pr-target-checkout.md +88 -0
- package/skills/agentic-actions-auditor/references/vector-e-error-log-injection.md +88 -0
- package/skills/agentic-actions-auditor/references/vector-f-subshell-expansion.md +82 -0
- package/skills/agentic-actions-auditor/references/vector-g-eval-of-ai-output.md +91 -0
- package/skills/agentic-actions-auditor/references/vector-h-dangerous-sandbox-configs.md +102 -0
- package/skills/agentic-actions-auditor/references/vector-i-wildcard-allowlists.md +88 -0
- package/skills/audit/SKILL.md +562 -0
- package/skills/audit/assets/icon.svg +7 -0
- package/skills/audit/hooks/scripts/validate_phase_output.py +550 -0
- package/skills/audit/references/adversarial-review.md +148 -0
- package/skills/audit/references/architecture-aware-sast.md +306 -0
- package/skills/audit/references/audit-workflow.md +737 -0
- package/skills/audit/references/chamber-protocol.md +384 -0
- package/skills/audit/references/creative-attack-modes.md +221 -0
- package/skills/audit/references/deep-analysis.md +273 -0
- package/skills/audit/references/domain-attack-playbooks.md +1129 -0
- package/skills/audit/references/knowledge-base-template.md +513 -0
- package/skills/audit/references/real-env-validation.md +191 -0
- package/skills/audit/references/report-templates.md +417 -0
- package/skills/audit/references/triage-and-prereqs.md +134 -0
- package/skills/audit/scripts/consolidate_drafts.py +554 -0
- package/skills/audit/scripts/partition_findings.py +152 -0
- package/skills/audit/scripts/rg-hotspots.sh +121 -0
- package/skills/audit/scripts/stamp_file_state.py +349 -0
- package/skills/code-reviewer/SKILL.md +65 -0
- package/skills/codeql/SKILL.md +281 -0
- package/skills/codeql/references/build-fixes.md +90 -0
- package/skills/codeql/references/diagnostic-query-templates.md +339 -0
- package/skills/codeql/references/extension-yaml-format.md +209 -0
- package/skills/codeql/references/important-only-suite.md +153 -0
- package/skills/codeql/references/language-details.md +207 -0
- package/skills/codeql/references/macos-arm64e-workaround.md +179 -0
- package/skills/codeql/references/performance-tuning.md +111 -0
- package/skills/codeql/references/quality-assessment.md +172 -0
- package/skills/codeql/references/ruleset-catalog.md +63 -0
- package/skills/codeql/references/run-all-suite.md +92 -0
- package/skills/codeql/references/sarif-processing.md +79 -0
- package/skills/codeql/references/threat-models.md +51 -0
- package/skills/codeql/workflows/build-database.md +280 -0
- package/skills/codeql/workflows/create-data-extensions.md +261 -0
- package/skills/codeql/workflows/run-analysis.md +301 -0
- package/skills/differential-review/SKILL.md +220 -0
- package/skills/differential-review/adversarial.md +203 -0
- package/skills/differential-review/methodology.md +234 -0
- package/skills/differential-review/patterns.md +300 -0
- package/skills/differential-review/reporting.md +369 -0
- package/skills/fp-check/SKILL.md +125 -0
- package/skills/fp-check/references/bug-class-verification.md +114 -0
- package/skills/fp-check/references/deep-verification.md +143 -0
- package/skills/fp-check/references/evidence-templates.md +91 -0
- package/skills/fp-check/references/false-positive-patterns.md +115 -0
- package/skills/fp-check/references/gate-reviews.md +27 -0
- package/skills/fp-check/references/standard-verification.md +78 -0
- package/skills/insecure-defaults/SKILL.md +117 -0
- package/skills/insecure-defaults/references/examples.md +409 -0
- package/skills/last30days/SKILL.md +444 -0
- package/skills/sarif-parsing/SKILL.md +483 -0
- package/skills/sarif-parsing/resources/jq-queries.md +162 -0
- package/skills/sarif-parsing/resources/sarif_helpers.py +331 -0
- package/skills/security-threat-model/LICENSE.txt +201 -0
- package/skills/security-threat-model/SKILL.md +81 -0
- package/skills/security-threat-model/agents/openai.yaml +4 -0
- package/skills/security-threat-model/references/prompt-template.md +255 -0
- package/skills/security-threat-model/references/security-controls-and-assets.md +32 -0
- package/skills/semgrep/SKILL.md +212 -0
- package/skills/semgrep/references/rulesets.md +162 -0
- package/skills/semgrep/references/scan-modes.md +110 -0
- package/skills/semgrep/references/scanner-task-prompt.md +140 -0
- package/skills/semgrep/scripts/merge_sarif.py +203 -0
- package/skills/semgrep/workflows/scan-workflow.md +311 -0
- package/skills/semgrep-rule-creator/SKILL.md +168 -0
- package/skills/semgrep-rule-creator/references/quick-reference.md +202 -0
- package/skills/semgrep-rule-creator/references/workflow.md +240 -0
- package/skills/semgrep-rule-variant-creator/SKILL.md +205 -0
- package/skills/semgrep-rule-variant-creator/references/applicability-analysis.md +250 -0
- package/skills/semgrep-rule-variant-creator/references/language-syntax-guide.md +324 -0
- package/skills/semgrep-rule-variant-creator/references/workflow.md +518 -0
- package/skills/sharp-edges/SKILL.md +292 -0
- package/skills/sharp-edges/references/auth-patterns.md +252 -0
- package/skills/sharp-edges/references/case-studies.md +274 -0
- package/skills/sharp-edges/references/config-patterns.md +333 -0
- package/skills/sharp-edges/references/crypto-apis.md +190 -0
- package/skills/sharp-edges/references/lang-c.md +205 -0
- package/skills/sharp-edges/references/lang-csharp.md +285 -0
- package/skills/sharp-edges/references/lang-go.md +270 -0
- package/skills/sharp-edges/references/lang-java.md +263 -0
- package/skills/sharp-edges/references/lang-javascript.md +269 -0
- package/skills/sharp-edges/references/lang-kotlin.md +265 -0
- package/skills/sharp-edges/references/lang-php.md +245 -0
- package/skills/sharp-edges/references/lang-python.md +274 -0
- package/skills/sharp-edges/references/lang-ruby.md +273 -0
- package/skills/sharp-edges/references/lang-rust.md +272 -0
- package/skills/sharp-edges/references/lang-swift.md +287 -0
- package/skills/sharp-edges/references/language-specific.md +588 -0
- package/skills/spec-to-code-compliance/SKILL.md +357 -0
- package/skills/spec-to-code-compliance/resources/COMPLETENESS_CHECKLIST.md +69 -0
- package/skills/spec-to-code-compliance/resources/IR_EXAMPLES.md +417 -0
- package/skills/spec-to-code-compliance/resources/OUTPUT_REQUIREMENTS.md +105 -0
- package/skills/supply-chain-risk-auditor/SKILL.md +67 -0
- package/skills/supply-chain-risk-auditor/resources/results-template.md +41 -0
- package/skills/variant-analysis/METHODOLOGY.md +327 -0
- package/skills/variant-analysis/SKILL.md +142 -0
- package/skills/variant-analysis/resources/codeql/cpp.ql +119 -0
- package/skills/variant-analysis/resources/codeql/go.ql +69 -0
- package/skills/variant-analysis/resources/codeql/java.ql +71 -0
- package/skills/variant-analysis/resources/codeql/javascript.ql +63 -0
- package/skills/variant-analysis/resources/codeql/python.ql +80 -0
- package/skills/variant-analysis/resources/semgrep/cpp.yaml +98 -0
- package/skills/variant-analysis/resources/semgrep/go.yaml +63 -0
- package/skills/variant-analysis/resources/semgrep/java.yaml +61 -0
- package/skills/variant-analysis/resources/semgrep/javascript.yaml +60 -0
- package/skills/variant-analysis/resources/semgrep/python.yaml +72 -0
- package/skills/variant-analysis/resources/variant-report-template.md +75 -0
- package/skills/vuln-report/SKILL.md +137 -0
- package/skills/vuln-report/agents/openai.yaml +4 -0
- package/skills/vuln-report/references/report-template.md +135 -0
- package/skills/wooyun-legacy/SKILL.md +367 -0
- package/skills/wooyun-legacy/references/bank-penetration.md +222 -0
- package/skills/wooyun-legacy/references/checklists/command-execution-checklist.md +119 -0
- package/skills/wooyun-legacy/references/checklists/csrf-checklist.md +74 -0
- package/skills/wooyun-legacy/references/checklists/file-upload-checklist.md +108 -0
- package/skills/wooyun-legacy/references/checklists/info-disclosure-checklist.md +114 -0
- package/skills/wooyun-legacy/references/checklists/logic-flaws-checklist.md +95 -0
- package/skills/wooyun-legacy/references/checklists/misconfig-checklist.md +124 -0
- package/skills/wooyun-legacy/references/checklists/path-traversal-checklist.md +87 -0
- package/skills/wooyun-legacy/references/checklists/rce-checklist.md +93 -0
- package/skills/wooyun-legacy/references/checklists/sql-injection-checklist.md +97 -0
- package/skills/wooyun-legacy/references/checklists/ssrf-checklist.md +99 -0
- package/skills/wooyun-legacy/references/checklists/unauthorized-access-checklist.md +89 -0
- package/skills/wooyun-legacy/references/checklists/weak-password-checklist.md +115 -0
- package/skills/wooyun-legacy/references/checklists/xss-checklist.md +103 -0
- package/skills/wooyun-legacy/references/checklists/xxe-checklist.md +130 -0
- package/skills/wooyun-legacy/references/info-disclosure.md +975 -0
- package/skills/wooyun-legacy/references/logic-flaws.md +721 -0
- package/skills/wooyun-legacy/references/path-traversal.md +1191 -0
- package/skills/wooyun-legacy/references/telecom-penetration.md +156 -0
- package/skills/wooyun-legacy/references/unauthorized-access.md +980 -0
- package/skills/wooyun-legacy/references/xss.md +746 -0
- package/skills/zeroize-audit/SKILL.md +371 -0
- package/skills/zeroize-audit/configs/c.yaml +21 -0
- package/skills/zeroize-audit/configs/default.yaml +128 -0
- package/skills/zeroize-audit/configs/rust.yaml +83 -0
- package/skills/zeroize-audit/prompts/report_template.md +238 -0
- package/skills/zeroize-audit/prompts/system.md +163 -0
- package/skills/zeroize-audit/prompts/task.md +97 -0
- package/skills/zeroize-audit/references/compile-commands.md +231 -0
- package/skills/zeroize-audit/references/detection-strategy.md +191 -0
- package/skills/zeroize-audit/references/ir-analysis.md +252 -0
- package/skills/zeroize-audit/references/mcp-analysis.md +221 -0
- package/skills/zeroize-audit/references/poc-generation.md +470 -0
- package/skills/zeroize-audit/references/rust-zeroization-patterns.md +867 -0
- package/skills/zeroize-audit/schemas/input.json +83 -0
- package/skills/zeroize-audit/schemas/output.json +140 -0
- package/skills/zeroize-audit/tools/analyze_asm.sh +202 -0
- package/skills/zeroize-audit/tools/analyze_cfg.py +381 -0
- package/skills/zeroize-audit/tools/analyze_heap.sh +211 -0
- package/skills/zeroize-audit/tools/analyze_ir_semantic.py +429 -0
- package/skills/zeroize-audit/tools/diff_ir.sh +135 -0
- package/skills/zeroize-audit/tools/diff_rust_mir.sh +189 -0
- package/skills/zeroize-audit/tools/emit_asm.sh +67 -0
- package/skills/zeroize-audit/tools/emit_ir.sh +77 -0
- package/skills/zeroize-audit/tools/emit_rust_asm.sh +178 -0
- package/skills/zeroize-audit/tools/emit_rust_ir.sh +150 -0
- package/skills/zeroize-audit/tools/emit_rust_mir.sh +158 -0
- package/skills/zeroize-audit/tools/extract_compile_flags.py +284 -0
- package/skills/zeroize-audit/tools/generate_poc.py +1329 -0
- package/skills/zeroize-audit/tools/mcp/apply_confidence_gates.py +113 -0
- package/skills/zeroize-audit/tools/mcp/check_mcp.sh +68 -0
- package/skills/zeroize-audit/tools/mcp/normalize_mcp_evidence.py +125 -0
- package/skills/zeroize-audit/tools/scripts/check_llvm_patterns.py +481 -0
- package/skills/zeroize-audit/tools/scripts/check_mir_patterns.py +554 -0
- package/skills/zeroize-audit/tools/scripts/check_rust_asm.py +424 -0
- package/skills/zeroize-audit/tools/scripts/check_rust_asm_aarch64.py +300 -0
- package/skills/zeroize-audit/tools/scripts/check_rust_asm_x86.py +283 -0
- package/skills/zeroize-audit/tools/scripts/find_dangerous_apis.py +375 -0
- package/skills/zeroize-audit/tools/scripts/semantic_audit.py +923 -0
- package/skills/zeroize-audit/tools/track_dataflow.sh +196 -0
- package/skills/zeroize-audit/tools/validate_rust_toolchain.sh +298 -0
- package/skills/zeroize-audit/workflows/phase-0-preflight.md +150 -0
- package/skills/zeroize-audit/workflows/phase-1-source-analysis.md +144 -0
- package/skills/zeroize-audit/workflows/phase-2-compiler-analysis.md +139 -0
- package/skills/zeroize-audit/workflows/phase-3-interim-report.md +46 -0
- package/skills/zeroize-audit/workflows/phase-4-poc-generation.md +46 -0
- package/skills/zeroize-audit/workflows/phase-5-poc-validation.md +136 -0
- package/skills/zeroize-audit/workflows/phase-6-final-report.md +44 -0
- package/skills/zeroize-audit/workflows/phase-7-test-generation.md +42 -0
- package/themes/piolium-srcery.json +94 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vuln-report
|
|
3
|
+
description: Draft a single-vulnerability report in GitHub advisory style from an audit finding, bug note, patch diff, PoC, or code review evidence. Use when Codex needs to turn one confirmed security issue into a clean disclosure-ready report with the fixed section set — Summary; Severity, Confidence, Vulnerability Type; Impact; Affected Component; Source to Sink Flow; Vulnerable Code; Proof of concept & Evidence; Preconditions; Remediation — with embedded code snippets, explanatory prose that points to the vulnerable code, and inline GitHub markdown links to source evidence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# vuln-report.md
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Draft one disclosure-ready report for one confirmed bug. Keep the report evidence-driven, concrete, and concise. Prefer the section order and phrasing rules in [references/report-template.md](references/report-template.md).
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Confirm the report is about one bug only.
|
|
15
|
+
2. Extract the minimum facts needed to prove the issue:
|
|
16
|
+
- vulnerable component or behavior
|
|
17
|
+
- attacker-controlled input or missing validation
|
|
18
|
+
- preconditions and trust boundary
|
|
19
|
+
- exploit result
|
|
20
|
+
- practical impact
|
|
21
|
+
- strongest reproduction path
|
|
22
|
+
- decisive source locations and any relevant fix commit
|
|
23
|
+
3. Separate demonstrated facts from inference. State assumptions explicitly.
|
|
24
|
+
4. Draft the report using the required section order from [references/report-template.md](references/report-template.md).
|
|
25
|
+
5. Always embed at least one fenced code snippet from the decisive code path, and explain what each snippet proves.
|
|
26
|
+
6. Always convert repository file references and patch references into GitHub markdown links, and prefer embedding those links directly into the surrounding explanation instead of listing them separately.
|
|
27
|
+
7. Keep the nine-section contract exactly; fold any enrichment (CWE/CVSS, preconditions, references) inside the relevant required section rather than adding new H2s.
|
|
28
|
+
8. Save the final report as `report.md` inside a folder named with the bug's severity identifier (`C1`, `H1`, `M1`, etc.) followed by a lowercase hyphenated slug derived from the final report title. Use `C` for Critical, `H` for High, `M` for Medium, sequentially numbered if there are multiple bugs of the same severity. Example: `C1-cross-site-websocket-hijacking-re-enabled-by-allow-websocket/report.md`. Also, ensure the bug report title and internal references use this ID (e.g., '[C1] Cross-Site WebSocket Hijacking'). Do not write reports for Low severity findings — document them in the summary table only.
|
|
29
|
+
9. Remove filler, hedging, and unproven claims before finalizing.
|
|
30
|
+
|
|
31
|
+
## Required Sections
|
|
32
|
+
|
|
33
|
+
The report begins with a single `# <Finding Title>` H1 (prefixed with the
|
|
34
|
+
severity ID, e.g. `# [C1] SQL Injection in Login`), then exactly these H2
|
|
35
|
+
sections, in this order, with these exact headings:
|
|
36
|
+
|
|
37
|
+
1. `## Summary`
|
|
38
|
+
2. `## Severity, Confidence, Vulnerability Type`
|
|
39
|
+
3. `## Impact`
|
|
40
|
+
4. `## Affected Component`
|
|
41
|
+
5. `## Source to Sink Flow`
|
|
42
|
+
6. `## Vulnerable Code`
|
|
43
|
+
7. `## Proof of concept & Evidence`
|
|
44
|
+
8. `## Preconditions`
|
|
45
|
+
9. `## Remediation`
|
|
46
|
+
|
|
47
|
+
This is a fixed contract — every report uses this exact set and order so the
|
|
48
|
+
report-composer and downstream tooling can parse sections deterministically.
|
|
49
|
+
Do **not** add a standalone `Details` or `Root Cause` section: the root-cause
|
|
50
|
+
analysis is the closing paragraph of `## Source to Sink Flow`. Do not rename,
|
|
51
|
+
reorder, merge, or drop any of the nine required sections even if a section is
|
|
52
|
+
thin — write `None.` or `Not applicable.` rather than omitting it.
|
|
53
|
+
|
|
54
|
+
## Evidence Rules
|
|
55
|
+
|
|
56
|
+
- Include one or more fenced code snippets in the report, primarily in `Vulnerable Code` (and `Source to Sink Flow` where a snippet clarifies the path).
|
|
57
|
+
- Use the smallest snippet that proves the bug.
|
|
58
|
+
- Introduce each cited code location with a short explanation of why it matters; do not drop raw link lists without commentary.
|
|
59
|
+
- Add GitHub markdown links for source files, line anchors, controllers, helpers, patch commits, or affected surfaces whenever the repository is on GitHub and the target URL is known or can be derived.
|
|
60
|
+
- When constructing GitHub source links, use the latest commit SHA (from `git rev-parse HEAD` or the most recent commit visible in context) instead of a branch name such as `main` or `master`, so links remain stable after future commits.
|
|
61
|
+
- Prefer embedding inline markdown links into explanatory sentences such as `The following code in [build_request](https://github.com/org/repo/blob/main/src/executor.rs#L10) reads attacker-controlled input without validation.`
|
|
62
|
+
- Keep non-GitHub standards or spec citations as normal markdown links.
|
|
63
|
+
|
|
64
|
+
## Self-Contained Rule
|
|
65
|
+
|
|
66
|
+
`report.md` is a disclosure-ready artefact. The reader must understand the vulnerability, the trace, the impact, and the reproduction without opening any sibling working file (drafts, debate transcripts, review notes, internal metadata).
|
|
67
|
+
|
|
68
|
+
- Do not write prose pointers such as `See draft.md`, `See debate.md`, `See adversarial-review.md`, `See metadata.json`, `See pN-NNN for full trace`, `See AP-NNN`, `Refer to the draft for impact analysis`, or `for the full trace see ...`. If that content is needed in the report, **inline it**.
|
|
69
|
+
- Do not cite internal phase IDs (`pN-NNN`, `p10-NNN`, `AP-NNN`) — these are pipeline bookkeeping, not reader-facing references.
|
|
70
|
+
- Sibling-file references are only allowed for runnable evidence artefacts shipped alongside the report (e.g. `poc.<ext>`, `evidence/<file>`), and only inside the `Proof of concept & Evidence` or `Impact` sections. Quote the decisive lines from logs inline rather than telling the reader to open them.
|
|
71
|
+
- GitHub links to source code (pinned to a commit SHA) are external evidence, not deferred narrative — those are required, not banned.
|
|
72
|
+
- Before finalizing, scan the draft for the banned phrasings above and rewrite any occurrence to inline the content.
|
|
73
|
+
|
|
74
|
+
## Section Rules
|
|
75
|
+
|
|
76
|
+
### Summary
|
|
77
|
+
|
|
78
|
+
One short paragraph: the vulnerable behavior, the attacker control, and the outcome. Name the component only if it improves clarity.
|
|
79
|
+
|
|
80
|
+
### Severity, Confidence, Vulnerability Type
|
|
81
|
+
|
|
82
|
+
A compact block, not prose. State **Severity** (Critical/High/Medium with a one-line justification or CVSS vector), **Confidence** (how certain the finding is — e.g. `Confirmed (PoC executed)`, `Firm (code-traced, PoC theoretical)`, `Tentative`), and **Vulnerability Type** (the class, with `CWE-NNN` when known). This is the section that absorbs CWE/CVSS enrichment.
|
|
83
|
+
|
|
84
|
+
### Impact
|
|
85
|
+
|
|
86
|
+
Describe exploitability and consequence, not just severity labels: who is exposed, what the attacker gains, and which environments are most at risk. Distinguish observed impact (from `evidence/` logs) from inferred impact.
|
|
87
|
+
|
|
88
|
+
### Affected Component
|
|
89
|
+
|
|
90
|
+
Name the concrete component(s), service(s), endpoint(s), or module(s) in scope, with the primary file path(s). Keep it to the surface the bug lives on — not the full trace (that is the next section).
|
|
91
|
+
|
|
92
|
+
### Source to Sink Flow
|
|
93
|
+
|
|
94
|
+
Walk the path from attacker-controlled **source** to the dangerous **sink**: the exact entry point, the handlers/parsers/validation gates it passes, and where the protection is missing or bypassed. Name the specific branch, handler, or check. **Close this section with the root cause** — one or two sentences naming the design or implementation mistake in causal language (missing origin validation, unsafe trust in extension-derived MIME, policy enforced only in one execution mode, …). There is no separate Root Cause section; it lives here.
|
|
95
|
+
|
|
96
|
+
### Vulnerable Code
|
|
97
|
+
|
|
98
|
+
The smallest fenced code snippet(s) that prove the bug, each introduced by a one-line explanation of why it matters and accompanied by a GitHub markdown link pinned to the commit SHA. This is the decisive-snippet section — keep it tight.
|
|
99
|
+
|
|
100
|
+
### Proof of concept & Evidence
|
|
101
|
+
|
|
102
|
+
The shortest reliable reproduction: numbered steps and a runnable request/command/code block, with the expected result. If `poc.<ext>` exists, describe it in prose and reference its path; if `evidence/exploit.log` / `evidence/impact.log` exist, quote the decisive lines inline that prove the security effect. If there is no working PoC (theoretical/blocked finding), state that explicitly as `No working PoC — <PoC-Status>: <reason>` and fall back to the code-level evidence that establishes the bug.
|
|
103
|
+
|
|
104
|
+
### Preconditions
|
|
105
|
+
|
|
106
|
+
The conditions an attacker needs: authentication reality (`Auth-Required: yes/no` and which roles), attack vector / network position (remote vs local), non-default configuration, required state, and any exploit constraints. Absorbs the old "attack preconditions / authentication reality" enrichment.
|
|
107
|
+
|
|
108
|
+
### Remediation
|
|
109
|
+
|
|
110
|
+
The concrete fix: what to change and why it closes the source-to-sink gap. Include spec/guidance references or the fixing-commit metadata here when relevant. Prefer specific, actionable guidance over generic advice.
|
|
111
|
+
|
|
112
|
+
## Enrichment Inside Required Sections
|
|
113
|
+
|
|
114
|
+
There are no extra top-level sections. Anything that used to be an optional
|
|
115
|
+
section now lives **inside** one of the nine required sections:
|
|
116
|
+
|
|
117
|
+
- `CWE`, `CVSS` vector, and the vulnerability class → `## Severity, Confidence, Vulnerability Type`
|
|
118
|
+
- authentication reality, non-default assumptions, exploit constraints, deployment qualifiers → `## Preconditions`
|
|
119
|
+
- specification / guidance references, patch or fix-commit metadata → `## Remediation` (or inline in `## Source to Sink Flow` where it explains the gap)
|
|
120
|
+
- affected surfaces / scope notes → `## Affected Component`
|
|
121
|
+
|
|
122
|
+
Add this enrichment only when it is supported by evidence and improves triage.
|
|
123
|
+
Never promote it to its own H2.
|
|
124
|
+
|
|
125
|
+
## Quality Bar
|
|
126
|
+
|
|
127
|
+
- Keep one bug per report.
|
|
128
|
+
- Number bugs using severity prefixes (C1, H1, M1) and prefix both the report title and the folder name with this ID. Low severity findings are not reported individually.
|
|
129
|
+
- Save each single-bug report to `<ID>-<title-slug>/report.md`.
|
|
130
|
+
- Make the exploit story readable without external context — and explicitly without opening any sibling working file (`draft.md`, `debate.md`, `adversarial-review.md`, `metadata.json`). See the Self-Contained Rule.
|
|
131
|
+
- No pointer prose to sibling narrative files or internal phase IDs (`pN-NNN`, `AP-NNN`). Inline the content.
|
|
132
|
+
- Use exact file paths, endpoints, headers, options, or modes when they matter.
|
|
133
|
+
- Distinguish observed behavior from likely impact.
|
|
134
|
+
- Prefer measured severity language over inflated claims.
|
|
135
|
+
- Preserve repository-specific terminology if the source material already uses it.
|
|
136
|
+
- Include fenced code snippets and GitHub markdown links in every report.
|
|
137
|
+
- End with a report that can be pasted into an advisory, audit finding, or maintainer issue with minimal cleanup.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Report Template
|
|
2
|
+
|
|
3
|
+
Use this template for a single confirmed (or theoretical) vulnerability. Remove placeholder notes before final output.
|
|
4
|
+
|
|
5
|
+
## Required Shape
|
|
6
|
+
|
|
7
|
+
Save the final report as `report.md` inside the finding directory (`<ID>-<slug>/report.md`). The H1 title is prefixed with the severity ID (e.g. `# [C1] ...`). The nine H2 sections below are a fixed contract — same set, same order, same headings, every time. Never add, rename, reorder, merge, or drop one; if a section is thin write `None.` / `Not applicable.` instead of omitting it.
|
|
8
|
+
|
|
9
|
+
```md
|
|
10
|
+
# [C1] <Finding Title>
|
|
11
|
+
|
|
12
|
+
## Summary
|
|
13
|
+
|
|
14
|
+
[One paragraph: vulnerable behavior, attacker control, outcome.]
|
|
15
|
+
|
|
16
|
+
## Severity, Confidence, Vulnerability Type
|
|
17
|
+
|
|
18
|
+
- **Severity:** Critical | High | Medium — [one-line justification or CVSS vector]
|
|
19
|
+
- **Confidence:** Confirmed (PoC executed) | Firm (code-traced, PoC theoretical) | Tentative
|
|
20
|
+
- **Vulnerability Type:** [class, e.g. SQL Injection] (`CWE-NNN`)
|
|
21
|
+
|
|
22
|
+
## Impact
|
|
23
|
+
|
|
24
|
+
[Who is affected, under what conditions, and what the attacker achieves. Separate observed impact (evidence/ logs) from inferred impact.]
|
|
25
|
+
|
|
26
|
+
## Affected Component
|
|
27
|
+
|
|
28
|
+
[Concrete component / service / endpoint / module in scope, with primary file path(s).]
|
|
29
|
+
|
|
30
|
+
## Source to Sink Flow
|
|
31
|
+
|
|
32
|
+
[Walk attacker-controlled source → dangerous sink: entry point, handlers/parsers/validation gates passed, where the protection is missing or bypassed. Name the exact branch/handler/check.]
|
|
33
|
+
|
|
34
|
+
[Close with the root cause: one or two sentences naming the design or implementation mistake in causal language. There is no separate Root Cause section.]
|
|
35
|
+
|
|
36
|
+
## Vulnerable Code
|
|
37
|
+
|
|
38
|
+
[Why this snippet matters:] in [`path/to/file.ext`](https://github.com/org/repo/blob/<sha>/path/to/file.ext#L10):
|
|
39
|
+
|
|
40
|
+
```language
|
|
41
|
+
// Smallest decisive snippet from the vulnerable path
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Proof of concept & Evidence
|
|
45
|
+
|
|
46
|
+
1. [Setup step]
|
|
47
|
+
2. [Exploit step]
|
|
48
|
+
3. [Observed or expected result]
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Minimal reproducible command or request
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
[If poc.<ext> exists, name it and quote the decisive evidence/exploit.log or evidence/impact.log lines inline. If there is no working PoC, write: `No working PoC — <PoC-Status>: <reason>` and give the code-level evidence that establishes the bug.]
|
|
55
|
+
|
|
56
|
+
## Preconditions
|
|
57
|
+
|
|
58
|
+
[Auth reality (Auth-Required: yes/no + roles), attack vector / network position (remote vs local), non-default config, required state, exploit constraints.]
|
|
59
|
+
|
|
60
|
+
## Remediation
|
|
61
|
+
|
|
62
|
+
[Concrete fix: what to change and why it closes the source-to-sink gap. Spec/guidance references or fixing-commit metadata go here when relevant.]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Writing Rules
|
|
66
|
+
|
|
67
|
+
### Global
|
|
68
|
+
|
|
69
|
+
- Include fenced code snippets in every report (primarily in `Vulnerable Code`).
|
|
70
|
+
- Use GitHub markdown links for repository files, line anchors, and commits, pinned to the commit SHA (`git rev-parse HEAD`), not a branch name.
|
|
71
|
+
- Prefer linked file paths over bare URLs.
|
|
72
|
+
- Store the finished report at `<ID>-<slug>/report.md`.
|
|
73
|
+
|
|
74
|
+
### Summary
|
|
75
|
+
|
|
76
|
+
- One paragraph. Mention the attacker-controlled input or missing validation and the resulting security effect.
|
|
77
|
+
|
|
78
|
+
### Severity, Confidence, Vulnerability Type
|
|
79
|
+
|
|
80
|
+
- A compact labelled block, not prose. This is where CWE/CVSS enrichment lives.
|
|
81
|
+
- `Confidence` must reflect reality: `Confirmed (PoC executed)` only when a PoC actually ran.
|
|
82
|
+
|
|
83
|
+
### Impact
|
|
84
|
+
|
|
85
|
+
- Practical consequence first. Distinguish default exposure from non-default but realistic exposure. Distinguish observed from inferred.
|
|
86
|
+
|
|
87
|
+
### Affected Component
|
|
88
|
+
|
|
89
|
+
- The surface the bug lives on (component/endpoint/module + primary path) — not the full trace.
|
|
90
|
+
|
|
91
|
+
### Source to Sink Flow
|
|
92
|
+
|
|
93
|
+
- Walk from input to sink; name the exact branch, handler, parser, or validation gate.
|
|
94
|
+
- End with the root cause: the fault, not the symptom, tied to the path just described.
|
|
95
|
+
|
|
96
|
+
### Vulnerable Code
|
|
97
|
+
|
|
98
|
+
- Smallest snippet(s) that prove the bug, each with a one-line "why it matters" lead-in and a SHA-pinned GitHub link.
|
|
99
|
+
|
|
100
|
+
### Proof of concept & Evidence
|
|
101
|
+
|
|
102
|
+
- Highest-confidence, deterministic reproduction. Say what result confirms success (`Expected result:` when not obvious).
|
|
103
|
+
- Theoretical/blocked findings: explicitly state `No working PoC — <PoC-Status>: <reason>` then give code-level evidence.
|
|
104
|
+
|
|
105
|
+
### Preconditions
|
|
106
|
+
|
|
107
|
+
- Be specific about auth, network position/attack vector, and any non-default requirements.
|
|
108
|
+
|
|
109
|
+
### Remediation
|
|
110
|
+
|
|
111
|
+
- Specific, actionable fix tied to the root cause. No generic boilerplate.
|
|
112
|
+
|
|
113
|
+
## Normalization Rules
|
|
114
|
+
|
|
115
|
+
Normalize inconsistent source material into this shape:
|
|
116
|
+
|
|
117
|
+
- Fold any `Details` / `Technical Details` narrative into `Source to Sink Flow`.
|
|
118
|
+
- Fold any standalone `Root Cause` content into the closing paragraph of `Source to Sink Flow`.
|
|
119
|
+
- Fold `Vulnerability Type` / `CWE` / `CVSS` into `Severity, Confidence, Vulnerability Type`.
|
|
120
|
+
- Fold `Authentication Reality` / `Scope` / `Exploit Constraints` into `Preconditions`.
|
|
121
|
+
- Fold `Affected Surfaces` into `Affected Component`.
|
|
122
|
+
- Convert loose notes into concrete statements with actor, condition, and outcome.
|
|
123
|
+
- Remove duplicate impact language repeated across sections.
|
|
124
|
+
- Replace plain repository paths with SHA-pinned GitHub markdown links whenever possible.
|
|
125
|
+
|
|
126
|
+
## Do Not Do This
|
|
127
|
+
|
|
128
|
+
- Do not combine multiple bugs in one report.
|
|
129
|
+
- Do not add, rename, reorder, or drop any of the nine required sections, or introduce extra H2s for enrichment.
|
|
130
|
+
- Do not use bare repository paths when a GitHub markdown link is available.
|
|
131
|
+
- Do not claim code execution, data exposure, or auth bypass unless the evidence supports it.
|
|
132
|
+
- Do not claim `Confirmed (PoC executed)` unless a PoC actually ran.
|
|
133
|
+
- Do not bury the main exploit condition inside a long background section.
|
|
134
|
+
- Do not point the reader at sibling working files. Phrases like `See draft.md`, `See debate.md`, `See adversarial-review.md`, `See metadata.json`, `See pN-NNN for full trace`, `See AP-NNN`, `Refer to the draft for impact analysis`, or `for the full trace see ...` are banned. If the trace, hypothesis, impact, or adversarial review outcome is needed, inline it. The only sibling files a `report.md` may reference are runnable evidence artefacts (`poc.<ext>`, `evidence/<file>`) shipped alongside it.
|
|
135
|
+
- Do not cite internal audit phase IDs (`pN-NNN`, `p10-NNN`, `AP-NNN`) — these are pipeline bookkeeping, not reader-facing references.
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wooyun-legacy
|
|
3
|
+
description: >-
|
|
4
|
+
Provides web vulnerability testing methodology distilled from 88,636
|
|
5
|
+
real-world cases from the WooYun vulnerability database (2010-2016). Use when
|
|
6
|
+
performing penetration testing, security audits, code reviews for security
|
|
7
|
+
flaws, or vulnerability research. Covers SQL injection, XSS, command
|
|
8
|
+
execution, file upload, path traversal, unauthorized access, information
|
|
9
|
+
disclosure, and business logic flaws.
|
|
10
|
+
allowed-tools:
|
|
11
|
+
- Read
|
|
12
|
+
- Grep
|
|
13
|
+
- Glob
|
|
14
|
+
- Bash
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# WooYun Vulnerability Analysis Knowledge Base
|
|
18
|
+
|
|
19
|
+
Methodology and testing patterns extracted from 88,636 real-world
|
|
20
|
+
vulnerability cases reported to the WooYun platform (2010-2016).
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## When to Use
|
|
25
|
+
|
|
26
|
+
> All testing described here must be performed only against systems you
|
|
27
|
+
> have written authorization to test.
|
|
28
|
+
|
|
29
|
+
- Penetration testing web applications
|
|
30
|
+
- Security code review (server-side or client-side)
|
|
31
|
+
- Vulnerability research against web targets you have explicit authorization to test
|
|
32
|
+
- Building security test cases or checklists
|
|
33
|
+
- Assessing web application attack surface
|
|
34
|
+
- Reviewing remediation effectiveness
|
|
35
|
+
- Training or education in authorized security testing contexts
|
|
36
|
+
|
|
37
|
+
## When NOT to Use
|
|
38
|
+
|
|
39
|
+
- Network infrastructure testing (firewalls, routers, switches)
|
|
40
|
+
- Mobile application binary analysis
|
|
41
|
+
- Malware analysis or reverse engineering
|
|
42
|
+
- Compliance-only assessments (PCI-DSS, SOC2 checklists without testing)
|
|
43
|
+
- Physical security assessments
|
|
44
|
+
- Social engineering campaigns
|
|
45
|
+
- Cloud infrastructure misconfigurations (IAM, S3 buckets) — these
|
|
46
|
+
require cloud-specific tooling, not web vuln patterns
|
|
47
|
+
|
|
48
|
+
## Rationalizations to Reject
|
|
49
|
+
|
|
50
|
+
These shortcuts lead to missed findings. Reject them:
|
|
51
|
+
|
|
52
|
+
- "The WAF will catch it" — WAFs are bypass-able; test the application
|
|
53
|
+
logic, not the middleware
|
|
54
|
+
- "It's an internal app, so auth doesn't matter" — internal apps get
|
|
55
|
+
compromised via SSRF, lateral movement, and credential reuse
|
|
56
|
+
- "We already use parameterized queries everywhere" — check for ORM
|
|
57
|
+
misuse, stored procedures with dynamic SQL, and second-order injection
|
|
58
|
+
- "The framework handles XSS" — template engines have raw output modes,
|
|
59
|
+
JavaScript contexts bypass HTML encoding, and DOM XSS lives
|
|
60
|
+
entirely client-side
|
|
61
|
+
- "File uploads are safe because we check the extension" — extension
|
|
62
|
+
checks are bypassed via null bytes, double extensions, parser
|
|
63
|
+
discrepancies, and race conditions
|
|
64
|
+
- "We validate on the frontend" — client-side validation is a UX
|
|
65
|
+
feature, not a security control
|
|
66
|
+
- "Nobody would guess that URL" — security through obscurity fails
|
|
67
|
+
against directory bruteforcing, referrer leaks, and JS source analysis
|
|
68
|
+
- "Low severity, not worth reporting" — low-severity findings chain
|
|
69
|
+
into critical attack paths
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Core Mental Model
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
Vulnerability = Expected Behavior - Actual Behavior
|
|
77
|
+
= Developer Assumptions + Attacker Input -> Unexpected State
|
|
78
|
+
|
|
79
|
+
Analysis chain:
|
|
80
|
+
1. Where does data come from? (Input sources)
|
|
81
|
+
-> GET/POST/Cookie/Header/File/WebSocket
|
|
82
|
+
2. Where does data flow? (Data path)
|
|
83
|
+
-> Validation -> Processing -> Storage -> Output
|
|
84
|
+
3. Where is data trusted? (Trust boundaries)
|
|
85
|
+
-> Client / Server / Database / OS / External service
|
|
86
|
+
4. How is data processed? (Processing logic)
|
|
87
|
+
-> Filter / Escape / Validate / Execute
|
|
88
|
+
5. Where does data end up? (Output sinks)
|
|
89
|
+
-> HTML / SQL / Shell / Filesystem / Log / Email
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Attack Surface Mapping
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
+-------------------------------------------+
|
|
98
|
+
| Application Attack Surface |
|
|
99
|
+
+-------------------------------------------+
|
|
100
|
+
|
|
|
101
|
+
+-----------------------+-----------------------+
|
|
102
|
+
| | |
|
|
103
|
+
+----v----+ +-----v-----+ +-----v-----+
|
|
104
|
+
| Input | | Processing| | Output |
|
|
105
|
+
+---------+ +-----------+ +-----------+
|
|
106
|
+
| GET | | Input | | HTML page |
|
|
107
|
+
| POST | -> | validation| -> | JSON resp |
|
|
108
|
+
| Cookie | | Biz logic | | File DL |
|
|
109
|
+
| Headers | | DB query | | Error msg |
|
|
110
|
+
| File | | File op | | Log entry |
|
|
111
|
+
| Upload | | Sys call | | Email |
|
|
112
|
+
+---------+ +-----------+ +-----------+
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## SQL Injection
|
|
118
|
+
|
|
119
|
+
**Cases:** 27,732 | **Reference:** [sql-injection.md]({baseDir}/references/sql-injection.md)
|
|
120
|
+
| **Checklist:** [sql-injection-checklist.md]({baseDir}/references/checklists/sql-injection-checklist.md)
|
|
121
|
+
|
|
122
|
+
High-risk parameters: `id`, `sort_id`, `username`, `password`, `search`,
|
|
123
|
+
`keyword`, `page`, `order`, `cat_id`
|
|
124
|
+
|
|
125
|
+
Injection point detection:
|
|
126
|
+
- String terminators: `' " ) ') ") -- # /*`
|
|
127
|
+
- DB fingerprint: `@@version` (MSSQL), `version()` (MySQL),
|
|
128
|
+
`v$version` (Oracle)
|
|
129
|
+
|
|
130
|
+
Bypass techniques:
|
|
131
|
+
- Whitespace: `/**/ %09 %0a ()`
|
|
132
|
+
- Keywords: `SeLeCt sel%00ect /*!select*/`
|
|
133
|
+
- Equals: `LIKE REGEXP BETWEEN IN`
|
|
134
|
+
- Quotes: `0x` hex, `char()`, `concat()`
|
|
135
|
+
|
|
136
|
+
Core defense: parameterized queries (PreparedStatement / ORM binding).
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Cross-Site Scripting (XSS)
|
|
141
|
+
|
|
142
|
+
**Cases:** 7,532 | **Reference:** [xss.md]({baseDir}/references/xss.md)
|
|
143
|
+
| **Checklist:** [xss-checklist.md]({baseDir}/references/checklists/xss-checklist.md)
|
|
144
|
+
|
|
145
|
+
Output points: user profile fields (nickname, bio), search reflections,
|
|
146
|
+
file metadata (filename, alt text), email content (subject, body)
|
|
147
|
+
|
|
148
|
+
Bypass techniques:
|
|
149
|
+
- Tag mutation: `<ScRiPt> <script/x> <script\n>`
|
|
150
|
+
- Event handlers: `onerror onload onmouseover onfocus`
|
|
151
|
+
- Encoding: HTML entities, JS Unicode, URL encoding
|
|
152
|
+
- Protocol handlers: `javascript: data: vbscript:`
|
|
153
|
+
|
|
154
|
+
Core defense: context-aware output encoding + Content Security Policy.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Command Execution
|
|
159
|
+
|
|
160
|
+
**Cases:** 6,826 | **Reference:** [command-execution.md]({baseDir}/references/command-execution.md)
|
|
161
|
+
| **Checklist:** [command-execution-checklist.md]({baseDir}/references/checklists/command-execution-checklist.md)
|
|
162
|
+
|
|
163
|
+
Entry points: system command wrappers (ping, traceroute, nslookup),
|
|
164
|
+
file operations (compress, decompress, image processing), code eval
|
|
165
|
+
(`eval`, `assert`, `preg_replace(/e)`), framework vulnerabilities
|
|
166
|
+
(Struts2, WebLogic, JBoss)
|
|
167
|
+
|
|
168
|
+
Command chaining:
|
|
169
|
+
- Linux: `; | || && \` $()`
|
|
170
|
+
- Windows: `& | || &&`
|
|
171
|
+
|
|
172
|
+
Bypass techniques:
|
|
173
|
+
- Whitespace: `${IFS} $IFS$9 %09 < <>`
|
|
174
|
+
- Keywords: `ca\t ca''t c$@at /???/??t`
|
|
175
|
+
- Encoding: `$(printf "\x63\x61\x74")`,
|
|
176
|
+
`` `echo Y2F0|base64 -d` ``
|
|
177
|
+
|
|
178
|
+
Core defense: avoid shell invocation; use `execFile` over `exec`,
|
|
179
|
+
allowlist acceptable inputs.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## File Upload
|
|
184
|
+
|
|
185
|
+
**Cases:** 2,711 | **Reference:** [file-upload.md]({baseDir}/references/file-upload.md)
|
|
186
|
+
| **Checklist:** [file-upload-checklist.md]({baseDir}/references/checklists/file-upload-checklist.md)
|
|
187
|
+
|
|
188
|
+
Bypass detection:
|
|
189
|
+
- Client-side validation: modify JS or send request directly
|
|
190
|
+
- Content-Type: `image/gif` header + PHP code body
|
|
191
|
+
- Extension: `.php5 .phtml .pht .php. .php::$DATA`
|
|
192
|
+
- Content inspection: `GIF89a` + `<?php` or image-based webshell
|
|
193
|
+
- Parser discrepancy: `/upload/1.asp;.jpg` (IIS 6.0)
|
|
194
|
+
|
|
195
|
+
Parser-specific vulnerabilities:
|
|
196
|
+
- IIS 6.0: `/test.asp/1.jpg`, `test.asp;.jpg`
|
|
197
|
+
- Apache: `.php.xxx` (unknown extension fallback)
|
|
198
|
+
- Nginx: `/1.jpg/1.php` (`cgi.fix_pathinfo`)
|
|
199
|
+
- Tomcat: `test.jsp%00.jpg`
|
|
200
|
+
|
|
201
|
+
Core defense: allowlist extensions, rename uploads, store outside
|
|
202
|
+
webroot, validate content type server-side.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Path Traversal
|
|
207
|
+
|
|
208
|
+
**Cases:** 2,854 | **Reference:** [path-traversal.md]({baseDir}/references/path-traversal.md)
|
|
209
|
+
| **Checklist:** [path-traversal-checklist.md]({baseDir}/references/checklists/path-traversal-checklist.md)
|
|
210
|
+
|
|
211
|
+
High-risk parameters: `file`, `path`, `filename`, `url`, `dir`,
|
|
212
|
+
`template`, `page`, `include`, `download`
|
|
213
|
+
|
|
214
|
+
Traversal payloads:
|
|
215
|
+
- Basic: `../../../etc/passwd`
|
|
216
|
+
- Encoded: `%2e%2e%2f`, `..%252f`, `%c0%ae%c0%ae/`
|
|
217
|
+
- Null byte: `../../../etc/passwd%00.jpg`
|
|
218
|
+
- Windows: `..\..\..\windows\win.ini`
|
|
219
|
+
|
|
220
|
+
Target files (Linux): `/etc/passwd`, `/etc/shadow`,
|
|
221
|
+
`/proc/self/environ`, `/var/log/apache2/access.log`
|
|
222
|
+
|
|
223
|
+
Core defense: resolve canonical paths, validate against allowlisted
|
|
224
|
+
directories, never use user input in file paths directly.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Unauthorized Access
|
|
229
|
+
|
|
230
|
+
**Cases:** 14,377 | **Reference:** [unauthorized-access.md]({baseDir}/references/unauthorized-access.md)
|
|
231
|
+
| **Checklist:** [unauthorized-access-checklist.md]({baseDir}/references/checklists/unauthorized-access-checklist.md)
|
|
232
|
+
|
|
233
|
+
Access types:
|
|
234
|
+
- Admin panel exposure: `/admin`, `/manager`, `/console`
|
|
235
|
+
- API without authentication: missing token validation, predictable
|
|
236
|
+
tokens
|
|
237
|
+
- Exposed services: Redis (6379), MongoDB (27017),
|
|
238
|
+
Elasticsearch (9200), Memcached (11211), Docker (2375)
|
|
239
|
+
- IDOR: horizontal privilege escalation via ID enumeration
|
|
240
|
+
|
|
241
|
+
Core defense: authentication + authorization on every endpoint,
|
|
242
|
+
session management, principle of least privilege.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Information Disclosure
|
|
247
|
+
|
|
248
|
+
**Cases:** 7,337 | **Reference:** [info-disclosure.md]({baseDir}/references/info-disclosure.md)
|
|
249
|
+
| **Checklist:** [info-disclosure-checklist.md]({baseDir}/references/checklists/info-disclosure-checklist.md)
|
|
250
|
+
|
|
251
|
+
Disclosure sources: error messages with stack traces, exposed `.git`
|
|
252
|
+
or `.svn` directories, backup files (`.bak`, `.sql`, `.tar.gz`),
|
|
253
|
+
configuration files, debug endpoints, directory listings
|
|
254
|
+
|
|
255
|
+
Core defense: custom error pages, disable directory listing, remove
|
|
256
|
+
debug endpoints in production, audit publicly accessible files.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Business Logic Flaws
|
|
261
|
+
|
|
262
|
+
**Cases:** 8,292 | **Reference:** [logic-flaws.md]({baseDir}/references/logic-flaws.md)
|
|
263
|
+
| **Checklist:** [logic-flaws-checklist.md]({baseDir}/references/checklists/logic-flaws-checklist.md)
|
|
264
|
+
|
|
265
|
+
Vulnerability patterns:
|
|
266
|
+
- Password reset: verification code in response body, step skipping,
|
|
267
|
+
controllable reset tokens
|
|
268
|
+
- Authorization bypass: horizontal (ID enumeration), vertical (role
|
|
269
|
+
escalation)
|
|
270
|
+
- Payment logic: amount tampering, quantity manipulation, coupon
|
|
271
|
+
stacking
|
|
272
|
+
- CAPTCHA: not refreshed, reusable, brute-forceable, client-side only
|
|
273
|
+
|
|
274
|
+
Testing approach:
|
|
275
|
+
1. Map the business flow -> draw state transition diagram
|
|
276
|
+
2. Identify critical checks -> which parameters determine outcomes
|
|
277
|
+
3. Attempt bypass -> modify parameters / skip steps / replay / race
|
|
278
|
+
4. Verify impact -> prove the scope of harm
|
|
279
|
+
|
|
280
|
+
Core defense: server-side validation of all business-critical logic.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Additional Categories
|
|
285
|
+
|
|
286
|
+
These categories are derived from case data without full reference
|
|
287
|
+
documents. Each has a testing checklist extracted from real cases.
|
|
288
|
+
|
|
289
|
+
| Category | Checklist |
|
|
290
|
+
|----------|-----------|
|
|
291
|
+
| CSRF | [csrf-checklist.md]({baseDir}/references/checklists/csrf-checklist.md) |
|
|
292
|
+
| SSRF | [ssrf-checklist.md]({baseDir}/references/checklists/ssrf-checklist.md) |
|
|
293
|
+
| Weak Passwords | [weak-password-checklist.md]({baseDir}/references/checklists/weak-password-checklist.md) |
|
|
294
|
+
| Misconfiguration | [misconfig-checklist.md]({baseDir}/references/checklists/misconfig-checklist.md) |
|
|
295
|
+
| Remote Code Execution | [rce-checklist.md]({baseDir}/references/checklists/rce-checklist.md) |
|
|
296
|
+
| XML External Entity (XXE) | [xxe-checklist.md]({baseDir}/references/checklists/xxe-checklist.md) |
|
|
297
|
+
|
|
298
|
+
> **Note:** The RCE checklist covers deserialization, OGNL injection, and
|
|
299
|
+
> framework-specific remote code execution — distinct from the OS command
|
|
300
|
+
> injection focus of the Command Execution reference above.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Methodology Case Studies
|
|
305
|
+
|
|
306
|
+
Real-world penetration testing methodology examples (anonymized):
|
|
307
|
+
|
|
308
|
+
| Case Study | Description |
|
|
309
|
+
|------------|-------------|
|
|
310
|
+
| [bank-penetration.md]({baseDir}/references/bank-penetration.md) | Multi-stage attack chain against a financial institution |
|
|
311
|
+
| [telecom-penetration.md]({baseDir}/references/telecom-penetration.md) | Infrastructure penetration of a telecom carrier |
|
|
312
|
+
|
|
313
|
+
These demonstrate how individual vulnerabilities chain together into
|
|
314
|
+
full compromise scenarios.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Testing Priority Framework
|
|
319
|
+
|
|
320
|
+
### High Priority (test first)
|
|
321
|
+
|
|
322
|
+
1. **SQL Injection** — direct data access, highest case count (27,732)
|
|
323
|
+
2. **Command Execution** — OS-level compromise
|
|
324
|
+
3. **File Upload** — arbitrary code execution via webshell
|
|
325
|
+
|
|
326
|
+
### Medium Priority
|
|
327
|
+
|
|
328
|
+
4. **Unauthorized Access** — second-highest case count (14,377)
|
|
329
|
+
5. **Business Logic Flaws** — application-specific, hard to automate
|
|
330
|
+
6. **XSS** — session hijacking, phishing
|
|
331
|
+
|
|
332
|
+
### Lower Priority (but still important)
|
|
333
|
+
|
|
334
|
+
7. **Path Traversal** — file read, sometimes write
|
|
335
|
+
8. **Information Disclosure** — reconnaissance value, enables chaining
|
|
336
|
+
9. **CSRF/SSRF/XXE** — context-dependent severity
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Defense Quick Reference
|
|
341
|
+
|
|
342
|
+
| Vulnerability | Core Defense | Implementation |
|
|
343
|
+
|---------------|-------------|----------------|
|
|
344
|
+
| SQL Injection | Parameterized queries | PreparedStatement / ORM |
|
|
345
|
+
| XSS | Output encoding | Context-aware escaping + CSP |
|
|
346
|
+
| Command Execution | Avoid shell | `execFile` not `exec`, allowlist |
|
|
347
|
+
| File Upload | Strict validation | Allowlist ext, rename, isolate |
|
|
348
|
+
| Path Traversal | Canonical paths | Resolve + validate against allowlist |
|
|
349
|
+
| Unauthorized Access | Access control | AuthN + AuthZ + session mgmt |
|
|
350
|
+
| Logic Flaws | Server-side checks | Validate all business logic server-side |
|
|
351
|
+
| Info Disclosure | Minimize exposure | Custom errors, no debug in prod |
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## Key Insight
|
|
356
|
+
|
|
357
|
+
All 88,636 vulnerabilities in this database share a common root cause:
|
|
358
|
+
the gap between what developers assumed and what attackers actually
|
|
359
|
+
provided. Effective security testing means systematically challenging
|
|
360
|
+
every assumption at every trust boundary.
|
|
361
|
+
|
|
362
|
+
Four principles from the data:
|
|
363
|
+
1. **Boundary thinking** — all vulnerabilities occur at trust boundaries
|
|
364
|
+
2. **Data flow tracing** — follow data from input to output completely
|
|
365
|
+
3. **Assumption challenging** — question every "obvious" validation
|
|
366
|
+
4. **Chain composition** — individual low-severity findings combine
|
|
367
|
+
into critical attack paths
|