@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.
Files changed (271) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +117 -0
  3. package/agents/access-auditor.md +300 -0
  4. package/agents/assumption-breaker.md +154 -0
  5. package/agents/attack-designer.md +116 -0
  6. package/agents/code-scanner.md +139 -0
  7. package/agents/concurrency-auditor.md +238 -0
  8. package/agents/confirm-writer.md +257 -0
  9. package/agents/context-reviewer.md +274 -0
  10. package/agents/cross-verifier.md +165 -0
  11. package/agents/cve-scout.md +381 -0
  12. package/agents/env-builder.md +282 -0
  13. package/agents/env-profiler.md +205 -0
  14. package/agents/evidence-collector.md +140 -0
  15. package/agents/finding-grader.md +142 -0
  16. package/agents/finding-writer.md +148 -0
  17. package/agents/flow-tracer.md +106 -0
  18. package/agents/goal-backtracer.md +146 -0
  19. package/agents/history-miner.md +467 -0
  20. package/agents/independent-verifier.md +118 -0
  21. package/agents/intent-mapper.md +183 -0
  22. package/agents/longshot-collector.md +128 -0
  23. package/agents/longshot-prober.md +126 -0
  24. package/agents/patch-auditor.md +73 -0
  25. package/agents/poc-author.md +124 -0
  26. package/agents/poc-runner.md +194 -0
  27. package/agents/probe-lead.md +269 -0
  28. package/agents/red-challenger.md +101 -0
  29. package/agents/report-composer.md +208 -0
  30. package/agents/review-adjudicator.md +216 -0
  31. package/agents/spec-auditor.md +155 -0
  32. package/agents/taint-tracer.md +265 -0
  33. package/agents/test-locator.md +209 -0
  34. package/agents/threat-modeler.md +132 -0
  35. package/agents/variant-scanner.md +108 -0
  36. package/agents/variant-spotter.md +110 -0
  37. package/bin/piolium.mjs +376 -0
  38. package/extensions/piolium/_vendor/yaml.bundle.d.mts +6 -0
  39. package/extensions/piolium/_vendor/yaml.bundle.mjs +139 -0
  40. package/extensions/piolium/agent-runner.ts +322 -0
  41. package/extensions/piolium/agents.ts +266 -0
  42. package/extensions/piolium/audit-state.ts +522 -0
  43. package/extensions/piolium/bundled-resources.ts +97 -0
  44. package/extensions/piolium/candidate-scan.ts +966 -0
  45. package/extensions/piolium/command-target.ts +177 -0
  46. package/extensions/piolium/console-stream.ts +57 -0
  47. package/extensions/piolium/export-results.ts +380 -0
  48. package/extensions/piolium/findings.ts +448 -0
  49. package/extensions/piolium/heartbeat.ts +182 -0
  50. package/extensions/piolium/help.ts +234 -0
  51. package/extensions/piolium/index.ts +1865 -0
  52. package/extensions/piolium/longshot.ts +530 -0
  53. package/extensions/piolium/matcher-suggestions.ts +196 -0
  54. package/extensions/piolium/matcher-utils.ts +83 -0
  55. package/extensions/piolium/modes/balanced.ts +750 -0
  56. package/extensions/piolium/modes/confirm-bootstrap.ts +186 -0
  57. package/extensions/piolium/modes/confirm.ts +697 -0
  58. package/extensions/piolium/modes/deep.ts +917 -0
  59. package/extensions/piolium/modes/diff.ts +177 -0
  60. package/extensions/piolium/modes/lite.ts +540 -0
  61. package/extensions/piolium/modes/longshot.ts +595 -0
  62. package/extensions/piolium/modes/merge.ts +204 -0
  63. package/extensions/piolium/modes/phase-runner.ts +267 -0
  64. package/extensions/piolium/modes/reinvest.ts +546 -0
  65. package/extensions/piolium/modes/revisit.ts +279 -0
  66. package/extensions/piolium/modes.ts +48 -0
  67. package/extensions/piolium/phase-labels.ts +123 -0
  68. package/extensions/piolium/phase-status-strip.ts +92 -0
  69. package/extensions/piolium/prompt-prefix-editor.ts +39 -0
  70. package/extensions/piolium/providers/anthropic-vertex.ts +836 -0
  71. package/extensions/piolium/recon.ts +409 -0
  72. package/extensions/piolium/result-stats.ts +105 -0
  73. package/extensions/piolium/retry.ts +120 -0
  74. package/extensions/piolium/scheduler.ts +212 -0
  75. package/extensions/piolium/secrets.ts +368 -0
  76. package/extensions/piolium/tools/web-tools.ts +148 -0
  77. package/package.json +77 -0
  78. package/skills/agentic-actions-auditor/SKILL.md +327 -0
  79. package/skills/agentic-actions-auditor/references/action-profiles.md +186 -0
  80. package/skills/agentic-actions-auditor/references/cross-file-resolution.md +209 -0
  81. package/skills/agentic-actions-auditor/references/foundations.md +94 -0
  82. package/skills/agentic-actions-auditor/references/vector-a-env-var-intermediary.md +77 -0
  83. package/skills/agentic-actions-auditor/references/vector-b-direct-expression-injection.md +83 -0
  84. package/skills/agentic-actions-auditor/references/vector-c-cli-data-fetch.md +83 -0
  85. package/skills/agentic-actions-auditor/references/vector-d-pr-target-checkout.md +88 -0
  86. package/skills/agentic-actions-auditor/references/vector-e-error-log-injection.md +88 -0
  87. package/skills/agentic-actions-auditor/references/vector-f-subshell-expansion.md +82 -0
  88. package/skills/agentic-actions-auditor/references/vector-g-eval-of-ai-output.md +91 -0
  89. package/skills/agentic-actions-auditor/references/vector-h-dangerous-sandbox-configs.md +102 -0
  90. package/skills/agentic-actions-auditor/references/vector-i-wildcard-allowlists.md +88 -0
  91. package/skills/audit/SKILL.md +562 -0
  92. package/skills/audit/assets/icon.svg +7 -0
  93. package/skills/audit/hooks/scripts/validate_phase_output.py +550 -0
  94. package/skills/audit/references/adversarial-review.md +148 -0
  95. package/skills/audit/references/architecture-aware-sast.md +306 -0
  96. package/skills/audit/references/audit-workflow.md +737 -0
  97. package/skills/audit/references/chamber-protocol.md +384 -0
  98. package/skills/audit/references/creative-attack-modes.md +221 -0
  99. package/skills/audit/references/deep-analysis.md +273 -0
  100. package/skills/audit/references/domain-attack-playbooks.md +1129 -0
  101. package/skills/audit/references/knowledge-base-template.md +513 -0
  102. package/skills/audit/references/real-env-validation.md +191 -0
  103. package/skills/audit/references/report-templates.md +417 -0
  104. package/skills/audit/references/triage-and-prereqs.md +134 -0
  105. package/skills/audit/scripts/consolidate_drafts.py +554 -0
  106. package/skills/audit/scripts/partition_findings.py +152 -0
  107. package/skills/audit/scripts/rg-hotspots.sh +121 -0
  108. package/skills/audit/scripts/stamp_file_state.py +349 -0
  109. package/skills/code-reviewer/SKILL.md +65 -0
  110. package/skills/codeql/SKILL.md +281 -0
  111. package/skills/codeql/references/build-fixes.md +90 -0
  112. package/skills/codeql/references/diagnostic-query-templates.md +339 -0
  113. package/skills/codeql/references/extension-yaml-format.md +209 -0
  114. package/skills/codeql/references/important-only-suite.md +153 -0
  115. package/skills/codeql/references/language-details.md +207 -0
  116. package/skills/codeql/references/macos-arm64e-workaround.md +179 -0
  117. package/skills/codeql/references/performance-tuning.md +111 -0
  118. package/skills/codeql/references/quality-assessment.md +172 -0
  119. package/skills/codeql/references/ruleset-catalog.md +63 -0
  120. package/skills/codeql/references/run-all-suite.md +92 -0
  121. package/skills/codeql/references/sarif-processing.md +79 -0
  122. package/skills/codeql/references/threat-models.md +51 -0
  123. package/skills/codeql/workflows/build-database.md +280 -0
  124. package/skills/codeql/workflows/create-data-extensions.md +261 -0
  125. package/skills/codeql/workflows/run-analysis.md +301 -0
  126. package/skills/differential-review/SKILL.md +220 -0
  127. package/skills/differential-review/adversarial.md +203 -0
  128. package/skills/differential-review/methodology.md +234 -0
  129. package/skills/differential-review/patterns.md +300 -0
  130. package/skills/differential-review/reporting.md +369 -0
  131. package/skills/fp-check/SKILL.md +125 -0
  132. package/skills/fp-check/references/bug-class-verification.md +114 -0
  133. package/skills/fp-check/references/deep-verification.md +143 -0
  134. package/skills/fp-check/references/evidence-templates.md +91 -0
  135. package/skills/fp-check/references/false-positive-patterns.md +115 -0
  136. package/skills/fp-check/references/gate-reviews.md +27 -0
  137. package/skills/fp-check/references/standard-verification.md +78 -0
  138. package/skills/insecure-defaults/SKILL.md +117 -0
  139. package/skills/insecure-defaults/references/examples.md +409 -0
  140. package/skills/last30days/SKILL.md +444 -0
  141. package/skills/sarif-parsing/SKILL.md +483 -0
  142. package/skills/sarif-parsing/resources/jq-queries.md +162 -0
  143. package/skills/sarif-parsing/resources/sarif_helpers.py +331 -0
  144. package/skills/security-threat-model/LICENSE.txt +201 -0
  145. package/skills/security-threat-model/SKILL.md +81 -0
  146. package/skills/security-threat-model/agents/openai.yaml +4 -0
  147. package/skills/security-threat-model/references/prompt-template.md +255 -0
  148. package/skills/security-threat-model/references/security-controls-and-assets.md +32 -0
  149. package/skills/semgrep/SKILL.md +212 -0
  150. package/skills/semgrep/references/rulesets.md +162 -0
  151. package/skills/semgrep/references/scan-modes.md +110 -0
  152. package/skills/semgrep/references/scanner-task-prompt.md +140 -0
  153. package/skills/semgrep/scripts/merge_sarif.py +203 -0
  154. package/skills/semgrep/workflows/scan-workflow.md +311 -0
  155. package/skills/semgrep-rule-creator/SKILL.md +168 -0
  156. package/skills/semgrep-rule-creator/references/quick-reference.md +202 -0
  157. package/skills/semgrep-rule-creator/references/workflow.md +240 -0
  158. package/skills/semgrep-rule-variant-creator/SKILL.md +205 -0
  159. package/skills/semgrep-rule-variant-creator/references/applicability-analysis.md +250 -0
  160. package/skills/semgrep-rule-variant-creator/references/language-syntax-guide.md +324 -0
  161. package/skills/semgrep-rule-variant-creator/references/workflow.md +518 -0
  162. package/skills/sharp-edges/SKILL.md +292 -0
  163. package/skills/sharp-edges/references/auth-patterns.md +252 -0
  164. package/skills/sharp-edges/references/case-studies.md +274 -0
  165. package/skills/sharp-edges/references/config-patterns.md +333 -0
  166. package/skills/sharp-edges/references/crypto-apis.md +190 -0
  167. package/skills/sharp-edges/references/lang-c.md +205 -0
  168. package/skills/sharp-edges/references/lang-csharp.md +285 -0
  169. package/skills/sharp-edges/references/lang-go.md +270 -0
  170. package/skills/sharp-edges/references/lang-java.md +263 -0
  171. package/skills/sharp-edges/references/lang-javascript.md +269 -0
  172. package/skills/sharp-edges/references/lang-kotlin.md +265 -0
  173. package/skills/sharp-edges/references/lang-php.md +245 -0
  174. package/skills/sharp-edges/references/lang-python.md +274 -0
  175. package/skills/sharp-edges/references/lang-ruby.md +273 -0
  176. package/skills/sharp-edges/references/lang-rust.md +272 -0
  177. package/skills/sharp-edges/references/lang-swift.md +287 -0
  178. package/skills/sharp-edges/references/language-specific.md +588 -0
  179. package/skills/spec-to-code-compliance/SKILL.md +357 -0
  180. package/skills/spec-to-code-compliance/resources/COMPLETENESS_CHECKLIST.md +69 -0
  181. package/skills/spec-to-code-compliance/resources/IR_EXAMPLES.md +417 -0
  182. package/skills/spec-to-code-compliance/resources/OUTPUT_REQUIREMENTS.md +105 -0
  183. package/skills/supply-chain-risk-auditor/SKILL.md +67 -0
  184. package/skills/supply-chain-risk-auditor/resources/results-template.md +41 -0
  185. package/skills/variant-analysis/METHODOLOGY.md +327 -0
  186. package/skills/variant-analysis/SKILL.md +142 -0
  187. package/skills/variant-analysis/resources/codeql/cpp.ql +119 -0
  188. package/skills/variant-analysis/resources/codeql/go.ql +69 -0
  189. package/skills/variant-analysis/resources/codeql/java.ql +71 -0
  190. package/skills/variant-analysis/resources/codeql/javascript.ql +63 -0
  191. package/skills/variant-analysis/resources/codeql/python.ql +80 -0
  192. package/skills/variant-analysis/resources/semgrep/cpp.yaml +98 -0
  193. package/skills/variant-analysis/resources/semgrep/go.yaml +63 -0
  194. package/skills/variant-analysis/resources/semgrep/java.yaml +61 -0
  195. package/skills/variant-analysis/resources/semgrep/javascript.yaml +60 -0
  196. package/skills/variant-analysis/resources/semgrep/python.yaml +72 -0
  197. package/skills/variant-analysis/resources/variant-report-template.md +75 -0
  198. package/skills/vuln-report/SKILL.md +137 -0
  199. package/skills/vuln-report/agents/openai.yaml +4 -0
  200. package/skills/vuln-report/references/report-template.md +135 -0
  201. package/skills/wooyun-legacy/SKILL.md +367 -0
  202. package/skills/wooyun-legacy/references/bank-penetration.md +222 -0
  203. package/skills/wooyun-legacy/references/checklists/command-execution-checklist.md +119 -0
  204. package/skills/wooyun-legacy/references/checklists/csrf-checklist.md +74 -0
  205. package/skills/wooyun-legacy/references/checklists/file-upload-checklist.md +108 -0
  206. package/skills/wooyun-legacy/references/checklists/info-disclosure-checklist.md +114 -0
  207. package/skills/wooyun-legacy/references/checklists/logic-flaws-checklist.md +95 -0
  208. package/skills/wooyun-legacy/references/checklists/misconfig-checklist.md +124 -0
  209. package/skills/wooyun-legacy/references/checklists/path-traversal-checklist.md +87 -0
  210. package/skills/wooyun-legacy/references/checklists/rce-checklist.md +93 -0
  211. package/skills/wooyun-legacy/references/checklists/sql-injection-checklist.md +97 -0
  212. package/skills/wooyun-legacy/references/checklists/ssrf-checklist.md +99 -0
  213. package/skills/wooyun-legacy/references/checklists/unauthorized-access-checklist.md +89 -0
  214. package/skills/wooyun-legacy/references/checklists/weak-password-checklist.md +115 -0
  215. package/skills/wooyun-legacy/references/checklists/xss-checklist.md +103 -0
  216. package/skills/wooyun-legacy/references/checklists/xxe-checklist.md +130 -0
  217. package/skills/wooyun-legacy/references/info-disclosure.md +975 -0
  218. package/skills/wooyun-legacy/references/logic-flaws.md +721 -0
  219. package/skills/wooyun-legacy/references/path-traversal.md +1191 -0
  220. package/skills/wooyun-legacy/references/telecom-penetration.md +156 -0
  221. package/skills/wooyun-legacy/references/unauthorized-access.md +980 -0
  222. package/skills/wooyun-legacy/references/xss.md +746 -0
  223. package/skills/zeroize-audit/SKILL.md +371 -0
  224. package/skills/zeroize-audit/configs/c.yaml +21 -0
  225. package/skills/zeroize-audit/configs/default.yaml +128 -0
  226. package/skills/zeroize-audit/configs/rust.yaml +83 -0
  227. package/skills/zeroize-audit/prompts/report_template.md +238 -0
  228. package/skills/zeroize-audit/prompts/system.md +163 -0
  229. package/skills/zeroize-audit/prompts/task.md +97 -0
  230. package/skills/zeroize-audit/references/compile-commands.md +231 -0
  231. package/skills/zeroize-audit/references/detection-strategy.md +191 -0
  232. package/skills/zeroize-audit/references/ir-analysis.md +252 -0
  233. package/skills/zeroize-audit/references/mcp-analysis.md +221 -0
  234. package/skills/zeroize-audit/references/poc-generation.md +470 -0
  235. package/skills/zeroize-audit/references/rust-zeroization-patterns.md +867 -0
  236. package/skills/zeroize-audit/schemas/input.json +83 -0
  237. package/skills/zeroize-audit/schemas/output.json +140 -0
  238. package/skills/zeroize-audit/tools/analyze_asm.sh +202 -0
  239. package/skills/zeroize-audit/tools/analyze_cfg.py +381 -0
  240. package/skills/zeroize-audit/tools/analyze_heap.sh +211 -0
  241. package/skills/zeroize-audit/tools/analyze_ir_semantic.py +429 -0
  242. package/skills/zeroize-audit/tools/diff_ir.sh +135 -0
  243. package/skills/zeroize-audit/tools/diff_rust_mir.sh +189 -0
  244. package/skills/zeroize-audit/tools/emit_asm.sh +67 -0
  245. package/skills/zeroize-audit/tools/emit_ir.sh +77 -0
  246. package/skills/zeroize-audit/tools/emit_rust_asm.sh +178 -0
  247. package/skills/zeroize-audit/tools/emit_rust_ir.sh +150 -0
  248. package/skills/zeroize-audit/tools/emit_rust_mir.sh +158 -0
  249. package/skills/zeroize-audit/tools/extract_compile_flags.py +284 -0
  250. package/skills/zeroize-audit/tools/generate_poc.py +1329 -0
  251. package/skills/zeroize-audit/tools/mcp/apply_confidence_gates.py +113 -0
  252. package/skills/zeroize-audit/tools/mcp/check_mcp.sh +68 -0
  253. package/skills/zeroize-audit/tools/mcp/normalize_mcp_evidence.py +125 -0
  254. package/skills/zeroize-audit/tools/scripts/check_llvm_patterns.py +481 -0
  255. package/skills/zeroize-audit/tools/scripts/check_mir_patterns.py +554 -0
  256. package/skills/zeroize-audit/tools/scripts/check_rust_asm.py +424 -0
  257. package/skills/zeroize-audit/tools/scripts/check_rust_asm_aarch64.py +300 -0
  258. package/skills/zeroize-audit/tools/scripts/check_rust_asm_x86.py +283 -0
  259. package/skills/zeroize-audit/tools/scripts/find_dangerous_apis.py +375 -0
  260. package/skills/zeroize-audit/tools/scripts/semantic_audit.py +923 -0
  261. package/skills/zeroize-audit/tools/track_dataflow.sh +196 -0
  262. package/skills/zeroize-audit/tools/validate_rust_toolchain.sh +298 -0
  263. package/skills/zeroize-audit/workflows/phase-0-preflight.md +150 -0
  264. package/skills/zeroize-audit/workflows/phase-1-source-analysis.md +144 -0
  265. package/skills/zeroize-audit/workflows/phase-2-compiler-analysis.md +139 -0
  266. package/skills/zeroize-audit/workflows/phase-3-interim-report.md +46 -0
  267. package/skills/zeroize-audit/workflows/phase-4-poc-generation.md +46 -0
  268. package/skills/zeroize-audit/workflows/phase-5-poc-validation.md +136 -0
  269. package/skills/zeroize-audit/workflows/phase-6-final-report.md +44 -0
  270. package/skills/zeroize-audit/workflows/phase-7-test-generation.md +42 -0
  271. package/themes/piolium-srcery.json +94 -0
