HailBytes/pentest-calculator

GitHub: HailBytes/pentest-calculator

一个零依赖的可嵌入Web Component,用于在浏览器端快速估算渗透测试项目的工期与成本。

Stars: 1 | Forks: 0

# HailBytes 渗透测试范围计算器 一个用于评估和估算渗透测试项目的**零依赖 Web Component**。包含三个步骤的向导涵盖了目标范围、测试深度、合规性要求和交付物——无需服务器,即可在浏览器中生成工期(天数)和成本估算。 它可以作为一个单独的 ` ``` ## 集成示例 ### 纯 HTML / Hugo ``` Pentest Scope Calculator ``` Hugo shortcode (`layouts/shortcodes/pentest-calculator.html`): ``` ``` ### 通过 jsDelivr 使用 CDN ``` ``` ### React ``` import { useEffect, useRef } from 'react'; // Load once at the app level import('https://cdn.jsdelivr.net/gh/HailBytes/pentest-calculator@main/pentest-calculator.js'); export default function PentestCalc({ onCalculated, onQuoteRequested }) { const ref = useRef(null); useEffect(() => { const el = ref.current; if (!el) return; const handleCalc = (e) => onCalculated?.(e.detail); const handleQuote = (e) => onQuoteRequested?.(e.detail); el.addEventListener('pentest-calculated', handleCalc); el.addEventListener('pentest-quote-requested', handleQuote); return () => { el.removeEventListener('pentest-calculated', handleCalc); el.removeEventListener('pentest-quote-requested', handleQuote); }; }, []); return ; } ``` ### Vue 3 ``` ``` ## API 参考 ### 属性 | 属性 | 值 | 默认值 | 描述 | |-----------|-------------|---------|------------------------------| | `theme` | `dark` `light` | `dark` | 配色方案 | ### 事件 | 事件名称 | 触发时机 | `event.detail` | |-----------------------------|---------------------------------------------|-----------------------| | `pentest-calculated` | 用户到达第 3 步(自动计算时) | 完整的结果对象 | | `pentest-quote-requested` | 用户点击“获取准确报价”按钮时 | 最后一次的结果对象 | ### 结果对象结构 ``` { "inputs": { "targetType": "web_app", "numTargets": 3, "environment": "production", "authTesting": true, "socialEng": false, "testDepth": "comprehensive", "compliance": ["pci_dss", "soc2"], "reportType": "full_both", "remSupport": true }, "days": 9.5, "costLow": 14250, "costHigh": 33250, "teamSize": 2, "teamLabel": "engineers", "teamPills": ["1× Lead Penetration Tester", "1× Security Engineer"], "deliverables": ["Detailed vulnerability findings report", "..."], "timestamp": "2025-01-01T00:00:00.000Z" } ``` ## 计算方法 | 参数 | 公式 / 值 | |----------------------|------------------| | **基础天数** | `web_app=3`, `network=4`, `mobile=4`, `cloud=3`, `combined=6` | | **目标系数** | `1 target=1.0×`, `2–5=1.3×`, `6–15=1.6×`, `16+=2.0×` | | **深度乘数** | `basic=0.7×`, `standard=1.0×`, `comprehensive=1.5×`, `red_team=2.5×` | | **合规性** | 每选择一项标准 `+0.5 days` | | **完整报告** | `+1 day` | | **已认证** | `+0.5 days` | | **社会工程学** | `+2 days` | | **日费率** | 低: `$1,500/day`, 高: `$3,500/day` | **示例:** Web 应用(`3 days`)× 3 个目标(`1.3×`)× 综合(`1.5×`)+ PCI DSS(`0.5`)+ 已认证(`0.5`)= **7.87 → 7.9 天** ## ⚠️ 免责声明 所有估算均为初步结果,仅供**预算指导**。实际的项目范围、工期和定价将取决于详细的范围界定沟通、目标复杂程度、监管要求以及在测试过程中发现的问题。如需获取准确报价,请联系 HailBytes。 ## 相关推荐 HailBytes 计算器套件的一部分——用于安全和风险评估的即插即用型 Web Component: - [`@hailbytes/pentest-calculator`](https://www.npmjs.com/package/@hailbytes/pentest-calculator) — 渗透测试范围与成本估算器 _(本包)_ - [`@hailbytes/password-analyzer`](https://www.npmjs.com/package/@hailbytes/password-analyzer) — 密码强度与熵分析器 ([代码库](https://github.com/HailBytes/hailbytes-password-analyzer)) - [`@hailbytes/vulnerability-calculator`](https://www.npmjs.com/package/@hailbytes/vulnerability-calculator) — 漏洞扫描器基础架构规模估算 ([代码库](https://github.com/HailBytes/hailbytes-vulnerability-calculator)) - [`@hailbytes/security-roi-calculator`](https://www.npmjs.com/package/@hailbytes/security-roi-calculator) — 安全意识培训投资回报率 (ROI) 分析 ([代码库](https://github.com/HailBytes/hailbytes-security-roi-calculator)) ## 许可证 [Mozilla Public License 2.0](LICENSE) ## 企业支持 [![HailBytes - Managed Attack Surface Management](https://hailbytes.com/images/icons/hb_hb_white_horizontal.png)](https://www.hailbytes.com/asm?utm_source=github&utm_medium=repo_readme&utm_campaign=pentest-calculator&utm_content=enterprise_banner) 需要无需承担运营开销的托管式攻击面管理吗?**HailBytes ASM** 提供基于 BYOC 部署的 reNgine 并附带企业级支持,现已在 AWS 和 Azure Marketplaces 上架。 ## [**获取企业支持 ->**](https://www.hailbytes.com/asm?utm_source=github&utm_medium=repo_readme&utm_campaign=pentest-calculator&utm_content=enterprise_banner) *属于 [HailBytes](https://hailbytes.com) 开源安全工具包的一部分。*
标签:Linux 内核安全, Web Components, 前端组件, 多模态安全, 成本估算, 数据可视化, 暗色界面, 自定义脚本, 项目管理