1. fscan工具简介 fscan是一款开源的内网综合扫描工具,由Shadow Security Team开发,主要用于内网渗透的快速信息收集。该工具集成了端口扫描、服务识别、各类常见漏洞检测、弱口令检测等多种功能,支持多平台运行,是内网渗透测试中的得力助手。
主要特点 多协议端口扫描 自动服务识别 常见漏洞检测 各类服务的弱口令爆破 支持主机发现 支持多种输出格式 单文件、跨平台、无依赖 2. 安装与获取 2.1 获取方式 从GitHub下载最新版本:
git clone https://github.com/shadow1ng/fscan.git
2.2 支持平台 fscan支持多种操作系统平台:
Windows (32位/64位) Linux (32位/64位) MacOS 3. 基本使用方法 3.1 命令行参数 ./fscan -h 目标IP/子网 ./fscan -h 192.168.1.1/24 -p 1-65535 ./fscan -h 192.168.1.1/24 -p 80,443,3306 ./fscan -h 目标 -o result.txt
3.2 主要参数说明 -h 指定目标IP或网段,支持格式: 192.168.1.1 192.168.1.1/24 192.168.1.1-255 txt文件(每行一个IP或网段) -p 指定扫描端口,默认为常见端口 示例: -p 80,443,3389 示例: -p 1-65535 示例: -p -能力检测时,会自动加载 -pa 启用全部协议检测,消耗资源较大 -no 不进行存活探测,直接扫描 -o 输出结果到文件 -np 不使用ping进行存活检测 -nopoc 不扫描漏洞 -nobr 不进行爆破 -nolan 不扫描内网资产
4. 高级功能使用 4.1 主机发现 ./fscan -h 192.168.1.1/24 -m -p ./fscan -h 192.168.1.1/24 -ping ./fscan -h 192.168.1.1/24 -np
4.2 服务识别与漏洞扫描 ./fscan -h 192.168.1.1/24 -web ./fscan -h 192.168.1.1/24 -full ./fscan -h 192.168.1.1/24 -nopoc
4.3 弱口令爆破 ./fscan -h 192.168.1.1/24 -user admin -pwd admin123 ./fscan -h 192.168.1.1/24 -m ssh -user admin -pwd admin123 ./fscan -h 192.168.1.1/24 -pwdf passwords.txt ./fscan -h 192.168.1.1/24 -userf usernames.txt
4.4 自定义扫描 ./fscan -h 192.168.1.1/24 -t 100 ./fscan -h 192.168.1.1/24 -timeout 5 ./fscan -h 192.168.1.1/24 -m smb,mysql,mssql
5. 实际应用示例 5.1 快速内网扫描 ./fscan -h 192.168.1.0/24 [*] Scanning subnet: 192.168.1.0/24 [+] Found alive host: 192.168.1.1 [+] Found alive host: 192.168.1.100 [+] Found alive host: 192.168.1.254 [*] Scanning port for 192.168.1.1 [+] 192.168.1.1:80 open [+] 192.168.1.1:443 open [+] Web service detected on 192.168.1.1:80 [*] Scanning port for 192.168.1.100 [+] 192.168.1.100:22 open [+] 192.168.1.100:3306 open [+] 192.168.1.100:8080 open [+] MySQL service detected on 192.168.1.100:3306 [+] Web service detected on 192.168.1.100:8080
5.2 定向漏洞扫描 ./fscan -h 192.168.1.100 -m ms17010 [*] Scanning target: 192.168.1.100 [*] Checking MS17-010 vulnerability [+] 192.168.1.100 is vulnerable to MS17-010
5.3 针对性弱口令检测 ./fscan -h 192.168.1.100 -m mysql -user root -pwdf mysql_passwords.txt [*] Scanning MySQL service: 192.168.1.100:3306 [*] Brute forcing MySQL... [+] MySQL weak password found: root/123456
6. 注意事项 权限需求
# 部分功能需要管理员/root权限 sudo ./fscan -h 192.168.1.1/24
扫描流量
# 大范围扫描会产生大量流量,可能触发IDS/IPS ./fscan -h 192.168.1.1/24 -t 10 # 降低线程数减轻影响
误报处理
# 漏洞扫描可能存在误报,需要手动验证 ./fscan -h 192.168.1.1 -full -o result.txt # 输出结果后进行人工分析
合规使用
# 仅在授权的环境中使用 # 未经许可使用可能违反法律法规
7. 最佳实践 分阶段扫描
./fscan -h 192.168.1.1/24 -m -p -o alive_hosts.txt ./fscan -h 192.168.1.1/24 -no -p 1-65535 -o open_ports.txt ./fscan -h 192.168.1.1/24 -no -full -o vulnerabilities.txt
针对性扫描
./fscan -h 192.168.1.100 -p 80,443,8080 -web ./fscan -h 192.168.1.101 -p 1433,3306,5432 -m mysql,mssql,postgresql
降低影响
./fscan -h 192.168.1.1/24 -t 10 ./fscan -h 192.168.1.100-110 -p 22,80,443,3306,3389
结果分析
./fscan -h 192.168.1.1/24 -o scan_results.txt grep "weak password" scan_results.txt > weak_passwords.txt grep "vulnerable" scan_results.txt > vulnerabilities.txt
8. 进阶用法 8.1 与其他工具联动 ./fscan -h 192.168.1.1/24 -p 80,443 -o web_servers.txt cat web_servers.txt | grep open | awk '{print $1}' > targets.txt
8.2 自定义扫描模板 cat << 'EOF' > custom_scan.sh./fscan -h $1 -p 22,80,443,3306,3389 -o quick_scan.txt echo "发现开放服务:" grep "open" quick_scan.txt echo "发现漏洞:" grep "vulnerable" quick_scan.txt EOF chmod +x custom_scan.sh./custom_scan.sh 192.168.1.1/24
8.3 批量扫描 cat << 'EOF' > targets.txt192.168.1.0/24 192.168.2.0/24 10.10.10.1-100 EOF ./fscan -h targets.txt -o batch_results.txt
未经授权的扫描可能违反法律法规