
Metasploit 是一個非常強大,且好用的工具,我想是每位"資安專家"都必須熟用的一套滲透測試工具平台.
但是每次都需要用到GUI的界面操作嗎?若要採用自動化的快速檢測時,Metaexploit 提供的一個Consol 版的工具“msfcli”,只要運用簡單的Bash script ,就可以達到快速掃瞄檢測的目的.
以下我們先準備一個要檢測的檔案
fit_list.txt
10.0.0.1/24
10.0.1.1/24
192.168.1.1/24
192.168.20.1.24
接下來寫一個掃瞄的Bash,我們以Scan FTP anonymous 為例:
ftp_anonymous_scan.sh
#!/bin/bash
#參數設定
module=auxiliary/scanner/ftp/anonymous #使用的模組
thread=128 #掃瞄的線程
msf_path=/pentest/exploits/framework #msfcle的路徑位置
log_file=scan.log #掃瞄的log檔案
fname=ftp_list.txt #要掃描的網段檔案
#開始執行
exec <$fname
while read line
do
$msf_path/msfcli $module RHOSTS=$line THREADS=$thread E|tee -a $log_file
done
最後就是執行這個Bash囉 :-)
沒有留言:
張貼留言