Nmap掃描
db_nmap -sV 192.168.1.0/24
Auxiliary 掃描模塊
- RHOSTS表示
192.168.1.20-192.168.1.30 、 192.168.1.0/24,192.168.11.0/24(掃描兩個網段)
file:/root/host.txt (將需要掃描的主機訪問文本中)
- search arp
use auxiliary/scanner/discovery/arp_sweep
msf6 auxiliary(scanner/discovery/arp_sweep) > set interface eth0
msf6 auxiliary(scanner/discovery/arp_sweep) > set rhosts 192.168.0.0/24
msf6 auxiliary(scanner/discovery/arp_sweep) > set threads 20
msf6 auxiliary(scanner/discovery/arp_sweep) > run
- search postscan
use auxiliary/scanner/portscan/syn
msf6 auxiliary(scanner/portscan/syn) > set rhosts 114.115.165.18
msf6 auxiliary(scanner/portscan/syn) > set threads 50
run
Nmap IPID IdIe 掃描
- 查找ipidseq主機
use auxiliary/scanner/ip/ipidseq
msf6 auxiliary(scanner/ip/ipidseq) > set rhosts 192.168.0.0/24
msf6 auxiliary(scanner/ip/ipidseq) > run
- 之后就可以通過nmap去進行IdIe的掃描了
nmap -PN -sl 1.1.1.2 1.1.1.3
UDP掃描
use auxiliary/scanner/discovery/udp_sweep
use auxiliary/scanner/discovery/udp_probe
密碼嗅探
use auxiliary/sniffer/psnuffle
- 支持從pcap抓包文件中提取密碼
- 功能類似于dsniff
- 支持POP3、imap、ftp、HTTP GET協議
SNMP掃描
vi /etc/default/snmpd #在測試機偵聽地址修改為0.0.0.0
use auxiliary/scanner/snmp/snmp_login
use auxiliary/scanner/snmp/snmp_enum
use auxiliary/scanner/snmp/snmp_enumusers
use auxiliary/scanner/snmp/snmp_enumshares
SMB服務掃描
- SMB版本掃描
use auxiliary/scanner/smb/smb_version
- 掃描命名管道,判斷SMB服務類型(賬號、密碼)
use auxiliary/scanner/smb/pipe_auditor
- 掃描通過SMB管道可以訪問的RCERPC服務
use auxiliary/scanner/smb/pipe_dcerpc_auditor
- SMB共享枚舉(賬號、密碼)
use auxiliary/scanner/smb/smb_enumshares
- SMB用戶枚舉(賬號、密碼)
use auxiliary/scanner/smb/smb_enumusers
- SID枚舉(賬號、密碼)
use auxiliary/scanner/smb/smb_lookupsid
SSH服務掃描
- SSH版本掃描
use auxiliary/scanner/ssh/ssh_version
- SSH密碼爆破
use auxiliary/scanner/ssh/ssh_login
set USERPASS_FILE /usr/share/metasploit-framework/data/wordlists/root_userpass.txt
- SSH公鑰登陸
use auxiliary/scanner/ssh/ssh_login_pubkey
系統補丁
- windows缺少的補丁
-
- 基于已經取得的session進行檢測
use post/windows/gather/enum_patches
#這個要通過已經獲得session去利用
sql_server
- Mssql掃描端口
-
- TCP 1433 (動態端口) / UDP 1434 (查詢TCP端口號)
use auxiliary/scanner/mssql/mssql_ping
- 爆破mssql密碼
use auxiliary/scanner/mssql/mssql_login
- 遠程執行代碼
use auxiliary/admin/mssql/mssql_exec
set CMD.NET user user pass /ADD
FTP
- FTP版本掃描
use auxiliary/scanner/ftp/ftp_version
#查看是否可以匿名登錄
use auxiliary/scanner/ftp/anonymous
#密碼破解
use auxiliary/scanner/ftp/ftp_login