soxoj/CommiPiste
GitHub: soxoj/CommiPiste
CommiPiste 通过静态文件的 git blob OID 精确识别开源 Web 软件的具体 commit 版本,并关联已知 CVE,用于授权安全测试与资产盘点。
Stars: 1 | Forks: 0
# CommiPiste
仅需通过静态文件,即可发现**开源 Web 软件的精确版本与 CVE**。
_想法由 paranoid android 提供_。 _**commit**(Git commit)+ **piste**(法语,意为“轨迹”)_
## 为什么
获取精确的 commit 胜过获取版本字符串:受 CVE 影响的代码会在版本区间的上下几个版本中持续“泄漏”,因此 commit 能告诉你特定的修复是否确实存在。CommiPiste
专为授权的安全测试和边界资产盘点而设计——它仅请求公开的静态文件,绝不进行任何漏洞利用。
## 工作原理
开源应用会直接从其源码树中提供静态文件(JS、CSS、图标)。
CommiPiste:
- 为每个版本的文件构建签名数据库(以 **git blob OID** 为键,可直接从 `git ls-tree` 免费获取)
- 然后从目标下载这些文件
- 根据字节内容复现相同的 OID
- 将它们匹配并定位到单一的 commit。
- [了解更多工作原理](docs/how-it-works.md)
## 快速开始
```
pip install -e . # needs Python ≥ 3.11 and a `git` binary
CommiPiste scan https://mantisbt.org/bugs # first run auto-downloads the signature DB
```
首次扫描会自动拉取预构建的签名数据库,随后识别软件并
打印其版本/commit 以及已知的 CVE。
例如,在 MantisBT 官方的公开 Bug 追踪系统上,它
精准锁定了 **MantisBT 2.28.3** 并展示了其漏洞 ——
[查看 HTML 报告示例](https://htmlpreview.github.io/?https://github.com/soxoj/CommiPiste/blob/main/example.html)。
更多示例:
```
CommiPiste scan https://mantisbt.org/bugs --verbose # show matching process
CommiPiste scan https://mantisbt.org/bugs --json # machine-readable
CommiPiste scan https://mantisbt.org/bugs --no-cve # version only, fully offline
CommiPiste scan https://mantisbt.org/bugs --report out.html # interactive HTML report
CommiPiste scan --targets hosts.txt # batch
```
## 自动索引新软件
内置数据库涵盖了 200 多个平台。要指纹识别它尚未知晓的软件,请将
`--autoindex` 指向该项目的 git 仓库——CommiPiste 会克隆它,索引其 **release tags**,
然后识别正在运行的版本,所有操作一气呵成:
```
CommiPiste scan https://demo.bookstackapp.com --autoindex \
--repo https://github.com/BookStackApp/BookStack
```
- **公共目录**会自动检测:它会用注册库中已有的常见名称(`js`、`themes`、`css`、`public`、`assets` 等)来探测仓库的顶层目录。如果猜测失误,请使用
`--public dist,css` 进行覆盖。
- **可选 flags:**`--name`(默认为仓库名称),`--cpe cpe:2.3:a:vendor:product`(为匹配到的版本启用
CVE 查询)。
- **会被记录。**该项目会被保存到你的本地注册库(`~/.CommiPiste/registry/`)中,因此
后续运行不再需要任何 flag——一条简单的 `scan ` 即可通过指纹检测到它:
CommiPiste scan https://demo.bookstackapp.com # 已检测到,无需 --autoindex
自动索引的项目在数据库更新后依然得以保留:在 `interactive-update` 下载了全新的 DB 后,
其中缺失的任何本地项目都会被自动重新索引。
## 文档
- [安装与完整的 CLI / 库使用说明](docs/usage.md)
- [签名数据库(自动下载,构建方式)](docs/database.md)
- [工作原理](docs/how-it-works.md) · [架构与内部细节](docs/ARCHITECTURE.md)
- [哪些能 / 不能被指纹识别](docs/supported.md)
- [漏洞查询(NVD + OSV)](docs/vulnerabilities.md)
- [主动探测(SPA / 打包应用)](docs/active-probing.md)
- [故障排除](docs/troubleshooting.md)
- [支持的软件列表](docs/CATALOG.md)
- [测试](docs/testing.md)
## 相关研究
关于 Web 应用指纹识别的前期及关联研究:
- [理解与改进 Web 应用指纹识别 (WASABO)](https://www.usenix.org/publications/loginonline/understanding-and-improving-web-application-fingerprinting-wasabo) — USENIX
- [WAFP — Web 应用指纹识别](https://web.archive.org/web/20100323114756/https://www.mytty.org/wafp/)
- [Sucuri — Web 应用指纹识别](https://web.archive.org/web/20100201135658/http://sucuri.net/?page=docs&title=fingerprinting-web-apps)
- [WhatWeb](https://web.archive.org/web/20110513043304/http://www.morningstarsecurity.com/research/whatweb) — Morning Star Security
## 许可证
[MIT](LICENSE)
_想法由 paranoid android 提供_。 _**commit**(Git commit)+ **piste**(法语,意为“轨迹”)_
标签:C2日志可视化, Python, 动态分析, 实时处理, 密码管理, 指纹识别, 无后门, 无服务器架构, 版本探测, 网络安全研究, 逆向工具