@@ -0,0 +1,975 @@
1
+ # Information Disclosure Vulnerability Analysis Methodology
2
+
3
+ > Distilled from 7,337 cases | Data source: WooYun Vulnerability Database (2010-2016)
4
+
5
+ ---
6
+
7
+ ## 1. Core Statistics
8
+
9
+ ### 1.1 Vulnerability Type Distribution
10
+
11
+ | Vulnerability Type | Count | Percentage |
12
+ |-------------------|-------|-----------|
13
+ | Sensitive Information Disclosure | 3,574 | 48.7% |
14
+ | Critical Sensitive Information Disclosure | 2,193 | 29.9% |
15
+ | Mass User Data Leakage | 656 | 8.9% |
16
+ | Internal Classified Information Leakage | 469 | 6.4% |
17
+ | Network Sensitive Information Leakage | 445 | 6.1% |
18
+
19
+ ### 1.2 Disclosure Content Categories (Based on 50 Representative Cases)
20
+
21
+ ```
22
+ Internal System Exposure ████████████████████████ 23 cases (46%)
23
+ Keys/Credentials Leakage ████████████████████ 20 cases (40%)
24
+ Database Exposure ████████████████████ 20 cases (40%)
25
+ User Information Leakage ███████████████████ 19 cases (38%)
26
+ Employee Information Leak ██████████ 10 cases (20%)
27
+ Source Code Leakage ██████████ 10 cases (20%)
28
+ Log File Leakage █████████ 9 cases (18%)
29
+ Configuration File Leak ████████ 8 cases (16%)
30
+ Interface/API Exposure ████ 4 cases (8%)
31
+ Financial Information Leak ███ 3 cases (6%)
32
+ ```
33
+
34
+ ---
35
+
36
+ ## 2. Sensitive File Path Dictionary
37
+
38
+ ### 2.1 Version Control Leakage (560 Cases)
39
+
40
+ #### Git Leakage Paths
41
+ ```
42
+ /.git/config # Git configuration file, contains remote repo URL
43
+ /.git/HEAD # Current branch reference
44
+ /.git/index # Staging area index
45
+ /.git/logs/HEAD # Operation log
46
+ /.git/objects/ # Object storage directory
47
+ /.git/refs/ # References directory
48
+ /.git/COMMIT_EDITMSG # Last commit message
49
+ /.git/description # Repository description
50
+ /.git/info/exclude # Exclusion rules
51
+ /.git/packed-refs # Packed references
52
+ ```
53
+
54
+ #### SVN Leakage Paths (393 High-Frequency Cases)
55
+ ```
56
+ /.svn/entries # SVN 1.6 and earlier entry file
57
+ /.svn/wc.db # SVN 1.7+ SQLite database
58
+ /.svn/all-wcprops # Working copy properties
59
+ /.svn/pristine/ # Pristine file storage
60
+ /.svn/text-base/ # Text base files
61
+ /.svn/props/ # Property files
62
+ /.svn/tmp/ # Temporary directory
63
+ ```
64
+
65
+ **Exploitation Tools**:
66
+ - `dvcs-ripper` - Automated .git/.svn download
67
+ - `GitHack` - Source code reconstruction from .git leakage
68
+ - `svn-extractor` - SVN information extraction
69
+
70
+ ### 2.2 Backup File Leakage (565 Cases)
71
+
72
+ #### High-Frequency Backup Paths
73
+ ```
74
+ # Archive backups (highest hit rate)
75
+ /wwwroot.rar # 530 cases matched
76
+ /www.zip
77
+ /web.rar
78
+ /backup.zip
79
+ /site.tar.gz
80
+ /db.sql.gz
81
+ /{domain}.zip # e.g., /example.com.zip
82
+ /{domain}.rar
83
+
84
+ # SQL backups
85
+ /backup.sql # 136 cases matched
86
+ /database.sql
87
+ /db.sql
88
+ /dump.sql
89
+ /{dbname}.sql
90
+
91
+ # Configuration backups
92
+ /config.php.bak # 101 cases matched
93
+ /config_global.php.bak
94
+ /uc_server/data/config.inc.php.bak
95
+ /web.config.bak
96
+ /.env.bak
97
+ ```
98
+
99
+ ### 2.3 Configuration File Leakage
100
+
101
+ #### PHP Configuration
102
+ ```
103
+ /config.php
104
+ /config/config.php
105
+ /include/config.php
106
+ /data/config.php
107
+ /conf/config.inc.php
108
+ /application/config/database.php
109
+ ```
110
+
111
+ #### Java/Spring Configuration
112
+ ```
113
+ /WEB-INF/web.xml
114
+ /WEB-INF/applicationContext.xml
115
+ /WEB-INF/classes/application.properties
116
+ /WEB-INF/classes/jdbc.properties
117
+ /WEB-INF/classes/database.yml
118
+ /WEB-INF/classes/hibernate.cfg.xml
119
+ ```
120
+
121
+ #### .NET Configuration
122
+ ```
123
+ /web.config # 36 cases matched
124
+ /App_Data/
125
+ /bin/
126
+ /connectionStrings.config
127
+ ```
128
+
129
+ #### General Configuration
130
+ ```
131
+ /.env # Laravel/Node.js environment config
132
+ /.env.local
133
+ /.env.production
134
+ /config.yml
135
+ /config.json
136
+ /settings.py # Django configuration
137
+ /application.properties # Spring Boot
138
+ /appsettings.json # ASP.NET Core
139
+ ```
140
+
141
+ ### 2.4 Probe and Debug Files
142
+
143
+ ```
144
+ /phpinfo.php # 47 cases matched
145
+ /info.php # 34 cases matched
146
+ /test.php # 38 cases matched
147
+ /debug.php
148
+ /probe.php
149
+ /i.php
150
+ /1.php
151
+ /t.php
152
+ ```
153
+
154
+ ### 2.5 Log File Leakage
155
+
156
+ ```
157
+ /ctp.log # 23 cases matched (Seeyon OA)
158
+ /logs/ctp.log
159
+ /debug.log
160
+ /error.log
161
+ /access.log
162
+ /application.log
163
+ /runtime/logs/
164
+ /storage/logs/ # Laravel
165
+ /var/log/
166
+ /WEB-INF/logs/
167
+ ```
168
+
169
+ ### 2.6 Database Management Interfaces
170
+
171
+ ```
172
+ /phpmyadmin/ # 46 cases matched
173
+ /phpMyAdmin/
174
+ /pma/
175
+ /myadmin/
176
+ /mysql/
177
+ /adminer.php
178
+ /adminer/
179
+ ```
180
+
181
+ ---
182
+
183
+ ## 3. Detection Methodology
184
+
185
+ ### 3.1 Detection Technique Distribution (Based on 7,337 Cases)
186
+
187
+ | Detection Method | Case Count | Effectiveness |
188
+ |-----------------|------------|---------------|
189
+ | Interface Enumeration | 1,063 | High |
190
+ | Backup File Guessing | 565 | High |
191
+ | Version Control Probing | 560 | High |
192
+ | Default Path Access | 514 | Medium |
193
+ | Error Message Analysis | 307 | Medium |
194
+ | Directory Scanning/Brute Force | 243 | Medium |
195
+ | Google Hacking | 226 | Medium |
196
+ | Response Header Analysis | 186 | Low |
197
+
198
+ ### 3.2 Detection Workflow (Meta-Methodology)
199
+
200
+ ```
201
+ Phase 1: Information Gathering
202
+ ├── Response Header Analysis → Server/X-Powered-By/Via
203
+ ├── Error Page Triggering → 404/500/Anomalous parameters
204
+ ├── robots.txt Analysis → Hidden paths
205
+ └── crossdomain.xml → Cross-domain configuration
206
+
207
+ Phase 2: Passive Detection
208
+ ├── Page Source Audit → Comments/Hidden fields/JS
209
+ ├── Interface Enumeration → API docs/Swagger
210
+ └── Parameter Traversal → ID/Filename parameters
211
+
212
+ Phase 3: Active Detection
213
+ ├── Version Control Probing → .git/.svn/.hg
214
+ ├── Backup File Guessing → Domain name/Common names/Dates
215
+ ├── Sensitive Path Scanning → Config/Logs/Probes
216
+ └── Directory Brute Force → Dictionaries/Recursive
217
+ ```
218
+
219
+ ### 3.3 Google Hacking Syntax
220
+
221
+ ```
222
+ # Backup files
223
+ site:target.com filetype:sql
224
+ site:target.com filetype:bak
225
+ site:target.com filetype:zip inurl:backup
226
+ site:target.com filetype:rar
227
+
228
+ # Configuration files
229
+ site:target.com filetype:env
230
+ site:target.com filetype:config
231
+ site:target.com "db_password"
232
+ site:target.com "mysql_connect"
233
+
234
+ # Version control
235
+ site:target.com inurl:.git
236
+ site:target.com inurl:.svn
237
+ site:target.com intitle:"index of" .git
238
+
239
+ # Log files
240
+ site:target.com filetype:log
241
+ site:target.com inurl:debug.log
242
+ site:target.com inurl:error_log
243
+
244
+ # Probe files
245
+ site:target.com inurl:phpinfo
246
+ site:target.com intitle:phpinfo
247
+ ```
248
+
249
+ ---
250
+
251
+ ## 4. Information Exploitation Chains (Attack Paths)
252
+
253
+ ### 4.1 Source Code Leakage -> Full Compromise
254
+
255
+ ```
256
+ Representative case: wooyun-2015-0123377 (Karaoke app server compromise)
257
+
258
+ Attack path:
259
+ [1] Discover full site source code archive download
260
+ |
261
+ [2] Analyze source code to extract database configuration
262
+ |
263
+ [3] Connect to database (root privileges)
264
+ |
265
+ [4] Database privilege escalation to obtain server access
266
+ |
267
+ [5] Lateral movement across multiple game servers
268
+
269
+ Key chain: Source code -> Configuration -> Database -> System
270
+ ```
271
+
272
+ ### 4.2 Version Control Leakage -> Code Audit
273
+
274
+ ```
275
+ Representative case: wooyun-2013-038850 (SVN leakage on a portal site)
276
+
277
+ Attack path:
278
+ [1] Access /.svn/entries to confirm leakage
279
+ |
280
+ [2] Use tools to download complete source code
281
+ |
282
+ [3] Code audit discovers SQL injection
283
+ |
284
+ [4] Exploit injection to obtain admin privileges
285
+ |
286
+ [5] Admin panel file upload to obtain shell
287
+
288
+ Key chain: SVN -> Source code -> Vulnerability -> Privileges
289
+ ```
290
+
291
+ ### 4.3 Configuration File Leakage -> Database Takeover
292
+
293
+ ```
294
+ Representative case: wooyun-2015-0120183 (Credit card app)
295
+
296
+ Attack path:
297
+ [1] Discover log4net.xml/MongoDB configuration leakage
298
+ |
299
+ [2] Extract database connection strings
300
+ |
301
+ [3] Connect to MongoDB to obtain user data
302
+ |
303
+ [4] Use user credentials to log into business systems
304
+ |
305
+ [5] Obtain sensitive financial data
306
+
307
+ Key chain: Configuration -> Credentials -> Database -> Business data
308
+ ```
309
+
310
+ ### 4.4 Log/Session Leakage -> Identity Hijacking
311
+
312
+ ```
313
+ Representative case: wooyun-2015-0163955 (Session leakage in a corporate group)
314
+
315
+ Attack path:
316
+ [1] Access collaborative office system management interface
317
+ |
318
+ [2] Default credentials to enter admin panel
319
+ |
320
+ [3] View system logs to obtain user sessions
321
+ |
322
+ [4] Session hijacking to log in as any user
323
+ |
324
+ [5] Access financial ledger data worth hundreds of millions
325
+
326
+ Key chain: Admin panel -> Logs -> Session -> Business data
327
+ ```
328
+
329
+ ### 4.5 API Interface Leakage -> Bulk Data Retrieval
330
+
331
+ ```
332
+ Representative case: wooyun-2015-0100173 (Campus TV network)
333
+
334
+ Attack path:
335
+ [1] Analyze page to discover API interface calls
336
+ |
337
+ [2] Interface returns usernames and MD5 passwords
338
+ |
339
+ [3] MD5 decryption to obtain plaintext passwords (123456)
340
+ |
341
+ [4] Enumerate interface to obtain unit codes
342
+ |
343
+ [5] Bulk control of 400 campus display screens
344
+
345
+ Key chain: Interface -> Credentials -> Decryption -> Bulk control
346
+ ```
347
+
348
+ ### 4.6 SMS Interface Leakage -> Account Takeover
349
+
350
+ ```
351
+ Representative case: wooyun-2015-0128813 (Snack e-commerce SMS interface)
352
+
353
+ Attack path:
354
+ [1] Obtain SMS platform API credentials
355
+ |
356
+ [2] Call interface to view all SMS records
357
+ |
358
+ [3] Obtain user phone numbers and verification codes
359
+ |
360
+ [4] Reset any user's password
361
+ |
362
+ [5] Log into user accounts / obtain server shell
363
+
364
+ Key chain: API credentials -> SMS records -> Verification codes -> Account takeover
365
+ ```
366
+
367
+ ---
368
+
369
+ ## 5. Common Leakage Scenario Patterns
370
+
371
+ ### 5.1 Development Environment Remnants
372
+
373
+ ```
374
+ Scenario characteristics:
375
+ - Test files not deleted (test.php, info.php)
376
+ - Debug mode not disabled (DEBUG=true)
377
+ - Development notes left behind (TODO, FIXME comments with sensitive info)
378
+ - Test accounts hardcoded (admin/123456)
379
+
380
+ Typical paths:
381
+ /test/
382
+ /dev/
383
+ /debug/
384
+ /phpinfo.php
385
+ /.env (DEBUG=true)
386
+ ```
387
+
388
+ ### 5.2 Deployment Misconfiguration
389
+
390
+ ```
391
+ Scenario characteristics:
392
+ - Version control directories not cleaned up (.git/.svn)
393
+ - Backup files placed in web directory
394
+ - Configuration file permissions too permissive
395
+ - Default pages not modified
396
+
397
+ Typical paths:
398
+ /.git/
399
+ /.svn/
400
+ /backup/
401
+ /bak/
402
+ /old/
403
+ ```
404
+
405
+ ### 5.3 Improper Error Handling
406
+
407
+ ```
408
+ Scenario characteristics:
409
+ - Detailed error messages output
410
+ - Stack traces exposed
411
+ - SQL errors displayed
412
+ - File paths leaked
413
+
414
+ Triggering methods:
415
+ - Anomalous parameters: ?id=1'
416
+ - Type errors: ?id[]=1
417
+ - Null injection: ?file=
418
+ - Path traversal: ?file=../
419
+ ```
420
+
421
+ ### 5.4 Interface Design Flaws
422
+
423
+ ```
424
+ Scenario characteristics:
425
+ - Unauthorized interface access
426
+ - Excessive information returned
427
+ - Bulk data enumeration
428
+ - Debug interfaces exposed
429
+
430
+ Typical interfaces:
431
+ /api/user/list
432
+ /api/debug
433
+ /swagger-ui.html
434
+ /api-docs
435
+ /actuator/env (Spring Boot)
436
+ ```
437
+
438
+ ---
439
+
440
+ ## 6. Defensive Detection Checklist
441
+
442
+ ### 6.1 Sensitive File Detection Script
443
+
444
+ ```bash
445
+ #!/bin/bash
446
+ # Quick information disclosure detection script
447
+
448
+ TARGET=$1
449
+
450
+ # Version control
451
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/.git/config"
452
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/.svn/entries"
453
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/.svn/wc.db"
454
+
455
+ # Backup files
456
+ for ext in zip rar tar.gz sql bak; do
457
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/backup.$ext"
458
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/www.$ext"
459
+ done
460
+
461
+ # Configuration files
462
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/.env"
463
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/web.config"
464
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/config.php.bak"
465
+
466
+ # Probe files
467
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/phpinfo.php"
468
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/info.php"
469
+ curl -s -o /dev/null -w "%{http_code}" "$TARGET/test.php"
470
+ ```
471
+
472
+ ### 6.2 Nginx Security Configuration
473
+
474
+ ```nginx
475
+ # Block access to sensitive directories and files
476
+ location ~ /\.(git|svn|env|htaccess|htpasswd) {
477
+ deny all;
478
+ return 404;
479
+ }
480
+
481
+ location ~ \.(bak|sql|log|config|ini|yml)$ {
482
+ deny all;
483
+ return 404;
484
+ }
485
+
486
+ location ~* /(backup|bak|old|temp|test|dev)/ {
487
+ deny all;
488
+ return 404;
489
+ }
490
+
491
+ # Disable directory listing
492
+ autoindex off;
493
+
494
+ # Hide version information
495
+ server_tokens off;
496
+ ```
497
+
498
+ ### 6.3 Apache Security Configuration
499
+
500
+ ```apache
501
+ # .htaccess
502
+ <FilesMatch "\.(git|svn|env|bak|sql|log|config)">
503
+ Order Allow,Deny
504
+ Deny from all
505
+ </FilesMatch>
506
+
507
+ <DirectoryMatch "/\.(git|svn)">
508
+ Order Allow,Deny
509
+ Deny from all
510
+ </DirectoryMatch>
511
+
512
+ Options -Indexes
513
+ ServerSignature Off
514
+ ```
515
+
516
+ ---
517
+
518
+ ## 7. Key Insights (Root Cause Analysis)
519
+
520
+ ### 7.1 Meta-Patterns from the Attacker's Perspective
521
+
522
+ ```
523
+ Pattern 1: Entropy Reduction Principle
524
+ Developers tend to use the simplest naming conventions:
525
+ - Backup files: www.zip, backup.sql, {domain}.rar
526
+ - Test files: test.php, info.php, 1.php
527
+ - Configuration backups: config.php.bak, .env.bak
528
+
529
+ Pattern 2: Path Dependency
530
+ Legacy artifacts are more dangerous than new creations:
531
+ - .svn (older) is more common than .git in traditional enterprises
532
+ - Backup file naming follows temporal patterns: backup_20150101.sql
533
+
534
+ Pattern 3: Trust Transitivity
535
+ A single leakage point can collapse the entire trust chain:
536
+ Source code -> Configuration -> Database -> Internal network -> Full compromise
537
+
538
+ Pattern 4: Defaults Are Vulnerabilities
539
+ Default configurations, default paths, and default passwords
540
+ constitute the largest attack surface
541
+ ```
542
+
543
+ ### 7.2 Defense Priority Matrix
544
+
545
+ ```
546
+ High Impact
547
+ |
548
+ ┌──────────┼──────────┐
549
+ │ Version │ Database │ <- Priority 1: Fix immediately
550
+ │ Control │ Backup │
551
+ │ Leakage │ Leakage │
552
+ ├──────────┼──────────┤
553
+ │ Config │ Log File │ <- Priority 2: Urgent remediation
554
+ │ File │ Leakage │
555
+ │ Leakage │ │
556
+ ├──────────┼──────────┤
557
+ │ Probe │ Error │ <- Priority 3: Periodic checks
558
+ │ File │ Message │
559
+ │ Remnants │ Leakage │
560
+ └──────────┼──────────┘
561
+ |
562
+ Low Impact
563
+ Low Prob ──┼── High Prob
564
+ ```
565
+
566
+ ### 7.3 Automated Detection Recommendations
567
+
568
+ ```
569
+ 1. CI/CD Integrated Detection
570
+ - Scan for sensitive files before deployment
571
+ - Block .git/.svn directory deployment
572
+ - Configuration file encryption checks
573
+
574
+ 2. Periodic Security Scanning
575
+ - Backup file enumeration
576
+ - Version control probing
577
+ - Sensitive path dictionary scanning
578
+
579
+ 3. Monitoring and Alerting
580
+ - Anomalous file access monitoring
581
+ - Sensitive path access alerts
582
+ - Large file download detection
583
+ ```
584
+
585
+ ---
586
+
587
+ ## 8. Reference Case Index
588
+
589
+ | Case ID | Title | Type | Exploitation Chain |
590
+ |---------|-------|------|-------------------|
591
+ | wooyun-2015-0123377 | Karaoke app server compromise | Source code leak | Source -> Config -> DB -> Privilege escalation |
592
+ | wooyun-2013-038850 | Portal site SVN leakage | Version control | SVN -> Source -> SQL injection |
593
+ | wooyun-2015-0120183 | Credit card app | Config leak | Config -> MongoDB -> Data |
594
+ | wooyun-2015-0163955 | Corporate group session leak | Log leak | Admin panel -> Logs -> Session hijacking |
595
+ | wooyun-2015-0128813 | Snack e-commerce SMS | API leak | API -> SMS -> Account takeover |
596
+ | wooyun-2015-0125565 | Fintech company Git leak | Git leak | .git -> Database passwords |
597
+ | wooyun-2014-049693 | Fashion portal SVN | SVN leak | .svn -> Directory traversal |
598
+ | wooyun-2014-085529 | E-commerce data breach | Unauthorized DB | MongoDB -> FTP -> Order data |
599
+ | wooyun-2015-0150430 | Airline information leak | Credential leak | Email -> Domain password -> VPN |
600
+ | wooyun-2013-039470 | Computer manufacturer backup | Backup leak | data.zip -> Database configuration |
601
+
602
+ ---
603
+
604
+ ## 9. Third-Party Service Leakage Special Topic
605
+
606
+ ### 9.1 SMS Interface Leakage Patterns
607
+
608
+ #### Meta-Analysis Methodology
609
+
610
+ ```
611
+ Core logic chain of third-party service leakage:
612
+
613
+ [1] Missing Credential Management
614
+ ├─ Hardcoded in source code
615
+ ├─ Stored in plaintext configuration files
616
+ ├─ Complete requests logged in log files
617
+ └─ Credentials returned in error messages
618
+
619
+ |
620
+
621
+ [2] Interface Permission Design Flaws
622
+ ├─ No IP allowlist restrictions
623
+ ├─ No access rate limiting
624
+ ├─ No request signature verification
625
+ └─ Cross-origin calls permitted
626
+
627
+ |
628
+
629
+ [3] Expanded Data Exposure Surface
630
+ ├─ Historical send records queryable
631
+ ├─ Full phone numbers returned
632
+ ├─ Verification code content in plaintext
633
+ └─ Business-sensitive information leaked
634
+
635
+ |
636
+
637
+ [4] Business Logic Vulnerability Exploitation
638
+ ├─ Verification code brute force or replay
639
+ ├─ User identity spoofing
640
+ ├─ Account takeover attacks
641
+ └─ Mass registration abuse
642
+
643
+ Key insight:
644
+ - Third-party APIs are essentially "outsourced trust," but organizations
645
+ often fail to apply secondary protection to that trust
646
+ - The leakage point is not in the organization's own system, but in
647
+ the integration layer with the third-party service
648
+ - Attackers bypass the organization's defenses by directly using
649
+ legitimate third-party credentials
650
+ ```
651
+
652
+ #### Typical Attack Path (wooyun-2015-0128813)
653
+
654
+ ```
655
+ Attack path breakdown:
656
+
657
+ Phase 1: Credential Acquisition
658
+ ├─ Method A: Source code audit
659
+ │ └─ grep -r "sms.*password\|api.*key" .
660
+ ├─ Method B: Configuration file leakage
661
+ │ └─ /config/sms.yaml, .env.production
662
+ ├─ Method C: Hardcoded in frontend JS
663
+ │ └─ app.js: var SMS_API_KEY = "xxx"
664
+ └─ Method D: Log file leakage
665
+ └─ /logs/sms.log (contains full request parameters)
666
+
667
+ Phase 2: Direct Interface Invocation
668
+ ├─ Unauthenticated access to SMS management panel
669
+ │ └─ https://example.com/[REDACTED] (admin/admin123)
670
+ ├─ Direct API calls
671
+ │ └─ POST /api/sendSms?user=xxx&pass=yyy
672
+ └─ Exploiting weak default passwords
673
+ └─ SMS platform panel: admin/123456, admin/admin
674
+
675
+ Phase 3: Data Extraction
676
+ ├─ Query send records
677
+ │ └─ /api/querySent?startDate=2025-01-01
678
+ ├─ Filter verification code messages
679
+ │ └─ keyword: "verification", "code", "verify"
680
+ └─ Bulk export
681
+ └─ Download CSV/Excel with phone numbers + verification codes
682
+
683
+ Phase 4: Business Penetration
684
+ ├─ Password reset flow
685
+ │ └─ Use intercepted verification codes to reset any user's password
686
+ ├─ Login bypass
687
+ │ └─ Directly authenticate via verification code
688
+ ├─ User hijacking
689
+ │ └─ Bulk control of high-value accounts
690
+ └─ Further penetration
691
+ └─ Obtain server shell access
692
+
693
+ Impact expansion:
694
+ Single SMS interface leak -> All user accounts at risk -> Core business data exposed
695
+ ```
696
+
697
+ #### SMS Interface Security Detection Checklist
698
+
699
+ ```bash
700
+ #!/bin/bash
701
+ # Third-party SMS interface security detection script
702
+
703
+ echo "[+] SMS interface leakage detection starting..."
704
+
705
+ # 1. Hardcoded credentials in source code
706
+ echo "[1] Detecting hardcoded credentials in source code..."
707
+ grep -r -i "sms.*password\|smspwd\|sms_key" \
708
+ --include="*.php" --include="*.java" --include="*.js" \
709
+ --include="*.py" --include="*.go" . 2>/dev/null
710
+
711
+ # 2. Configuration file detection
712
+ echo "[2] Detecting SMS configuration in config files..."
713
+ for file in \
714
+ ".env" ".env.production" "config.php" "application.yml" \
715
+ "settings.py" "web.config" "sms.conf"
716
+ do
717
+ if [ -f "$file" ]; then
718
+ grep -i "sms\|message" "$file" 2>/dev/null
719
+ fi
720
+ done
721
+
722
+ # 3. Log file detection
723
+ echo "[3] Detecting sensitive information in log files..."
724
+ find . -name "*.log" -type f 2>/dev/null | while read log; do
725
+ grep -i "password\|token\|key\|secret" "$log" | head -n 5
726
+ done
727
+
728
+ # 4. Frontend JavaScript detection
729
+ echo "[4] Detecting API keys in frontend JS..."
730
+ find . -name "*.js" -type f 2>/dev/null | while read js; do
731
+ grep -i "api.*key\|sms.*token\|smspwd" "$js"
732
+ done
733
+
734
+ # 5. Git history detection
735
+ echo "[5] Detecting sensitive information in Git history..."
736
+ if [ -d ".git" ]; then
737
+ git log -p --all -S "smspwd" -- "*.php" "*.java" "*.js" 2>/dev/null | head -n 20
738
+ fi
739
+
740
+ # 6. Known SMS platform detection
741
+ echo "[6] Detecting known SMS platform interfaces..."
742
+ SMS_PLATFORMS=(
743
+ "aliyun.com"
744
+ "qcloud.com"
745
+ "yunpian.com"
746
+ "sms.cn"
747
+ "luosimao.com"
748
+ "submail.cn"
749
+ "mob.com"
750
+ )
751
+
752
+ for platform in "${SMS_PLATFORMS[@]}"; do
753
+ grep -r "$platform" --include="*.php" --include="*.js" . 2>/dev/null
754
+ done
755
+
756
+ echo "[+] Detection complete"
757
+ ```
758
+
759
+ #### SMS Interface Security Hardening Plan
760
+
761
+ ```yaml
762
+ # 1. Credential Management Strategy
763
+ credential_management:
764
+ storage:
765
+ - Use a key management service (KMS) for credential storage
766
+ - Environment variable injection (do not write to config files)
767
+ - Encrypted configuration file storage
768
+ - Separate development and production credentials
769
+
770
+ rotation:
771
+ - Regularly rotate API keys (recommended every 3-6 months)
772
+ - Immediately revoke old keys upon leakage
773
+ - Use versioned credential management
774
+
775
+ access_control:
776
+ - Implement least privilege principle
777
+ - Prohibit public code repositories from containing credentials
778
+ - Frontend code must never contain server-side credentials
779
+
780
+ # 2. API Call Security
781
+ api_security:
782
+ network_layer:
783
+ - Configure IP allowlists (only allow server IPs to call)
784
+ - Use VPC internal network calls
785
+ - Prohibit direct public internet access
786
+
787
+ application_layer:
788
+ - Implement request signature verification (HMAC-SHA256)
789
+ - Add timestamps to prevent replay attacks
790
+ - Limit send frequency per phone number
791
+ - Implement daily send volume limits
792
+
793
+ monitoring:
794
+ - Anomalous send volume alerts
795
+ - Failed request monitoring
796
+ - Cost anomaly alerts
797
+ - Suspicious content detection
798
+
799
+ # 3. Data Protection
800
+ data_protection:
801
+ sent_messages:
802
+ - Do not log full verification codes in frontend/logs
803
+ - Limit verification code validity (5-10 minutes)
804
+ - Invalidate verification codes immediately after single use
805
+ - Do not return plaintext verification codes in responses
806
+
807
+ phone_numbers:
808
+ - Mask phone number display (138****1234)
809
+ - Do not log full phone numbers in logs
810
+ - Prohibit bulk phone number query interfaces
811
+ - Implement data access auditing
812
+
813
+ # 4. Business Logic Security
814
+ business_logic:
815
+ verification_flow:
816
+ - Verification code length 6+ digits
817
+ - Mixed alphanumeric (prevent simple brute force)
818
+ - Limit verification code attempt count (3-5 times)
819
+ - Cooldown period for same phone number (60 seconds)
820
+
821
+ anti_abuse:
822
+ - CAPTCHA / slider verification
823
+ - Device fingerprinting
824
+ - Behavioral analysis detection
825
+ - Dual IP + device rate limiting
826
+
827
+ # 5. Incident Response
828
+ incident_response:
829
+ breach_detection:
830
+ - Monitor dark web for leaked information
831
+ - Implement anomalous traffic detection
832
+ - User complaint feedback mechanism
833
+
834
+ response_actions:
835
+ - Immediately revoke leaked credentials
836
+ - Activate backup API keys
837
+ - Force password reset on affected accounts
838
+ - Notify affected users
839
+
840
+ post_incident:
841
+ - Root cause analysis
842
+ - Improve security measures
843
+ - Security awareness training
844
+ - Regular security audits
845
+ ```
846
+
847
+ #### Third-Party Service Leakage Detection Checklist
848
+
849
+ ```markdown
850
+ ## Self-Assessment Checklist
851
+
852
+ ### Code Audit
853
+ - [ ] Search for hardcoded API keys/passwords
854
+ - [ ] Check configuration files for plaintext credentials
855
+ - [ ] Review frontend code for sensitive information
856
+ - [ ] Check Git history for leakage records
857
+ - [ ] Review logs for sensitive data
858
+
859
+ ### Permission Configuration
860
+ - [ ] Verify third-party service IP allowlists
861
+ - [ ] Check API call permission restrictions
862
+ - [ ] Confirm request signing is enabled
863
+ - [ ] Verify access rate limiting configuration
864
+ - [ ] Check cross-origin configuration (CORS)
865
+
866
+ ### Monitoring and Alerting
867
+ - [ ] Configure anomalous call alerts
868
+ - [ ] Enable cost anomaly monitoring
869
+ - [ ] Implement failure rate monitoring
870
+ - [ ] Configure sensitive data access alerts
871
+ - [ ] Establish incident response procedures
872
+
873
+ ### Data Protection
874
+ - [ ] Verification code validity time limits
875
+ - [ ] Phone number masking display
876
+ - [ ] Sensitive information filtering in logs
877
+ - [ ] Prohibit bulk export functionality
878
+ - [ ] Implement encrypted data storage
879
+
880
+ ### Business Logic
881
+ - [ ] Verification code complexity requirements
882
+ - [ ] Verification code attempt count limits
883
+ - [ ] Anti-replay attack mechanism
884
+ - [ ] Slider/CAPTCHA verification
885
+ - [ ] Device fingerprinting
886
+ ```
887
+
888
+ ### 9.2 Other Third-Party Service Risks
889
+
890
+ ```
891
+ High-risk third-party service types:
892
+
893
+ 1. Cloud Storage Services
894
+ ├─ OSS/S3 credential leakage -> File read/upload
895
+ ├─ Publicly readable buckets -> Data leakage
896
+ └─ Permission misconfiguration -> Unauthorized access
897
+
898
+ 2. Payment Interfaces
899
+ ├─ Merchant key leakage -> Transaction forgery
900
+ ├─ Callback signature verification flaws -> Order tampering
901
+ └─ Payment log leakage -> Financial information exposure
902
+
903
+ 3. Email Services
904
+ ├─ SMTP credential leakage -> Email spoofing
905
+ ├─ Email content logging -> Sensitive information leakage
906
+ └─ Send history queries -> Business data leakage
907
+
908
+ 4. CDN Services
909
+ ├─ Origin server IP exposure -> Bypass CDN attacks
910
+ ├─ Cache misconfiguration -> Sensitive file leakage
911
+ └─ Origin pull misconfiguration -> Internal network traversal
912
+
913
+ 5. Data Analytics/Statistics
914
+ ├─ Analytics code leakage -> User behavior tracking
915
+ ├─ Unauthorized data interfaces -> Competitor data acquisition
916
+ └─ Heatmap tool misconfiguration -> Page structure exposure
917
+
918
+ Key principles:
919
+ - Treat all third-party credentials as highest classification
920
+ - Assume third-party services can be compromised
921
+ - Implement least privilege and regular rotation
922
+ - Monitor third-party services for anomalous calls
923
+ ```
924
+
925
+ ### 9.3 Root Cause Analysis: Fragility of Third-Party Trust Chains
926
+
927
+ ```
928
+ Fundamental analysis:
929
+ Third-party service integration is essentially "outsourced trust,"
930
+ but organizations often:
931
+ 1. Overestimate the security of the third-party platform
932
+ 2. Underestimate the blast radius of credential leakage
933
+ 3. Neglect code auditing at the integration layer
934
+ 4. Lack monitoring of third-party API calls
935
+
936
+ Systemic risk:
937
+ ┌─────────────────────────────────────┐
938
+ │ Enterprise System │
939
+ │ ├─ Code Security (typically strong)│
940
+ │ ├─ Network Defense (typically strong)│
941
+ │ └─ Access Control (typically strong)│
942
+ └───────────┬─────────────────────────┘
943
+ │ Integration Layer (weakest link)
944
+ |
945
+ ┌─────────────────────────────────────┐
946
+ │ Third-Party Service │
947
+ │ ├─ API Credentials (may leak) │
948
+ │ ├─ Access Control (externally managed)│
949
+ │ └─ Data Storage (external) │
950
+ └─────────────────────────────────────┘
951
+
952
+ Attack path:
953
+ Attackers do not directly attack the enterprise system; instead:
954
+ 1. Obtain third-party API credentials
955
+ 2. Directly call the third-party service
956
+ 3. Bypass all enterprise defense measures
957
+ 4. Obtain business-sensitive data
958
+
959
+ Defensive mindset shift:
960
+ - From "protect the perimeter" to "protect the credentials"
961
+ - From "passive defense" to "active monitoring"
962
+ - From "trust the third party" to "zero-trust verification"
963
+ - From "periodic audits" to "continuous monitoring"
964
+
965
+ Quantitative indicators:
966
+ - Third-party credential leakage impact: 100% of user data
967
+ - Attack cost: Low (only one configuration file leak needed)
968
+ - Detection difficulty: High (attack traffic from legitimate IPs)
969
+ - Response time: Often days or months before discovery
970
+ ```
971
+
972
+ ---
973
+
974
+ > This knowledge base is continuously updated, derived from real vulnerability cases
975
+ > For security research and defensive reference use only