whathehack81/squirm
GitHub: whathehack81/squirm
SQUIRM 是一套精简的 bash 侦察管线工具,将子域名枚举、存活探测、端点收集、智能分类与 entropy 扫描整合为自动化流程,解决安全侦察中多工具协同与结果优先级排序的问题。
Stars: 1 | Forks: 0
# SQUIRM v2 - Clean Recon
精简的 bash recon pipeline。子域名 → 存活 → endpoint → JSON → entropy。
## 🚀 快速开始
### 安装依赖
**Ubuntu/Debian (apt):**
```
sudo apt update && sudo apt install -y curl jq python3 python3-pip golang-go && go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest && go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest && go install -v github.com/projectdiscovery/katana/cmd/katana@latest && pip3 install httpie
```
**Arch Linux (pacman):**
```
sudo pacman -Syu && sudo pacman -S curl jq python3 go httpie && go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest && go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest && go install -v github.com/projectdiscovery/katana/cmd/katana@latest && pip install httpie
```
然后将 Go binaries 添加到 PATH:
```
export PATH=$PATH:$(go env GOPATH)/bin
```
### 快速设置
```
git clone https://github.com/whathehack81/squirm
cd squirm
chmod +x squirm.sh brain.sh
./squirm.sh -t example.com
```
## 📋 用法
```
./squirm.sh -t target.com [OPTIONS]
Options:
--target, -t DOMAIN Target domain to scan
--scope FILE Scope file (one domain per line)
--proxy URL HTTP proxy (e.g., http://127.0.0.1:8080)
--out-dir DIR Output directory (default: intel/)
--fast Skip endpoint collection
--entropy Enable entropy scanning for secrets
--help, -h Show help
```
### 示例
```
# 单个 target,全面扫描
./squirm.sh -t example.com
# Fast mode(无 endpoints)
./squirm.sh -t example.com --fast
# 使用 entropy scanning 查找 secrets
./squirm.sh -t example.com --entropy
# 通过 proxy
./squirm.sh -t example.com --proxy http://127.0.0.1:8080
# 从 scope file 进行批量扫描
./squirm.sh --scope targets.txt
```
## 📊 输出结构
```
intel/target.com/
├── raw/
│ ├── subdomains.txt # All discovered subdomains
│ ├── alive.txt # Live/responsive hosts
│ ├── endpoints.txt # Raw endpoints from GAU
│ └── cleaned-endpoints.txt # Filtered & denoised endpoints
├── classified/
│ ├── auth.txt # Authentication endpoints
│ ├── platform.txt # Internal/platform endpoints
│ ├── features.txt # Feature-specific endpoints
│ └── frontend.txt # JavaScript/frontend assets
├── flags/
│ ├── entropy-input.txt # URLs for entropy scanning
│ └── entropy-candidates.txt # Detected secrets/tokens
└── report.json # Structured intelligence report
```
## 🧠 SQUIRM Brain v2 - 智能分类
Brain 系统会自动对 endpoint 进行评分和优先级排序:
```
./brain.sh target.com
```
**评分系统:**
- **90+**: CRITICAL(SSRF、文件交互、配置暴露)
- **80-89**: HIGH(财务、admin、auth、IDOR)
- **60-79**: MEDIUM(debug、staging、non-prod)
- **25-59**: LOW(通用 endpoint)
- **5-24**: STATIC(资产、图像、样式)
- **0-5**: NOISE(营销、博客、不相关内容)
**输出:**
```
intel/target.com/brain-output.txt # Full scored results
intel/target.com/high-value.txt # Only 80+ priority targets
```
## 🔧 依赖项
| 工具 | 用途 | 来源 |
|------|---------|--------|
| `subfinder` | 子域名枚举 | ProjectDiscovery |
| `httpx` | HTTP 探测 | ProjectDiscovery |
| `katana` | endpoint 抓取 | ProjectDiscovery |
| `gau` | URL 归档 | Tomnomnom |
| `jq` | JSON 处理 | stedolan |
| `curl` | HTTP 请求 | curl project |
| `httpie` | HTTP CLI | httpie.io |
| `python3` | Python runtime | Python |
| `pip` | 包管理器 | Python |
## 🎯 工作流
1. **枚举**:subfinder 发现子域名
2. **探测**:httpx 检查哪些存活
3. **收集**:gau + katana 收集历史 endpoint
4. **清理**:噪音过滤与去重
5. **分类**:Brain 按风险等级分类
6. **分析**:entropy 扫描检测潜在机密
7. **报告**:输出 JSON 用于自动化/集成
## ⚡ 性能提示
- 使用 `--fast` 模式进行快速侦察
- 对于大型数据集,请单独运行 entropy 扫描
- 使用 `--scope` 对多个目标进行批处理
- 使用代理来分配负载并避免速率限制
## 🐍 Python 版本(开发中)
Python 重写版正在开发中,包含:
- 基于契约的模块架构
- 增强的分类算法
- 更好的性能和并发
- 带有类型提示的代码库
## 📄 许可证
详情请参阅 LICENSE 文件。
**最后更新:** 2026-05-12 | **状态:** 积极开发中
标签:Bash, Docker容器, ESC4, OSINT, 侦察工具, 子域名收集, 实时处理, 应用安全, 攻击面发现, 日志审计, 网络安全, 隐私保护