4nub1t/WLRecon
GitHub: 4nub1t/WLRecon
一款面向 Web 应用的红队侦察框架,采用 Python 与 Go 构建双层架构,实现高性能目录与端点发现、用户/邮箱枚举。
Stars: 1 | Forks: 0
# WLRecon — Wordlist Recon Framework




```
██╗ ██╗██╗ ██████╗ ███████╗ ██████╗ ██████╗ ███╗ ██╗
██║ ██║██║ ██╔══██╗██╔════╝██╔════╝██╔═══██╗████╗ ██║
██║ █╗ ██║██║ ██████╔╝█████╗ ██║ ██║ ██║██╔██╗ ██║
██║███╗██║██║ ██╔══██╗██╔══╝ ██║ ██║ ██║██║╚██╗██║
╚███╔███╔╝███████╗██║ ██║███████╗╚██████╗╚██████╔╝██║ ╚████║
╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝
Wordlist Recon Framework | made by 4nub1t | v1.1.0
```
## 描述
WLRecon 是一个高性能、模块化、混合侦察框架,专为 Web 应用程序渗透测试、OSCP 风格实验环境以及红队侦察工作流程设计。
它**不是脚本**。它采用双层架构:
- **Python 编排层** — CLI 界面、用户交互、配置、输出格式化、模块协调。
- **Go 高性能引擎** — 所有 HTTP 模糊测试与枚举,基于 goroutine 的并发,结构化 JSON 输出。
## 关键特性
- 高性能并发模糊测试(Go goroutines)
- NDJSON 流式管道(实时解析)
- 递归目录与端点枚举
- 自动基线响应检测
- 灵活检测(匹配字符串 / 无效字符串)
- 多格式输出(txt、json、csv、xml)
- 代理支持(Burp Suite 集成)
- TLS 验证绕过(用于实验环境)
- 可配置的端点探测模式(默认:/api/)
## 架构
```
WLRecon/
├── python/ # Orchestration layer
│ ├── main.py # Entry point
│ ├── cli.py # Interactive menu, banner, user flow
│ ├── config.py # Configuration manager
│ ├── parser.py # JSON result parser + terminal formatter
│ └── modules/
│ ├── email_enum.py # Email enumeration module
│ ├── user_enum.py # Username enumeration module
│ ├── dir_enum.py # Directory bruteforce module
│ └── endpoint_enum.py # API endpoint discovery module
│
├── go-engine/ # High-performance engine
│ ├── main.go # CLI flags, entry point
│ ├── engine.go # Core engine, worker pool, wordlist loader
│ ├── http.go # HTTP client with proxy and timeout support
│ └── worker.go # Mode-specific probe logic (dir/endpoint/user/email)
│
├── output/ # Scan output directory
├── wordlists/ # Place your wordlists here
├── README.md
├── requirements.txt
├── go.mod
└── .gitignore
```
**通信:**
Go 引擎将 NDJSON 输出到标准输出。Python 通过子进程逐行读取并格式化到终端。
```
Go Engine ──NDJSON──► Python Parser ──formatted──► Terminal
```
## 要求
- Python 3.11+
- Go 1.22+
- 单词列表(例如 `/usr/share/wordlists/dirb/common.txt`、SecLists)
## 安装
```
git clone https://github.com/4nub1t/wlrecon.git
cd wlrecon
pip install -r requirements.txt
```
## 构建 Go 引擎
```
cd go-engine
go build -o wlrecon-engine .
cd ..
```
在 Windows 上:
```
cd go-engine
go build -o wlrecon-engine.exe .
cd ..
```
## 用法
```
python python/main.py
```
将显示交互式菜单:
```
┌─────────────────────────────────────┐
│ SELECT MODULE │
├─────────────────────────────────────┤
│ [1] Email Enumeration │
│ [2] Username Enumeration │
│ [3] Directory Bruteforce │
│ [4] Endpoint Discovery │
│ [0] Exit │
└─────────────────────────────────────┘
```
然后提供:
- **目标 URL**
完整目标端点(例如 `http://10.10.10.10` 或 `http://10.10.10.10/login`)
- **单词列表**
单词列表文件路径(支持本地或绝对路径)
- **线程数**
并发工作线程数量(默认:`50`)
- **代理(可选)**
HTTP 代理用于流量路由(例如 Burp Suite `http://127.0.0.1:8080`)
- **超时**
请求超时(秒,默认:`10`)
- **TLS 验证**
对 HTTPS 目标跳过 TLS 证书验证(默认:`false`)
- **递归扫描**
启用发现的目录/端点的递归枚举(默认:`false`)
- **最大深度**
最大递归深度(仅在启用递归扫描时有效,默认:`3`)
- **输出格式**
输出格式(`txt`、`json`、`csv`、`xml`)(默认:`txt`)
- **输出文件名**
自定义结果文件名(默认:`wlrecon_`)
## 模块指南
### [1] 邮箱枚举
**目标:** 接受 `email` 参数的密码重置或登录端点。
**示例目标:** `http://10.10.10.10/forgot-password`
**单词列表:** 用户名或邮箱前缀。如果不存在 `@`,WLRecon 会自动追加 `@<目标域名>`。
### [2] 用户名枚举
**目标:** 接受 `username` 参数的登录表单端点。
**示例目标:** `http://10.10.10.10/login`
**检测启发式:** 有效与无效用户的响应码不同(例如 200 对比 404)。根据目标行为进行调整。
### [3] 目录爆破
**目标:** Web 应用程序根目录。
**示例目标:** `http://10.10.10.10`
**命中标准:** HTTP 200、201、204、301、302、307、308、401、403。
### [4] 端点发现
**目标:** 基础 URL。端点通过默认的 `/api/` 进行探测(可在 `worker.go` 中配置)。
**示例目标:** `http://10.10.10.10`
## 高级检测模式
默认情况下,WLRecon 使用**基线自动检测**——它用已知无效的单词探测目标,并将所有后续响应与该基线(状态码 + 响应长度)进行比较。
对于始终返回 HTTP 200 且响应体中包含错误消息的端点(常见于 CTF 实验环境和自定义登录表单),请使用基于字符串的检测选项:
### `match-string`
如果响应体包含此字符串,则将结果标记为 **FOUND**。
```
match-string: Welcome back
```
当服务器仅在有效结果时返回已知字符串时使用。
### `invalid-string`
如果响应体包含此字符串,则将结果标记为 **NOT FOUND**。
```
invalid-string: Email does not exist
```
当服务器对无效条目返回已知错误字符串时使用——WLRecon 将其余内容标记为有效。
### `extra-headers`
逗号分隔的附加 HTTP 标头列表。对需要 `X-Requested-With`、`Referer` 或自定义认证标头的目标非常有用。
```
extra-headers: X-Requested-With:XMLHttpRequest,Referer:http://10.10.10.10/login
```
### `extra-params`
附加到请求体的额外 POST 参数。对需要额外字段(如 `function=login`)的端点非常有用。
```
extra-params: function=login
```
## TLS 选项
WLRecon 现在支持在针对使用自签名或无效证书的 HTTPS 服务时跳过 TLS 证书验证。
提示
```
Skip TLS verification? [y/N]
```
**使用场景**
- OSCP 实验环境
- HackTheBox / TryHackMe 环境
- 内部预发布环境
- 自签名证书
## 递归扫描
目录与端点枚举模块现在支持自动递归扫描发现的路径。
提示
```
Enable recursive scan? [y/N]
Max depth [3]
```
**行为**
- 发现有效目录/端点时触发递归
- 每级递归增加扫描深度
- 结果包含深度注释
输出格式
```
/admin
/admin/login (depth:1)
/admin/panel (depth:2)
```
**支持的模块**
- 目录爆破
- 端点发现
**不支持**
- 用户名枚举
- 邮箱枚举
## 输出
WLRecon 在完成扫描后自动将结果保存到 `output/` 目录。
提示
```
Format [txt/json/csv/xml]
Output filename [wlrecon_]
```
**行为**
- 默认文件名:`wlrecon_`
- 根据所选格式自动添加扩展名
- 输出位置:`./output/`
### 示例:TXT 输出
```
Example: TXT output
```bash
DIRECTORIES / PATHS
--------------------
/admin 200
/login 302
/phpmyadmin 403
```
### 示例:JSON 输出
```
{
"meta": {
"target": "http://example.com",
"mode": "dir",
"total_tested": 1000,
"found_count": 12,
"elapsed_ms": 4200
},
"results": [
{
"type": "dir",
"result": "/admin",
"status": 200,
"found": true
}
]
}
```
## 示例 — 带输出的递归目录爆破
### 目标:http://192.168.1.150
```
[*] Target Configuration
Target URL : http://192.168.1.150
Wordlist path : /usr/share/wordlists/dirb/common.txt
Threads [50] : 40
Proxy [skip] :
Timeout secs [10] : 8
[*] Detection Options
match-string [skip]:
invalid-string[skip]:
[*] Advanced Options
Extra headers :
Extra params :
[*] HTTPS Options
Skip TLS verification? [y/N]: N
[*] Recursive Options
Enable recursive scan? [y/N]: y
Max depth [3] : 2
[*] Output Options
Format [txt/json/csv/xml] (default: txt): json
Output filename [wlrecon_20260413_230000]: internal_scan
[*] Starting module...
[+] FOUND: /admin 200 [1452b]
[+] FOUND: /login 302 [512b]
[+] FOUND: /backup 403 [298b]
[+] FOUND: /api 200 [2048b]
[+] FOUND: /admin/panel 200 [5321b] (depth:1)
[+] FOUND: /admin/config 403 [301b] (depth:1)
[+] FOUND: /api/v1 200 [4123b] (depth:1)
[+] FOUND: /api/v1/users 200 [6123b] (depth:2)
[~] Progress: 5230/5230 (100.0%)
-------------------------------------------------------
SCAN RESULTS SUMMARY
-------------------------------------------------------
DIRECTORIES / PATHS (8)
-----------------------------------------------------
> /admin 200 [1452b]
> /login 302 [512b]
> /backup 403 [298b]
> /api 200 [2048b]
> /admin/panel 200 [5321b] depth:1
> /admin/config 403 [301b] depth:1
> /api/v1 200 [4123b] depth:1
> /api/v1/users 200 [6123b] depth:2
-------------------------------------------------------
Tested: 5230 Found: 8 Time: 8421ms
-------------------------------------------------------
[*] Output saved to: ./output/internal_scan.json
```
## 代理使用(Burp Suite 集成)
1. 启动 Burp Suite 并确认代理监听器已激活(默认:`127.0.0.1:8080`)。
2. 提示代理时输入:
http://127.0.0.1:8080
3. Go 引擎的所有 HTTP 请求将通过 Burp 路由。
4. 若要仅拦截特定请求,请在运行前配置 Burp 作用域。
## JSON 通信协议
Go 引擎将 NDJSON 写入标准输出。每行是以下之一:
```
{"type":"dir","result":"/admin","status":200,"found":true}
{"type":"user","result":"admin","status":200,"found":true}
{"type":"email","result":"test@target.local","status":200,"found":true}
{"type":"progress","total":2000,"current":100}
{"type":"summary","total":2000,"found_count":3,"elapsed_ms":4821}
{"type":"dir","result":"/secret","status":404,"found":false}
{"error":"connection refused"}
```
Python 解析每一行 JSON 并应用 ANSI 彩色格式。
## 限制
- 准确性取决于目标 HTTP 响应行为
- 默认使用 `/api/` 模式进行端点发现
- 递归扫描仅适用于目录与端点模块
- WAF/速率可能降低扫描效果
## 后续改进
- [ ] 状态码过滤(包含/排除状态码)
- [ ] 响应大小过滤(字节、单词、行数)
- [ ] 请求间延迟(速率限制)
- [ ] 跟随重定向开关
- [ ] 高级 WAF 规避技术
## 作者
**4nub1t** — 红队 / 进攻安全
eJPTv2 认证 | OSCP 备考 | CTF 选手
[GitHub](https://github.com/4nub1t)
## 免责声明
### 使用 WLRecon 时,您同意:
- 在测试任何目标前获得适当授权
- 理解并遵守适用法律法规
- 对自身行为承担全部责任
**请负责任地使用。**
标签:API安全, ESC6, Go, JSON输出, NDJSON, OSCP备考, Python, Ruby工具, Web应用渗透测试, WLRecon, 侦察框架, 命令行界面, 子域名枚举, 开源安全工具, 数据展示, 无后门, 日志审计, 模块化, 流式处理, 混合侦察, 漏洞分析, 用户枚举, 目录爆破, 系统安全, 红队, 自动化侦察, 路径探测, 逆向工具, 逆向工程平台, 邮箱枚举, 高并发