@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,222 @@
|
|
|
1
|
+
# Banking Penetration Testing Methodology
|
|
2
|
+
|
|
3
|
+
> This case study is anonymized and presented for educational purposes in authorized security testing contexts only.
|
|
4
|
+
|
|
5
|
+
> Based on analysis of 22,132 real WooYun cases
|
|
6
|
+
|
|
7
|
+
## 1. Banking Attack Surface Layered Model
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
11
|
+
│ Layer 1: Internet Boundary │
|
|
12
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
13
|
+
│ Online Banking │ Mobile Banking │ WeChat Banking │ Direct Banking │ │
|
|
14
|
+
│ Credit Card Center │ Official Site / Campaign Pages │
|
|
15
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
16
|
+
│
|
|
17
|
+
|
|
|
18
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
19
|
+
│ Layer 2: Interface / Channel Layer │
|
|
20
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
21
|
+
│ Payment Interface │ Card Network Channel │ Quick Pay │ Direct Debit │ │
|
|
22
|
+
│ Aggregated Payment │ Open Banking API │
|
|
23
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
24
|
+
│
|
|
25
|
+
|
|
|
26
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
27
|
+
│ Layer 3: Internal Systems Layer │
|
|
28
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
29
|
+
│ Core Banking │ Loan System │ Risk Control │ AML │ CRM │ Reporting │
|
|
30
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 2. High-Risk Vulnerability Types
|
|
34
|
+
|
|
35
|
+
### Tier 1: Financial Vulnerabilities (68-88% High Severity)
|
|
36
|
+
|
|
37
|
+
| Vulnerability Type | High Severity % | Banking-Specific Scenario |
|
|
38
|
+
|-------------------|----------------|--------------------------|
|
|
39
|
+
| Password Reset | 88.0% | Online/mobile banking login password, transaction PIN |
|
|
40
|
+
| Withdrawal Flaws | 83.1% | Transfer limit bypass, withdrawal validation defects |
|
|
41
|
+
| Amount Tampering | 83.0% | Transfer amount, investment amount, repayment amount |
|
|
42
|
+
| Payment Flaws | 68.7% | Quick pay, direct debit, interbank transfer |
|
|
43
|
+
|
|
44
|
+
### Payment Vulnerability Detection (1,056 Cases)
|
|
45
|
+
|
|
46
|
+
**Manual Testing Checklist**:
|
|
47
|
+
```
|
|
48
|
+
1. Modify amount parameter: amount=0.01 (test server-side validation)
|
|
49
|
+
2. Modify quantity to negative: quantity=-1 (negative transfer)
|
|
50
|
+
3. Replay a successful payment request (test idempotency)
|
|
51
|
+
4. Concurrent submission of the same order (race condition)
|
|
52
|
+
5. Modify payee account/user ID (unauthorized transfer)
|
|
53
|
+
6. Tamper with callback notification (forge payment success)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Key Parameters**:
|
|
57
|
+
- `amount` / `price` / `total` -> Amount fields
|
|
58
|
+
- `to_account` / `payee_id` -> Payee
|
|
59
|
+
- `sign` / `signature` -> Signature
|
|
60
|
+
|
|
61
|
+
**Bypass Techniques**:
|
|
62
|
+
```
|
|
63
|
+
Negative value attack: Transfer amount = -1000
|
|
64
|
+
Decimal overflow: amount = 0.001
|
|
65
|
+
Race condition: Multi-threaded concurrent transfers
|
|
66
|
+
Status tampering: Modify status=SUCCESS
|
|
67
|
+
Signature bypass: Delete/empty the signature field
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Tier 2: Authentication and Authorization
|
|
71
|
+
|
|
72
|
+
| Vulnerability Type | Case Count | Attack Scenario |
|
|
73
|
+
|-------------------|-----------|----------------|
|
|
74
|
+
| Weak Credentials | 7,513 | Online banking admin panel, operations systems |
|
|
75
|
+
| Authorization Bypass | 1,705 | Viewing other users' account information |
|
|
76
|
+
| Verification Code | 334 | Login, transfer, password reset |
|
|
77
|
+
|
|
78
|
+
## 3. Banking-Specific Attack Surfaces
|
|
79
|
+
|
|
80
|
+
### 1. Mobile Banking App Security
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Client-Side Security
|
|
84
|
+
├── Anti-decompilation protection (hardening strength)
|
|
85
|
+
├── Local storage (sensitive information)
|
|
86
|
+
├── Log leakage
|
|
87
|
+
└── Certificate validation (SSL Pinning)
|
|
88
|
+
|
|
89
|
+
Communication Security
|
|
90
|
+
├── Encryption algorithms (hardcoded keys)
|
|
91
|
+
├── Request signing (algorithm reverse engineering)
|
|
92
|
+
└── Replay attacks
|
|
93
|
+
|
|
94
|
+
Business Logic
|
|
95
|
+
├── Login authentication (password/fingerprint/face)
|
|
96
|
+
├── Transaction verification
|
|
97
|
+
└── Transfer limits
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**App Penetration Approach**:
|
|
101
|
+
```
|
|
102
|
+
1. Packet capture: Bypass SSL Pinning (Frida/Objection)
|
|
103
|
+
2. Reverse engineering: Unpack -> Signing algorithm reversal -> Key extraction
|
|
104
|
+
3. Hook testing: Bypass face/fingerprint verification, modify limit checks
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 2. Online Banking Systems
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
Attack approach:
|
|
111
|
+
├── ActiveX control vulnerabilities
|
|
112
|
+
├── Frontend encryption bypass (JS reverse engineering)
|
|
113
|
+
├── Password control bypass
|
|
114
|
+
├── USB token driver vulnerabilities
|
|
115
|
+
├── Bulk transfer interface authorization bypass
|
|
116
|
+
└── Statement/receipt unauthorized download
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 3. Third-Party Payment Interfaces
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
Attack points:
|
|
123
|
+
├── Merchant key leakage (GitHub search)
|
|
124
|
+
├── Callback signature verification flaws
|
|
125
|
+
├── Async notification replay
|
|
126
|
+
├── Amount validation missing
|
|
127
|
+
└── Merchant ID authorization bypass
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## 4. Verification Bypass Techniques
|
|
131
|
+
|
|
132
|
+
### SMS Verification Code
|
|
133
|
+
```
|
|
134
|
+
├── Brute force (4-6 digits, feasible)
|
|
135
|
+
├── Concurrency (bypass attempt limits)
|
|
136
|
+
├── Reuse (same code used multiple times)
|
|
137
|
+
├── Echo (code returned in response)
|
|
138
|
+
└── Universal codes (0000/1234)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Facial Recognition
|
|
142
|
+
```
|
|
143
|
+
├── Photo attack
|
|
144
|
+
├── Video attack
|
|
145
|
+
├── Hook return values
|
|
146
|
+
├── Interface replay
|
|
147
|
+
└── Replace facial data
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Transaction Signatures
|
|
151
|
+
```
|
|
152
|
+
├── Hardcoded signing key
|
|
153
|
+
├── Critical fields not signed
|
|
154
|
+
├── Signature verification optional
|
|
155
|
+
└── Signature downgrade attack
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## 5. Penetration Paths
|
|
159
|
+
|
|
160
|
+
### Path 1: External Web Breach
|
|
161
|
+
```
|
|
162
|
+
Information gathering -> Subdomains/Ports/Fingerprinting
|
|
163
|
+
|
|
|
164
|
+
Vulnerability exploitation (priority order):
|
|
165
|
+
├── 1. Weak credential brute force
|
|
166
|
+
├── 2. Struts2/WebLogic RCE
|
|
167
|
+
├── 3. Business logic vulnerabilities
|
|
168
|
+
└── 4. File upload / SQL injection
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Path 2: Mobile Endpoint Breach
|
|
172
|
+
```
|
|
173
|
+
Static analysis -> Decompile, key search, API extraction
|
|
174
|
+
Dynamic analysis -> Bypass Pinning, packet capture, Hook
|
|
175
|
+
Business testing -> Login/Transfer/Password reset
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Path 3: Supply Chain Attack
|
|
179
|
+
```
|
|
180
|
+
Outsourcing company -> Code/environment leakage
|
|
181
|
+
Equipment vendor -> Preset accounts
|
|
182
|
+
Service provider -> SMS/identity verification
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## 6. High-Value Targets
|
|
186
|
+
|
|
187
|
+
| Target System | Value | What Can Be Achieved |
|
|
188
|
+
|--------------|-------|---------------------|
|
|
189
|
+
| Core Banking | Critical | Account balances, transaction records |
|
|
190
|
+
| Loan System | High | Loan approval, credit limit adjustment |
|
|
191
|
+
| Risk Control System | High | Blocklists, rule configuration |
|
|
192
|
+
| CRM System | Medium | KYC documentation |
|
|
193
|
+
|
|
194
|
+
## 7. Practical Checklist
|
|
195
|
+
|
|
196
|
+
### Information Gathering
|
|
197
|
+
- [ ] Subdomain enumeration
|
|
198
|
+
- [ ] GitHub code leakage search
|
|
199
|
+
- [ ] App download and analysis
|
|
200
|
+
- [ ] WeChat official account / mini-program interface discovery
|
|
201
|
+
|
|
202
|
+
### Vulnerability Detection
|
|
203
|
+
- [ ] Weak credential testing
|
|
204
|
+
- [ ] Business logic (payment/transfer/password reset)
|
|
205
|
+
- [ ] Authorization bypass testing
|
|
206
|
+
- [ ] Interface security (signing/encryption)
|
|
207
|
+
- [ ] App client-side security
|
|
208
|
+
|
|
209
|
+
### Deep Exploitation
|
|
210
|
+
- [ ] Payment amount tampering
|
|
211
|
+
- [ ] Verification code bypass
|
|
212
|
+
- [ ] Facial recognition bypass
|
|
213
|
+
- [ ] Concurrent race conditions
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
**Reference methodologies**:
|
|
218
|
+
- See {baseDir}/references/logic-flaws.md (payment tampering, authorization bypass) and {baseDir}/references/sql-injection.md (injection techniques) for related methodology.
|
|
219
|
+
|
|
220
|
+
**Representative case patterns**:
|
|
221
|
+
- A major bank's system vulnerability leading to shell access (affecting third-party payment integrations)
|
|
222
|
+
- An education platform leading to a foundation system (allowing donation amount tampering)
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Command Execution Testing Checklist
|
|
2
|
+
> Derived from 57 real-world vulnerability cases (WooYun 2010-2016)
|
|
3
|
+
|
|
4
|
+
## High-Risk Parameters to Test
|
|
5
|
+
| Parameter | Frequency | Notes |
|
|
6
|
+
|-----------|-----------|-------|
|
|
7
|
+
| `from` | 1x | Login redirect; deserialization entry |
|
|
8
|
+
| `param` | 1x | Generic parameter in SAP/enterprise systems |
|
|
9
|
+
| `action` / `module` | 2x | MVC dispatch parameters |
|
|
10
|
+
| `addr` | 1x | Network address inputs (ping/traceroute) |
|
|
11
|
+
| `itemId` | 1x | Item lookup triggering backend processing |
|
|
12
|
+
| `pwd` / `pwpwd` | 2x | Authentication parameters |
|
|
13
|
+
| `authenticationEntry` | 1x | Spring Security entry point |
|
|
14
|
+
| `siteroot` | 1x | Configuration parameters |
|
|
15
|
+
|
|
16
|
+
## Attack Pattern Distribution
|
|
17
|
+
| Pattern | Count | Percentage |
|
|
18
|
+
|---------|-------|------------|
|
|
19
|
+
| Direct command execution | 38 | 67% |
|
|
20
|
+
| Getshell via RCE | 9 | 16% |
|
|
21
|
+
| Information leakage chain | 5 | 9% |
|
|
22
|
+
| Deserialization to RCE | 5 | 9% |
|
|
23
|
+
|
|
24
|
+
## Vulnerability Sources (ranked by frequency)
|
|
25
|
+
|
|
26
|
+
### 1. Apache Struts2 OGNL Injection (~45% of cases)
|
|
27
|
+
The single most common command execution vector in the dataset.
|
|
28
|
+
- S2-045, S2-046, S2-048, S2-052 and related CVEs
|
|
29
|
+
- Targets: `.action` and `.do` URL endpoints
|
|
30
|
+
- Detection: Look for `struts2` in response headers or URL patterns
|
|
31
|
+
|
|
32
|
+
**Test indicators:**
|
|
33
|
+
```
|
|
34
|
+
/login.action
|
|
35
|
+
/index.do
|
|
36
|
+
/upload.action
|
|
37
|
+
Content-Type: %{...} (S2-045)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 2. Java Deserialization (~20% of cases)
|
|
41
|
+
- JBoss JMXInvokerServlet / EJBInvokerServlet
|
|
42
|
+
- WebLogic T3 protocol
|
|
43
|
+
- Jenkins CLI
|
|
44
|
+
- Spring Framework
|
|
45
|
+
|
|
46
|
+
**Test endpoints:**
|
|
47
|
+
```
|
|
48
|
+
/invoker/JMXInvokerServlet
|
|
49
|
+
/invoker/EJBInvokerServlet
|
|
50
|
+
/jmx-console/
|
|
51
|
+
/web-console/
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 3. Middleware Misconfiguration (~15% of cases)
|
|
55
|
+
- JBoss default deployment consoles
|
|
56
|
+
- Resin admin panel exposed
|
|
57
|
+
- WebLogic console with default credentials
|
|
58
|
+
- Tomcat manager with weak auth
|
|
59
|
+
|
|
60
|
+
### 4. Application-Level Command Injection (~10% of cases)
|
|
61
|
+
- SAP systems: `EXECUTE_CMD;CMDLINE=cmd.exe%20/c%20...`
|
|
62
|
+
- Network management tools with ping/traceroute functions
|
|
63
|
+
- Monitoring systems executing OS commands
|
|
64
|
+
|
|
65
|
+
### 5. PHP Code Execution (~10% of cases)
|
|
66
|
+
- `eval()` with user-controlled input
|
|
67
|
+
- Unsafe `unserialize()`
|
|
68
|
+
- Template injection
|
|
69
|
+
|
|
70
|
+
## Common Exploitation Payloads
|
|
71
|
+
|
|
72
|
+
### Struts2 OGNL
|
|
73
|
+
```
|
|
74
|
+
%{(#context['com.opensymphony.xwork2.dispatcher.
|
|
75
|
+
HttpServletResponse'].getWriter().println('test'))}
|
|
76
|
+
|
|
77
|
+
redirect:${#context...}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### JBoss Deserialization
|
|
81
|
+
```
|
|
82
|
+
POST /invoker/JMXInvokerServlet HTTP/1.1
|
|
83
|
+
[serialized Java object payload]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### OS Command Chaining
|
|
87
|
+
```
|
|
88
|
+
; whoami
|
|
89
|
+
| cat /etc/passwd
|
|
90
|
+
`id`
|
|
91
|
+
$(whoami)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Quick Test Vectors
|
|
95
|
+
```
|
|
96
|
+
1. Identify framework: Look for .action/.do URLs (Struts2)
|
|
97
|
+
2. Check /invoker/JMXInvokerServlet (JBoss deser)
|
|
98
|
+
3. Check /jmx-console/ (JBoss misconfiguration)
|
|
99
|
+
4. Check management ports: 8080, 9090, 4848
|
|
100
|
+
5. Test Struts2: Content-Type manipulation
|
|
101
|
+
6. Test command injection: ; whoami | id `id`
|
|
102
|
+
7. Check resin-admin, /manager/html (middleware consoles)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## High-Value Targets
|
|
106
|
+
- **Government systems**: Frequently running outdated Struts2
|
|
107
|
+
- **Financial/banking systems**: Legacy Java middleware
|
|
108
|
+
- **Telecom infrastructure**: JBoss-based management platforms
|
|
109
|
+
- **Enterprise OA systems**: SAP, Oracle middleware
|
|
110
|
+
- **CDN/infrastructure nodes**: Internal management consoles
|
|
111
|
+
|
|
112
|
+
## Root Causes
|
|
113
|
+
| Cause | Frequency |
|
|
114
|
+
|-------|-----------|
|
|
115
|
+
| Unpatched Struts2 framework | Most common |
|
|
116
|
+
| Exposed management consoles | Very common |
|
|
117
|
+
| Java deserialization in services | Common |
|
|
118
|
+
| Direct OS command concatenation | Occasional |
|
|
119
|
+
| Unsafe eval/unserialize in PHP | Occasional |
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# CSRF Testing Checklist
|
|
2
|
+
> Derived from ~30 real-world vulnerability cases (WooYun 2010-2016)
|
|
3
|
+
|
|
4
|
+
## High-Risk Parameters to Test
|
|
5
|
+
| Parameter | Context |
|
|
6
|
+
|-----------|---------|
|
|
7
|
+
| `formhash` | Forum/CMS anti-CSRF tokens (often decorative) |
|
|
8
|
+
| `callback` | JSONP endpoints |
|
|
9
|
+
| `action` | State-changing operations |
|
|
10
|
+
| `uid`, `touid` | User targeting in social features |
|
|
11
|
+
| `newPassword` | Password change forms |
|
|
12
|
+
| `email` | Account binding/unbinding |
|
|
13
|
+
| `nickname`, `sex`, `year` | Profile modification |
|
|
14
|
+
| `status`, `content` | Post/comment creation |
|
|
15
|
+
|
|
16
|
+
## Common Attack Patterns
|
|
17
|
+
1. **No token validation** (most common) - State-changing requests lack CSRF tokens entirely
|
|
18
|
+
2. **GET-based state changes** - Follow, post, profile edit via GET requests exploitable with `<img>` tags
|
|
19
|
+
3. **Decorative tokens** - Token present in form but server never validates it
|
|
20
|
+
4. **Missing Referer check** - No origin verification on POST requests
|
|
21
|
+
5. **Token not bound to session** - Any valid token works for any user
|
|
22
|
+
6. **OAuth binding CSRF** - Third-party account binding lacks `state` parameter
|
|
23
|
+
|
|
24
|
+
## High-Impact CSRF Targets
|
|
25
|
+
- Password/email change (account takeover chain)
|
|
26
|
+
- OAuth account binding (hijack via CSRF)
|
|
27
|
+
- Admin panel operations (password change without old password verification)
|
|
28
|
+
- Payment address modification
|
|
29
|
+
- Social actions (follow, post, comment) for worm propagation
|
|
30
|
+
|
|
31
|
+
## Bypass Techniques
|
|
32
|
+
- **GET fallback**: POST endpoints that also accept GET requests
|
|
33
|
+
- **Referer stripping**: Use `<meta name="referrer" content="no-referrer">`
|
|
34
|
+
- **Subdomain trust**: Referer check only validates partial domain match
|
|
35
|
+
- **Flash/XMLHttpRequest**: Cross-origin requests with `withCredentials: true`
|
|
36
|
+
- **Token reuse**: Same token valid across sessions or users
|
|
37
|
+
|
|
38
|
+
## Quick Test Vectors
|
|
39
|
+
```html
|
|
40
|
+
<!-- Basic form auto-submit -->
|
|
41
|
+
<form action="TARGET_URL" method="POST" id="csrf">
|
|
42
|
+
<input type="hidden" name="param" value="value"/>
|
|
43
|
+
</form>
|
|
44
|
+
<script>document.getElementById('csrf').submit();</script>
|
|
45
|
+
|
|
46
|
+
<!-- GET-based via image tag -->
|
|
47
|
+
<img src="https://target.com/action?param=value"/>
|
|
48
|
+
|
|
49
|
+
<!-- XMLHttpRequest with credentials -->
|
|
50
|
+
<script>
|
|
51
|
+
var x = new XMLHttpRequest();
|
|
52
|
+
x.open("POST", "TARGET_URL", true);
|
|
53
|
+
x.withCredentials = true;
|
|
54
|
+
x.setRequestHeader("Content-Type",
|
|
55
|
+
"application/x-www-form-urlencoded");
|
|
56
|
+
x.send("param=value");
|
|
57
|
+
</script>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Testing Methodology
|
|
61
|
+
1. Identify all state-changing endpoints (POST and GET)
|
|
62
|
+
2. Check for CSRF tokens in requests
|
|
63
|
+
3. Remove/modify token and replay -- does it still succeed?
|
|
64
|
+
4. Check if GET method is accepted for POST endpoints
|
|
65
|
+
5. Test Referer header removal and spoofing
|
|
66
|
+
6. Verify token is bound to current session
|
|
67
|
+
7. Test OAuth flows for missing `state` parameter
|
|
68
|
+
|
|
69
|
+
## Common Root Causes
|
|
70
|
+
- Developer trusts frontend to prevent duplicate submissions
|
|
71
|
+
- Token added to form HTML but never validated server-side
|
|
72
|
+
- Reliance on Referer header (easily stripped)
|
|
73
|
+
- GET endpoints for state-changing operations
|
|
74
|
+
- No re-authentication for sensitive operations (password change)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# File Upload Testing Checklist
|
|
2
|
+
> Derived from 30 real-world vulnerability cases (WooYun 2010-2016)
|
|
3
|
+
|
|
4
|
+
## High-Risk Parameters to Test
|
|
5
|
+
| Parameter | Context | Notes |
|
|
6
|
+
|-----------|---------|-------|
|
|
7
|
+
| `Filedata` | Multipart upload | Standard upload field name |
|
|
8
|
+
| `method` | Upload handler dispatch | Method parameter in upload APIs |
|
|
9
|
+
| `Connector` | FCKEditor connector | CMS file manager connectors |
|
|
10
|
+
| `LMID` / `varnum` / `ids` | Upload form fields | Auxiliary parameters |
|
|
11
|
+
| `password` / `c` / `m` | Auth + upload | Combined auth bypass + upload |
|
|
12
|
+
|
|
13
|
+
## Attack Pattern Distribution
|
|
14
|
+
| Pattern | Count | Percentage |
|
|
15
|
+
|---------|-------|------------|
|
|
16
|
+
| Unrestricted file upload | 6 | 40% |
|
|
17
|
+
| Getshell via upload | 3 | 20% |
|
|
18
|
+
| Extension bypass | 3 | 20% |
|
|
19
|
+
| Weak auth + upload | 1 | 7% |
|
|
20
|
+
| Directory traversal + upload | 1 | 7% |
|
|
21
|
+
|
|
22
|
+
## Common Upload Bypass Techniques
|
|
23
|
+
|
|
24
|
+
### 1. Client-Side Only Validation (~35% of cases)
|
|
25
|
+
The most common flaw: JavaScript-only file type checks with no server-side validation.
|
|
26
|
+
- Bypass: Intercept request with proxy, change filename extension
|
|
27
|
+
- Bypass: Disable JavaScript and submit directly
|
|
28
|
+
|
|
29
|
+
### 2. Null Byte Truncation
|
|
30
|
+
```
|
|
31
|
+
shell.php%00.jpg (PHP < 5.3.4)
|
|
32
|
+
shell.jsp%00.txt (older Java containers)
|
|
33
|
+
shell.asp%00.jpg (IIS + ASP)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 3. Extension Bypass
|
|
37
|
+
```
|
|
38
|
+
.php5, .phtml, .pht (PHP alternatives)
|
|
39
|
+
.jspx, .jspa, .jsw (JSP alternatives)
|
|
40
|
+
.asp, .asa, .cer, .cdx (ASP/IIS alternatives)
|
|
41
|
+
.aspx, .ashx, .asmx (ASP.NET alternatives)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 4. WAF Bypass via Extended ASCII
|
|
45
|
+
Append extended ASCII characters after the extension:
|
|
46
|
+
```
|
|
47
|
+
shell.php[0x7f] (DEL character)
|
|
48
|
+
shell.php[0xcc] (extended ASCII)
|
|
49
|
+
shell.php[0x88] (extended ASCII)
|
|
50
|
+
```
|
|
51
|
+
Confirmed to bypass security products on Windows+Apache.
|
|
52
|
+
|
|
53
|
+
### 5. Content-Type Manipulation
|
|
54
|
+
```
|
|
55
|
+
Content-Type: image/jpeg (while uploading .php)
|
|
56
|
+
Content-Type: image/gif (with GIF89a header prepended)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 6. Double Extension / Path Manipulation
|
|
60
|
+
```
|
|
61
|
+
shell.php.jpg (Apache misconfiguration)
|
|
62
|
+
shell.jpg/.php (Nginx parsing vulnerability)
|
|
63
|
+
../shell.php (path traversal in filename)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Common Vulnerable Upload Endpoints
|
|
67
|
+
```
|
|
68
|
+
/upload.jsp
|
|
69
|
+
/excelUpload.jsp (OA systems)
|
|
70
|
+
/uploadImageFile_do.jsp (CMS systems)
|
|
71
|
+
/kindeditor/upload_json (rich text editors)
|
|
72
|
+
/fckeditor/editor/filemanager/connectors/
|
|
73
|
+
/ueditor/controller (UEditor)
|
|
74
|
+
/regist/expappend_file.jsp
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Quick Test Vectors
|
|
78
|
+
```
|
|
79
|
+
1. Upload .php/.jsp file with valid image Content-Type
|
|
80
|
+
2. Upload file.php%00.jpg (null byte truncation)
|
|
81
|
+
3. Upload file.phtml / file.php5 (alternative extensions)
|
|
82
|
+
4. Upload with ../ in filename (path traversal)
|
|
83
|
+
5. Prepend GIF89a to PHP webshell (magic byte bypass)
|
|
84
|
+
6. Upload .htaccess to enable PHP execution in upload dir
|
|
85
|
+
7. Test double extension: file.php.jpg
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Post-Upload Verification
|
|
89
|
+
- Determine upload path from response or predictable naming
|
|
90
|
+
- Check if uploaded file is directly accessible via HTTP
|
|
91
|
+
- Check if file extension is preserved or renamed
|
|
92
|
+
- Check if file content is re-processed (image resize strips code)
|
|
93
|
+
|
|
94
|
+
## High-Value Targets
|
|
95
|
+
- **OA/Enterprise systems**: Excel/document upload features
|
|
96
|
+
- **CMS admin panels**: Image/file upload in content editors
|
|
97
|
+
- **Government procurement systems**: Attachment upload in bid submissions
|
|
98
|
+
- **Hospital/edu systems**: Document submission portals
|
|
99
|
+
- **Rich text editors**: FCKEditor, KindEditor, UEditor connectors
|
|
100
|
+
|
|
101
|
+
## Root Causes
|
|
102
|
+
| Cause | Frequency |
|
|
103
|
+
|-------|-----------|
|
|
104
|
+
| Client-side only validation | Most common |
|
|
105
|
+
| No server-side extension check | Very common |
|
|
106
|
+
| Allowlist not enforced on server | Common |
|
|
107
|
+
| Predictable upload paths | Common |
|
|
108
|
+
| Upload directory allows execution | Common |
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Information Disclosure Testing Checklist
|
|
2
|
+
> Derived from ~56 real-world vulnerability cases (WooYun 2010-2016)
|
|
3
|
+
|
|
4
|
+
## High-Risk Parameters to Test
|
|
5
|
+
| Parameter | Context |
|
|
6
|
+
|-----------|---------|
|
|
7
|
+
| `id`, `uid` | Sequential resource identifiers |
|
|
8
|
+
| `order_id`, `orderId` | Order enumeration |
|
|
9
|
+
| `callback` | JSONP endpoints leaking user data |
|
|
10
|
+
| `method` | API method selectors |
|
|
11
|
+
| `p`, `page` | Pagination revealing total counts |
|
|
12
|
+
| `inputFile` | File read endpoints |
|
|
13
|
+
| `query`, `q` | Search endpoints reflecting data |
|
|
14
|
+
|
|
15
|
+
## Common Attack Patterns (by frequency)
|
|
16
|
+
1. **Source code/config exposure** (most common)
|
|
17
|
+
- `.svn/entries` or `.svn/wc.db` accessible
|
|
18
|
+
- `.git/config` or `.git/HEAD` accessible
|
|
19
|
+
- Backup files: `*.bak`, `*.sql`, `*.tar.gz`, `website.rar`
|
|
20
|
+
- `web.config`, `database.php`, `.env` exposed
|
|
21
|
+
2. **Log file exposure**
|
|
22
|
+
- Application logs containing sessions, credentials
|
|
23
|
+
- Debug endpoints left enabled in production
|
|
24
|
+
3. **API data over-exposure**
|
|
25
|
+
- JSONP endpoints returning user data cross-origin
|
|
26
|
+
- API responses including more fields than UI displays
|
|
27
|
+
- Sequential ID enumeration on order/user endpoints
|
|
28
|
+
4. **Database credential leak**
|
|
29
|
+
- Config files with plaintext DB credentials
|
|
30
|
+
- Error messages revealing connection strings
|
|
31
|
+
- GitHub/code repository credential exposure
|
|
32
|
+
5. **Session/credential leak**
|
|
33
|
+
- Session tokens in log files
|
|
34
|
+
- Credentials in URL parameters (GET requests)
|
|
35
|
+
- Default management passwords in documentation
|
|
36
|
+
|
|
37
|
+
## Source Control Exposure
|
|
38
|
+
| Path | Tool | Risk |
|
|
39
|
+
|------|------|------|
|
|
40
|
+
| `.svn/entries` | SVN | Source code + history |
|
|
41
|
+
| `.svn/wc.db` | SVN 1.7+ | SQLite with full paths |
|
|
42
|
+
| `.git/config` | Git | Remote URLs, credentials |
|
|
43
|
+
| `.git/HEAD` | Git | Branch info, clone source |
|
|
44
|
+
| `.DS_Store` | macOS | Directory listing |
|
|
45
|
+
| `.idea/` | JetBrains | Project config, DB creds |
|
|
46
|
+
| `WEB-INF/web.xml` | Java | Servlet mappings, config |
|
|
47
|
+
|
|
48
|
+
## Quick Test Vectors
|
|
49
|
+
```
|
|
50
|
+
# Source control files
|
|
51
|
+
/.svn/entries
|
|
52
|
+
/.svn/wc.db
|
|
53
|
+
/.git/config
|
|
54
|
+
/.git/HEAD
|
|
55
|
+
/.DS_Store
|
|
56
|
+
|
|
57
|
+
# Backup files
|
|
58
|
+
/backup.sql
|
|
59
|
+
/backup.tar.gz
|
|
60
|
+
/website.rar
|
|
61
|
+
/db.sql
|
|
62
|
+
/dump.sql
|
|
63
|
+
/*.bak
|
|
64
|
+
|
|
65
|
+
# Configuration files
|
|
66
|
+
/web.config
|
|
67
|
+
/wp-config.php
|
|
68
|
+
/config/database.yml
|
|
69
|
+
/application.properties
|
|
70
|
+
/.env
|
|
71
|
+
/phpinfo.php
|
|
72
|
+
|
|
73
|
+
# Log files
|
|
74
|
+
/logs/
|
|
75
|
+
/log/
|
|
76
|
+
/debug.log
|
|
77
|
+
/error.log
|
|
78
|
+
/seeyon/logs/ctp.log
|
|
79
|
+
|
|
80
|
+
# JSONP data leak
|
|
81
|
+
/api/userinfo?callback=test
|
|
82
|
+
|
|
83
|
+
# GitHub search for credentials
|
|
84
|
+
site:github.com "company.com" password
|
|
85
|
+
site:github.com "company.com" smtp
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Testing Methodology
|
|
89
|
+
1. Enumerate common sensitive file paths (source control, backups, configs)
|
|
90
|
+
2. Check for directory listing on all discovered directories
|
|
91
|
+
3. Search GitHub/GitLab for organization credential leaks
|
|
92
|
+
4. Test JSONP endpoints for cross-origin data exposure
|
|
93
|
+
5. Check error pages for stack traces and config details
|
|
94
|
+
6. Probe log file locations for session/credential leakage
|
|
95
|
+
7. Test sequential ID enumeration on data endpoints
|
|
96
|
+
8. Check API responses for excessive data exposure
|
|
97
|
+
9. Scan for debug/admin endpoints left in production
|
|
98
|
+
|
|
99
|
+
## Information Escalation Chain
|
|
100
|
+
```
|
|
101
|
+
Source code leak → Database credentials → Full database access
|
|
102
|
+
GitHub credential leak → Email access → VPN/internal access
|
|
103
|
+
Log file exposure → Session tokens → Account takeover
|
|
104
|
+
JSONP endpoint → User data → Credential stuffing
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Common Root Causes
|
|
108
|
+
- Development files (.svn, .git) deployed to production
|
|
109
|
+
- Backup files stored in web-accessible directories
|
|
110
|
+
- Debug/logging features enabled in production
|
|
111
|
+
- JSONP endpoints without access control
|
|
112
|
+
- Error messages revealing internal details
|
|
113
|
+
- Credentials committed to public code repositories
|
|
114
|
+
- Default management interfaces left accessible
|