0xA13/massenum
GitHub: 0xA13/massenum
一款自动化侦察工具,用于大型域名或IP范围的子域枚举、端口扫描和技术指纹识别。
Stars: 0 | Forks: 0
这是一款专为处理大范围域名或IP资产的渗透测试人员设计的侦察工具。它能自动完成解析、HTTP探测、基于范围的子域枚举过滤、端口扫描、技术指纹识别,并对多达数百个目标进行截图。
## 核心功能
- 发现的子域名会自动过滤,仅保留解析到范围内IP的子域名
- 支持在单个目标文件中同时提供域名和IP
- 集成子域发现、端口扫描、HTTP探测和技术指纹识别
- 自动对所有存活的HTTP服务进行截图
- 维护一份已发现但超出范围的资产记录
## 范围过滤工作原理
当您提供包含域名和IP的 `targets.txt` 文件时:
1. **根域名**会被解析为对应的IP地址
2. **构建范围**依据:
- `targets.txt` 中明确列出的IP
- 根域名解析出的IP
3. **通过被动枚举发现子域名**(使用subfinder)
4. **仅保留解析到范围内IP的子域名**用于后续测试
5. **范围外的发现会被记录**在单独的文件中供您参考
### 示例
**您的targets.txt内容:**
```
example.com # Resolves to 192.168.1.10
testsite.com # Resolves to 192.168.1.11
192.168.1.12
```
**Subfinder发现:**
- `api.example.com` → 192.168.1.10 **(保留 - 匹配根域名IP)**
- `staging.example.com` → 192.168.1.12 **(保留 - 匹配范围内的显式IP)**
- `legacy.example.com` → 10.0.0.50 **(过滤 - 不在范围内)**
仅前两个子域会进行后续扫描,而 `legacy.example.com` 将被记录在 `out_of_scope.txt` 文件中。
## 前置条件
- subfinder
- dnsx
- httpx
- naabu
- gowitness
#### 如果您想省事,仓库中提供了一个为您准备好的脚本
`prereqs.sh`
###### [!] 该脚本需要预先安装Go语言环境
## 📁 输出结构
```
recon_20260109_1530/
├── domains/
│ ├── domains.txt # Extracted root domains from input
│ ├── resolved.txt # Successfully resolved root domains
│ └── resolved_with_IPs.txt # Root domains with their IPs
├── ips/
│ ├── ips.txt # IPs extracted from input
│ └── scope.txt # Complete IP scope (input IPs + resolved IPs)
├── subdomains/
│ ├── passive.txt # All discovered subdomains (before filtering)
│ ├── resolved_with_IPs.txt # Subdomains with their resolved IPs
│ ├── live.txt # IN-SCOPE subdomains only
│ └── out_of_scope.txt # Out-of-scope subdomains (for reference)
├── ports/
│ ├── ip_ports.txt # Open ports on IPs
│ ├── domain_ports.txt # Open ports on root domains
│ └── subdomain_ports.txt # Open ports on in-scope subdomains
├── http/
│ ├── live_domains.txt # Live HTTP(S) root domains
│ ├── live_subdomains.txt # Live HTTP(S) in-scope subdomains
│ └── tech_info.txt # Technology fingerprinting results
└── screenshots/
└── [automated screenshots of all live HTTP services]
```
## 安装说明
```
git clone https://github.com/0xA13/massenum.git
cd massenum
```
#### 安装所需工具
使用提供的工具安装脚本:
```
chmod +x prereqs.sh
./prereqs.sh
```
这将安装:
- 基于Go的工具:subfinder, dnsx, httpx, naabu
- 系统工具:gowitness
- libpcap-dev(naabu所需)
#### 可能遇到的问题
###### 突然提示无法识别脚本所依赖的工具?
只需运行 `export PATH=$PATH:$(go env GOPATH)/bin`
## 使用方法
创建一个 `targets.txt` 文件,每行一个域名或IP。支持混合输入。
**示例:**
```
example.com
company.org
192.168.1.10
192.168.1.11
10.0.50.100
```
运行枚举脚本:
```
chmod +x massenum.sh
./massenum.sh
```
## 输出摘要
脚本执行完毕后,您将看到:
```
[*] Done. Results saved in recon_20260109_135133/
[*] Summary:
- Root domains: 296
- IPs in original scope: 758
- Total IPs in scope (including resolved): 874
- Subdomains in scope: 280
- Subdomains filtered out: 94
```
标签:AES-256, Go语言, HTTP探测, Talos规则, 主动扫描, 云存储安全, 侦察工具, 大规模目标处理, 子域名枚举, 密码管理, 应用安全, 截图功能, 数据统计, 日志审计, 渗透测试自动化, 漏洞评估, 程序破解, 端口扫描, 系统安全, 网络安全, 网络扫描, 网络空间测绘, 范围过滤, 被动枚举, 隐私保护