0xF3tt/pencap

GitHub: 0xF3tt/pencap

pencap 是一个渗透测试取证与报告辅助 CLI 工具,帮助安全测试人员按项目管理截图与文件证据、跟踪发现并一键导出 Markdown 报告。

Stars: 0 | Forks: 0

# pencap ![许可证](https://img.shields.io/badge/license-MIT-blue.svg) ![Go 版本](https://img.shields.io/badge/go-%3E%3D1.22-00ADD8.svg) 一个渗透测试取证和报告辅助工具。将屏幕截图和文件捕获到 针对单个项目的证据库中,跟踪发现的问题,并导出 markdown 报告 —— 所有操作均通过命令行完成。 ## 目录 - [功能](#features) - [环境要求](#requirements) - [安装](#install) - [使用说明](#usage) - [scope.yaml](#scopeyaml) - [开发](#development) - [安全](#security) - [许可证](#license) ## 功能 - 将屏幕截图和文件捕获到按项目、按类别划分的证据树中 - 为每个捕获的文件提供 sha256 附带文件,用于保管链 - 带有时间戳的笔记,以类别作为索引 - 轻量级的发现跟踪器(纯 markdown,无需数据库) - 一键导出 markdown 报告 - 通过 `make release` 实现跨平台、混淆的发布构建(使用 `garble`) ## 环境要求 - Go 1.22+ 用于从源码构建 - `pencap ss `(屏幕截图捕获)会调用原生命行工具: - macOS:`screencapture`(内置,无需额外配置) - Linux:`scrot`、`gnome-screenshot` 或 ImageMagick 的 `import` 之一 - Windows:尚不支持 —— 请使用 `pencap ss file ` 导入 由其他工具截取的屏幕截图 ## 安装 ``` make install ``` 构建并安装到 `$(go env GOPATH)/bin`。请确保该目录 包含在您的 `PATH` 中。 ## 使用说明 ``` pencap init scaffold a new engagement folder pencap ss [note...] capture a screenshot into evidence// pencap ss file [note...] copy a file into evidence/files/ pencap note append a timestamped note pencap finding add [--severity crit|high|med|low|info] pencap finding link <id> <evidence-path> pencap finding list pencap export write findings + evidence to report/draft/report.md ``` 每次执行 `init` 都会生成一个 `scope.yaml` 标记文件,因此 `ss`/`note`/`finding`/`export` 可以在该项目任何子目录下直接运行 —— 无需 `cd` 回到根目录。 ## scope.yaml `pencap init <name>` 会在项目根目录下生成此模板: ``` # scope.yaml - engagement scope 和 rules of engagement engagement: acme-2026 client: "" start_date: "" end_date: "" in_scope: - "" out_of_scope: - "" contacts: - "" ``` 手动填写,例如: ``` # scope.yaml - engagement scope 和 rules of engagement engagement: acme-2026 client: "Acme Corp" start_date: "2026-07-10" end_date: "2026-07-24" in_scope: - "*.acme.com" - "10.20.30.0/24" out_of_scope: - "billing.acme.com" - "corporate VPN infrastructure" contacts: - "Jane Doe <jane@acme.com> (primary technical contact)" ``` 它目前还兼作 pencap 自身的项目根目录标记(用于让 `ss`/`note`/ `finding`/`export` 在子目录中找到正确的文件夹)—— `in_scope`/`out_of_scope` 字段仅作文档说明使用,尚未对 捕获的证据强制执行。 ## 开发 ``` make test # unit tests make lint # vet + staticcheck + golangci-lint make audit # gosec + govulncheck make release # cross-compiled, garble-obfuscated binaries in dist/ ``` 请参阅 `make help` 获取完整的目标列表。在提交 PR 之前,请确保 `make lint` 和 `make audit` 均无报错,并且 `make test` 能顺利通过。 ## 安全 pencap 是一个本地 CLI 工具,使用您自身的用户权限写入磁盘 —— 它没有网络监听器,也不存在远程攻击面。关于如何 报告漏洞,请参阅 [SECURITY.md](SECURITY.md)。 ## 许可证 MIT —— 详见 [LICENSE](LICENSE)。</div><div><strong>标签:</strong>ESC漏洞, EVTX分析, Go, Ruby工具, 文档结构分析, 日志审计, 证据收集, 防御加固</div></article></div> <!-- 人机验证 --> <script> (function () { var base = (document.querySelector('base') && document.querySelector('base').getAttribute('href')) || ''; var path = base.replace(/\/?$/, '') + '/cap-wasm/cap_wasm.min.js'; window.CAP_CUSTOM_WASM_URL = new URL(path, window.location.href).href; })(); </script> </body> </html>